bna: potential null dereference
Subsystems (2)
Hi,
stanse found a potential null dereference:bnad_cb_tx_cleanup
-> struct bnad_unmap_q *unmap_q = tcb->unmap_q;
-> -- tcb cannot be null now --
-> if (!tcb || (!tcb->unmap_q))
The thing is I have no idea whether the second parameter of cleanup may be null (move assignment after the check) or not (remove the check)
Could you fix that?
thanks,
Signature · 1 line
js
David Miller
maintainerFrom: Jiri Slaby <[email protected]>
Date: Sat, 04 Sep 2010 14:59:54 +0200
Quoted 10 lines
stanse found a potential null dereference:
bnad_cb_tx_cleanup
-> structbnad_unmap_q*unmap_q=tcb->unmap_q;
-> -- tcb cannot be null now --
-> if (!tcb || (!tcb->unmap_q))The thing is I have no idea whether the second parameter of cleanup may be null (move assignment after the check) or not (remove the check)
Could you fix that?
Since the Brocade folks can't be bothered to fix this for more than a week I'll take care of this, thanks Jiri.
A message that is not in the archive (sent off-list or not yet received): [email protected]
David Miller
maintainerFrom: Debashis Dutt <[email protected]>
Date: Sun, 12 Sep 2010 15:35:41 -0700
Quoted 2 lines
A patch is on the way by tomorrow. BTW, this is just an unnecessary check that should be removed and not a NULL de-reference.
I've already made a fix in the net-next-2.6 tree.
You should send me fixes like this when you have them and are reasonably confident of the change, which for something like this should have been a day or two at most, not a week later.
-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Sunday, September 12, 2010 3:38 PM
To: [email protected]
Cc: [email protected]; Debashis Dutt; Rasesh Mody; [email protected]; [email protected]
Subject: Re: bna: potential null dereference
From: Debashis Dutt <[email protected]>
Date: Sun, 12 Sep 2010 15:35:41 -0700
Quoted 2 lines
A patch is on the way by tomorrow. BTW, this is just an unnecessary check that should be removed and not a NULL de-reference.
I've already made a fix in the net-next-2.6 tree.
You should send me fixes like this when you have them and are reasonably confident of the change, which for something like this should have been a day or two at most, not a week later.
Sure David.
Apologize for the delay again. Had too many things on my plate. Would be more prompt hence forth.
Thanks
--Debashis