Skip to contentSkip to conversation

bna: potential null dereference

DISCUSSION Jiri Slaby 3 participants 4 messages Sep 4, 2010 – Sep 12, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

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
maintainer
#1 lore raw

From: 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
-> 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?

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]

maintainer
#3 lore raw

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.

#4 lore raw

-----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