lkml.org 
[lkml]   [2008]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] kill empty chardev open/release methods
    From
    Date
    Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

    > Actually it turns out you can introduce bugs doing this when the BKL is
    > pushed down.
    >
    > The problem is the methods are not NULL, they (with the lock pushed down
    > are)
    >
    > {
    > lock_kernel();
    > unlock_kernel();
    > }
    >
    > And we have drivers with setup code that does things in the wrong order
    > but under the BKL. eg one I just fixed did
    >
    > misc_register()
    > init locks
    > allocate memory
    > do stuff
    > return 0;

    Hmph.

    As it turns out, a misc driver will still be OK because the BKL has not
    (yet) been pushed past misc_open(). What this does mean, though, is
    that all of those empty and trivial open functions need to be
    revisited. I thought this looked too easy the first time through...

    jon


    \
     
     \ /
      Last update: 2008-05-18 21:49    [W:6.681 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site