提交 17e21616 编写于 作者: R Robin Holt 提交者: Linus Torvalds

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: NRobin Holt <holt@sgi.com>
Signed-off-by: NDean Nelson <dcn@sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 69b3bb65
...@@ -1957,11 +1957,13 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch) ...@@ -1957,11 +1957,13 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch)
msg = xpc_pull_remote_msg_sn2(ch, get); msg = xpc_pull_remote_msg_sn2(ch, get);
DBUG_ON(msg != NULL && msg->number != get); if (msg != NULL) {
DBUG_ON(msg != NULL && (msg->flags & XPC_M_SN2_DONE)); DBUG_ON(msg->number != get);
DBUG_ON(msg != NULL && !(msg->flags & XPC_M_SN2_READY)); DBUG_ON(msg->flags & XPC_M_SN2_DONE);
DBUG_ON(!(msg->flags & XPC_M_SN2_READY));
payload = &msg->payload; payload = &msg->payload;
}
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册