diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-11-02 21:22:50 +0100 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-11-04 20:39:07 +0100 |
commit | d38922949d377da7d47473c7868334408ae3b373 (patch) | |
tree | 322cf984f274c45da08d57acc74d29bb5c5e5048 /fs/block_dev.c | |
parent | cifs: trivial comment fix: tlink_tree is now a rbtree (diff) | |
download | linux-d38922949d377da7d47473c7868334408ae3b373.tar.xz linux-d38922949d377da7d47473c7868334408ae3b373.zip |
cifs: dereferencing first then checking
This patch is based on Dan's original patch. His original description is
below:
Smatch complained about a couple checking for NULL after dereferencing
bugs. I'm not super familiar with the code so I did the conservative
thing and move the dereferences after the checks.
The dereferences in cifs_lock() and cifs_fsync() were added in
ba00ba64cf0 "cifs: make various routines use the cifsFileInfo->tcon
pointer". The dereference in find_writable_file() was added in
6508d904e6f "cifs: have find_readable/writable_file filter by fsuid".
The comments there say it's possible to trigger the NULL dereference
under stress.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/block_dev.c')
0 files changed, 0 insertions, 0 deletions