From: Nickolai Zeldovich Date: Sat, 5 Jan 2013 19:19:51 +0000 (-0500) Subject: nfs: avoid dereferencing null pointer in initiate_bulk_draining X-Git-Tag: v3.7.2~70 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2fc2d6907a79876e6c9dc3d3cd4565b319756750;p=karo-tx-linux.git nfs: avoid dereferencing null pointer in initiate_bulk_draining commit ecf0eb9edbb607d74f74b73c14af8b43f3729528 upstream. Fix an inverted null pointer check in initiate_bulk_draining(). Signed-off-by: Nickolai Zeldovich Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 76b4a7a3e559..36b2e7a531f3 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -205,7 +205,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp, list_for_each_entry(lo, &server->layouts, plh_layouts) { ino = igrab(lo->plh_inode); - if (ino) + if (!ino) continue; spin_lock(&ino->i_lock); /* Is this layout in the process of being freed? */