12 Feb, 2007

1 commit

  • Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
    corresponding "kmem_cache_zalloc()" call.

    Signed-off-by: Robert P. J. Day
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Roland McGrath
    Cc: James Bottomley
    Cc: Greg KH
    Acked-by: Joel Becker
    Cc: Steven Whitehouse
    Cc: Jan Kara
    Cc: Michael Halcrow
    Cc: "David S. Miller"
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

10 Feb, 2007

2 commits

  • If you lose this race, it can iput a socket inode twice and you get a BUG
    in fs/inode.c

    When I added the option for user-space to close a socket, I added some
    cruft to svc_delete_socket so that I could call that function when closing
    a socket per user-space request.

    This was the wrong thing to do. I should have just set SK_CLOSE and let
    normal mechanisms do the work.

    Not only wrong, but buggy. The locking is all wrong and it openned up a
    race where-by a socket could be closed twice.

    So this patch:
    Introduces svc_close_socket which sets SK_CLOSE then either leave
    the close up to a thread, or calls svc_delete_socket if it can
    get SK_BUSY.

    Adds a bias to sk_busy which is removed when SK_DEAD is set,
    This avoid races around shutting down the socket.

    Changes several 'spin_lock' to 'spin_lock_bh' where the _bh
    was missing.

    Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916

    Signed-off-by: Neil Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

09 Feb, 2007

37 commits