diff options
author | Robin Holt <holt@sgi.com> | 2009-01-29 17:25:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-29 21:04:43 -0500 |
commit | 17e2161654da4e6bdfd8d53d4f52e820ee93f423 (patch) | |
tree | 73963484f16dc6fdfc2f84200bc40c060a36ce70 /drivers/misc | |
parent | 69b3bb65fa97a1e8563518dbbc35cd57beefb2d4 (diff) |
sgi-xpc: Remove NULL pointer dereference.
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/sgi-xp/xpc_sn2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c index 7aafb8a91945..7d05fb5f4fee 100644 --- a/drivers/misc/sgi-xp/xpc_sn2.c +++ b/drivers/misc/sgi-xp/xpc_sn2.c | |||
@@ -1957,11 +1957,13 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch) | |||
1957 | 1957 | ||
1958 | msg = xpc_pull_remote_msg_sn2(ch, get); | 1958 | msg = xpc_pull_remote_msg_sn2(ch, get); |
1959 | 1959 | ||
1960 | DBUG_ON(msg != NULL && msg->number != get); | 1960 | if (msg != NULL) { |
1961 | DBUG_ON(msg != NULL && (msg->flags & XPC_M_SN2_DONE)); | 1961 | DBUG_ON(msg->number != get); |
1962 | DBUG_ON(msg != NULL && !(msg->flags & XPC_M_SN2_READY)); | 1962 | DBUG_ON(msg->flags & XPC_M_SN2_DONE); |
1963 | DBUG_ON(!(msg->flags & XPC_M_SN2_READY)); | ||
1963 | 1964 | ||
1964 | payload = &msg->payload; | 1965 | payload = &msg->payload; |
1966 | } | ||
1965 | break; | 1967 | break; |
1966 | } | 1968 | } |
1967 | 1969 | ||