Skip to content

Commit

Permalink
CIFS: Make accessing is_valid_oplock/dump_detail ops struct field safe
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Jun 1, 2012
1 parent ea319d5 commit 7f0adb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 7f0adb5

Please sign in to comment.