projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0907f34
)
bnx2x: Prevent null pointer dereference on error flow
author
Yuval Mintz
<
[email protected]
>
Sun, 20 Oct 2013 14:51:31 +0000
(16:51 +0200)
committer
David S. Miller
<
[email protected]
>
Mon, 21 Oct 2013 22:31:35 +0000
(18:31 -0400)
If debug message is open and bnx2x_vfop_qdtor_cmd() were to fail,
the resulting print would have caused a null pointer dereference.
Signed-off-by: Yuval Mintz <
[email protected]
>
Signed-off-by: Ariel Elior <
[email protected]
>
Signed-off-by: Eilon Greenstein <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 997c6611a2aef6e140e8b1217af62ec6228fca8e..bf08ad68b4052374552e376739a101af0a652cf6 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@
-470,10
+470,10
@@
static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
bnx2x_vfop_qdtor, cmd->done);
return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
cmd->block);
+ } else {
+ BNX2X_ERR("VF[%d] failed to add a vfop\n", vf->abs_vfid);
+ return -ENOMEM;
}
- DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
- vf->abs_vfid, vfop->rc);
- return -ENOMEM;
}
static void