[lkml]   [2009]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 01/13] [staging] changed ioctls to unlocked
    On Tue, 24 Mar 2009 15:01:36 -0700
    Greg KH <> wrote:

    > Hm, why? What does this patch accomplish becides just pushing the
    > lock_kernel into the driver? Shouldn't you fix the code to not need
    > the lock_kernel at all instead?

    Having done a lot of this myself, I can attest to what is going on
    here. If you're trying to push the BKL out of the core, there's not
    much choice except to shove it down into the drivers and such below
    it. In very simple cases you can tell that the lock isn't needed.
    But going messing around with the locking in random drivers is a sure
    way to create nasty subtle problems.

    So, if a specific driver's situation is not obvious, or if it's clear
    that some sort of fix is required, it's generally best to just make the
    lock_kernel() (which has always been there) explicit. Then people who
    actually know the driver and have the hardware to test changes can
    eliminate it at their leisure. Pushing the BKL down gets it out of the
    core, keeps the semantics the same, and sticks a red flag on code which
    needs examination by suitably clueful maintainers.

    I've not looked in depth at this series of patches, but I understand
    where it's coming from. Stoyan, if you want, I'd be happy to take
    these through the BKL-removal tree once the maintainers are happy with
    it. OTOH, it looks like the locked ioctl() isn't going anywhere
    anytime soon, so it might be best to just send these individually
    through the appropriate subsystem trees.


     \ /
      Last update: 2009-03-25 00:23    [W:0.021 / U:20.016 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site