diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-05-28 15:50:10 +0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-06-01 21:35:16 +0400 |
commit | 7f0adb53bcf5bdb92236cda8ec92ea5e40993028 (patch) | |
tree | 062db774aad5c3362023bf7649b9692e3e2a777d /fs/cifs/connect.c | |
parent | ea319d57d3372a9dbee0b3807d75bb36b8d54adc (diff) | |
download | linux-7f0adb53bcf5bdb92236cda8ec92ea5e40993028.tar.xz |
CIFS: Make accessing is_valid_oplock/dump_detail ops struct field safe
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index ccafdedd0dbc..3647b1a4540b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1058,13 +1058,15 @@ cifs_demultiplex_thread(void *p) if (mid_entry != NULL) { if (!mid_entry->multiRsp || mid_entry->multiEnd) mid_entry->callback(mid_entry); - } else if (!server->ops->is_oplock_break(buf, server)) { + } else if (!server->ops->is_oplock_break || + !server->ops->is_oplock_break(buf, server)) { cERROR(1, "No task to wake, unknown frame received! " "NumMids %d", atomic_read(&midCount)); cifs_dump_mem("Received Data is: ", buf, HEADER_SIZE(server)); #ifdef CONFIG_CIFS_DEBUG2 - server->ops->dump_detail(buf); + if (server->ops->dump_detail) + server->ops->dump_detail(buf); cifs_dump_mids(server); #endif /* CIFS_DEBUG2 */ |