cifs: check for private_data before trying to put it
authorJeff Layton <jlayton@redhat.com>
Tue, 5 Apr 2011 23:23:47 +0000 (16:23 -0700)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:41:43 +0000 (11:41 -0700)
commit7d1351f10261fda7945c23177ae7929299e47038
tree59498f9a11da1af39742d2e2482ad02a378131f2
parent3ec9852ea29f7aec9626b1e9bc6da40fb2d3eea8
cifs: check for private_data before trying to put it

BugLink: http://bugs.launchpad.net/bugs/769042

commit 7797069305d13252fd66cf722aa8f2cbeb3c95cd upstream.

cifs_close doesn't check that the filp->private_data is non-NULL before
trying to put it. That can cause an oops in certain error conditions
that can occur on open or lookup before the private_data is set.

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
fs/cifs/file.c