lkml.org 
[lkml]   [2008]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] spi: Push the BKL down into the drivers
    On Thu, 22 May 2008 17:40:50 -0700
    David Brownell <david-b@pacbell.net> wrote:

    > On Thursday 22 May 2008, Alan Cox wrote:
    > > Another step to removing ->ioctl and to removing the BKL
    >
    > This happens to not apply with the latest patches; I'll
    > address that.
    >
    > Where is the writeup about exactly what lock_kernel() is
    > supposed to have been protecting against in ioctl code?

    There isn't one. The big problem we have is that the ioctl methods were
    implicitly called under the big kernel lock. Without pushing them down
    into drivers we can't take the step of actually thinking at the driver
    level "is this needed". Historically therefore we've never documented
    *why* or *if* it was needed - it's just there. Pushing them into the
    driver means the subsystem owner gets to see the implicit locking and can
    actually ask the right questions with internal driver knowledge.

    Whether it is needed is dependant on the internal locking model of the
    driver - does it handle parallel ioctls correctly, are there races
    against other functions in the driver (eg hot unplugs). That can't be
    evaluated at a high level.

    It's also made harder by the fact lots of drivers have buggy assumptions
    about ioctl locking (watchdog was a fine example).

    Alan


    \
     
     \ /
      Last update: 2008-05-23 13:25    [W:3.066 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site