lkml.org 
[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 04/38] inotify: fix check for one-shot watches before destroying them
    2.6.24-stable review patch.  If anyone has any objections, please let us
    know.

    ------------------

    From: Ulisses Furquim <ulissesf@gmail.com>

    patch ac74c00e499ed276a965e5b5600667d5dc04a84a in mainline.

    As the IN_ONESHOT bit is never set when an event is sent we must check it
    in the watch's mask and not in the event's mask.

    Signed-off-by: Ulisses Furquim <ulissesf@gmail.com>
    Reported-by: "Clem Taylor" <clem.taylor@gmail.com>
    Tested-by: "Clem Taylor" <clem.taylor@gmail.com>
    Cc: Amy Griffis <amy.griffis@hp.com>
    Cc: Robert Love <rlove@google.com>
    Cc: John McCutchan <ttb@tentacle.dhs.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


    ---
    fs/inotify_user.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/inotify_user.c
    +++ b/fs/inotify_user.c
    @@ -269,7 +269,7 @@ static void inotify_dev_queue_event(stru
    /* we can safely put the watch as we don't reference it while
    * generating the event
    */
    - if (mask & IN_IGNORED || mask & IN_ONESHOT)
    + if (mask & IN_IGNORED || w->mask & IN_ONESHOT)
    put_inotify_watch(w); /* final put */

    /* coalescing: drop this event if it is a dupe of the previous */
    --


    \
     
     \ /
      Last update: 2008-02-23 01:59    [W:3.143 / U:0.660 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site