nfs: avoid dereferencing null pointer in initiate_bulk_draining
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines · Nickolai Zeldovich
Fix an inverted null pointer check in
initiate_bulk_draining().Signed-off-by Nickolai Zeldovich <[email protected]>--- fs/nfs/callback_proc.c | 2 +-- 1 file changed, 1 insertion(+-), 1 deletion(-)fs/nfs/callback_proc.c +1
-1--- a/fs/nfs/callback_proc.c +-+-+- b/fs/nfs/callback_proc.c@@ -206,7 +-206,7 @@ static u32 initiate_bulk_draining(struct
nfs_client*clp,
fs/nfs/callback_proc.c
Quoted 7 lines
fs/nfs/callback_proc.c +1
-1list_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? */
Thanks for spotting. Applied to the 'bugfixes' branch.
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com