]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfs: avoid dereferencing null pointer in initiate_bulk_draining
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Sat, 5 Jan 2013 19:19:51 +0000 (14:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:18:38 +0000 (09:18 -0800)
commit ecf0eb9edbb607d74f74b73c14af8b43f3729528 upstream.

Fix an inverted null pointer check in initiate_bulk_draining().

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/callback_proc.c

index 76b4a7a3e55931e0f9cc79d08c248048cbfaa961..36b2e7a531f35d5ee88c1f5f6a18941d280dbead 100644 (file)
@@ -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? */