Skip to contentSkip to conversation

bnx2x: NULL dereference on error in debug code

PATCH Applied Dan Carpenter 3 participants 6 messages Jan 8, 2013 – Jan 10, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: NULL dereference on error in debug code

"vfop" is NULL here. I've changed the debugging to not use it.

---
Only needed in linux-next.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -2
index 71fcef0..3eef972 100644
@@ -463,8 +463,7 @@ static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
 		return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
 					     cmd->block);
 	}
-	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
-	   vf->abs_vfid, vfop->rc);
+	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop.\n", vf->abs_vfid);
 	return -ENOMEM;
 }
 
#1 lore raw
Quoted 21 lines

-----Original Message-----
From: [email protected] [mailto:netdev- [email protected]] On Behalf Of Dan Carpenter
Sent: Tuesday, January 08, 2013 3:42 PM
To: Eilon Greenstein
Cc: [email protected]; [email protected]; kernel- [email protected]
Subject: [patch] bnx2x: NULL dereference on error in debug code

"vfop" is NULL here. I've changed the debugging to not use it.

---
Only needed in linux-next.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +0 -0
index 71fcef0..3eef972 100644

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp, · line 469

Quoted 9 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -2
@@ -463,8 +463,7 @@ static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
 		return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
 					     cmd->block);
 	}
-	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
-	   vf->abs_vfid, vfop->rc);
+	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop.\n", vf->abs_vfid);
 	return -ENOMEM;
 }
 

Right you are. Ack.
Thanks Dan,
Ariel

maintainer Acked-by Ariel Elior
#2 lore raw

From: "Ariel Elior" <[email protected]>
Date: Tue, 8 Jan 2013 14:50:50 +0000

Quoted 15 lines
Quoted 15 lines

-----Original Message-----
From: [email protected] [mailto:netdev- [email protected]] On Behalf Of Dan Carpenter
Sent: Tuesday, January 08, 2013 3:42 PM
To: Eilon Greenstein
Cc: [email protected]; [email protected]; kernel- [email protected]
Subject: [patch] bnx2x: NULL dereference on error in debug code

"vfop" is NULL here. I've changed the debugging to not use it.

---
Only needed in linux-next.

Quoted 16 lines
Quoted 6 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +0 -0
index 71fcef0..3eef972 100644

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp, · line 469

Quoted 9 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -2
@@ -463,8 +463,7 @@ static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
 		return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
 					     cmd->block);
 	}
-	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
-	   vf->abs_vfid, vfop->rc);
+	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop.\n", vf->abs_vfid);
 	return -ENOMEM;
 }
 

Right you are. Ack.

This is not the correct way to ack a patch, this is:

#3 lore raw
In reply to Dan Carpenter
Quoted 31 lines

-----Original Message-----
From: [email protected] [mailto:netdev- [email protected]] On Behalf Of Dan Carpenter
Sent: Tuesday, January 08, 2013 3:42 PM
To: Eilon Greenstein
Cc: [email protected]; [email protected]; kernel- [email protected]
Subject: [patch] bnx2x: NULL dereference on error in debug code

"vfop" is NULL here. I've changed the debugging to not use it.

---
Only needed in linux-next.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -3
index 71fcef0..3eef972 100644
@@ -463,8 +463,7 @@ static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
 		return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
 					     cmd->block);
 	}
-	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
-	   vf->abs_vfid, vfop->rc);
+	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop.\n", vf->abs_vfid);
 	return -ENOMEM;
 }
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

And now acking it properly.
Acked-by Ariel Elior <[email protected]>

Acked-by on v1 1/1
#4 lore raw
In reply to Dan Carpenter
Quoted 31 lines

-----Original Message-----
From: [email protected] [mailto:netdev- [email protected]] On Behalf Of Dan Carpenter
Sent: Tuesday, January 08, 2013 3:42 PM
To: Eilon Greenstein
Cc: [email protected]; [email protected]; kernel- [email protected]
Subject: [patch] bnx2x: NULL dereference on error in debug code

"vfop" is NULL here. I've changed the debugging to not use it.

---
Only needed in linux-next.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -3
index 71fcef0..3eef972 100644
@@ -463,8 +463,7 @@ static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
 		return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
 					     cmd->block);
 	}
-	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
-	   vf->abs_vfid, vfop->rc);
+	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop.\n", vf->abs_vfid);
 	return -ENOMEM;
 }
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html