Skip to content

Commit

Permalink
sgi-xpc: Remove NULL pointer dereference.
Browse files Browse the repository at this point in the history
If the bte copy fails, the attempt to retrieve payloads merely returns a
null pointer deref and not NULL as was expected.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Robin Holt authored and Linus Torvalds committed Jan 30, 2009
1 parent 69b3bb6 commit 17e2161
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/misc/sgi-xp/xpc_sn2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1957,11 +1957,13 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch)

msg = xpc_pull_remote_msg_sn2(ch, get);

DBUG_ON(msg != NULL && msg->number != get);
DBUG_ON(msg != NULL && (msg->flags & XPC_M_SN2_DONE));
DBUG_ON(msg != NULL && !(msg->flags & XPC_M_SN2_READY));
if (msg != NULL) {
DBUG_ON(msg->number != get);
DBUG_ON(msg->flags & XPC_M_SN2_DONE);
DBUG_ON(!(msg->flags & XPC_M_SN2_READY));

payload = &msg->payload;
payload = &msg->payload;
}
break;
}

Expand Down

0 comments on commit 17e2161

Please sign in to comment.