projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c0eee3
)
IB/mthca: Handle -ENOMEM in forward_trap()
author
Dan Carpenter
<error27@gmail.com>
Tue, 11 Jan 2011 01:42:10 +0000
(17:42 -0800)
committer
Roland Dreier
<rolandd@cisco.com>
Tue, 11 Jan 2011 01:42:10 +0000
(17:42 -0800)
ib_create_send_mad() can return ERR_PTR(-ENOMEM) here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_mad.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mthca/mthca_mad.c
b/drivers/infiniband/hw/mthca/mthca_mad.c
index 5648659ff0b0cd8234005d88a1629677643ea7c5..03a59534f59e29b29f8b0b50d41170c94e8f5745 100644
(file)
--- a/
drivers/infiniband/hw/mthca/mthca_mad.c
+++ b/
drivers/infiniband/hw/mthca/mthca_mad.c
@@
-171,6
+171,8
@@
static void forward_trap(struct mthca_dev *dev,
if (agent) {
send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR,
IB_MGMT_MAD_DATA, GFP_ATOMIC);
+ if (IS_ERR(send_buf))
+ return;
/*
* We rely here on the fact that MLX QPs don't use the
* address handle after the send is posted (this is