[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4FA345DA4F4AE44899BD2B03EEEC2FA91198F775@SACEXCMBX04-PRD.hq.netapp.com>
Date: Sat, 5 Jan 2013 19:29:20 +0000
From: "Myklebust, Trond" <Trond.Myklebust@...app.com>
To: Nickolai Zeldovich <nickolai@...il.mit.edu>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>
Subject: Re: [PATCH] nfs: avoid dereferencing null pointer in
initiate_bulk_draining
On Sat, 2013-01-05 at 14:19 -0500, Nickolai Zeldovich wrote:
> Fix an inverted null pointer check in initiate_bulk_draining().
>
> Signed-off-by: Nickolai Zeldovich <nickolai@...il.mit.edu>
> ---
> fs/nfs/callback_proc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> index c89b26b..264d1aa 100644
> --- 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,
>
> 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? */
Thanks for spotting. Applied to the 'bugfixes' branch.
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@...app.com
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists