projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42281d2
)
VMCI: Fix deref before NULL-check of queuepair ptr
author
Andy King
<acking@vmware.com>
Thu, 10 Jan 2013 23:41:40 +0000
(15:41 -0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 20:07:39 +0000
(12:07 -0800)
Check for a valid queuepair ptr before trying to lock the queuepair (which will
deref it).
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy King <acking@vmware.com>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_vmci/vmci_queue_pair.c
patch
|
blob
|
history
diff --git
a/drivers/misc/vmw_vmci/vmci_queue_pair.c
b/drivers/misc/vmw_vmci/vmci_queue_pair.c
index da47e457e158d27f6251946e10e357824aee7c59..6417a26df8d861370c115414cc5b8e5de10c868d 100644
(file)
--- a/
drivers/misc/vmw_vmci/vmci_queue_pair.c
+++ b/
drivers/misc/vmw_vmci/vmci_queue_pair.c
@@
-3355,11
+3355,11
@@
ssize_t vmci_qpair_dequev(struct vmci_qp *qpair,
{
ssize_t result;
- qp_lock(qpair);
-
if (!qpair || !iov)
return VMCI_ERROR_INVALID_ARGS;
+ qp_lock(qpair);
+
do {
result = qp_dequeue_locked(qpair->produce_q,
qpair->consume_q,