From: "Bjørn Mork" <bjorn@mork.no>
To: Vivek Kumar Bhagat <vivek.bhagat@samsung.com>
Cc: "netdev\@vger.kernel.org" <netdev@vger.kernel.org>,
Nitin Jhanwar <nitin.j@samsung.com>,
HEMANSHU SRIVASTAVA <hemanshu.s@samsung.com>
Subject: Re: [PATCH] usbnet: dereference after null check in usbnet_start_xmit() and __usbnet_read_cmd()
Date: Thu, 20 Aug 2015 09:29:05 +0200 [thread overview]
Message-ID: <87vbcacta6.fsf@nemi.mork.no> (raw)
In-Reply-To: <317402377.314001440045815822.JavaMail.weblogic@ep2mlwas02d> (Vivek Kumar Bhagat's message of "Thu, 20 Aug 2015 04:43:35 +0000 (GMT)")
Vivek Kumar Bhagat <vivek.bhagat@samsung.com> writes:
> Dear Bjorn,
>
>>>This is wrong. There are usbnet minidrivers depending on info->tx_fixup
>>> being called with a NULL skb.
> Also, if dev_hard_start_xmit() ensures that skb can not be NULL in usbnet_start_xmit()
> then we should remove below check.
> if (skb) <--- This check is confusing which says skb can be NULL.
> skb_tx_timestamp(skb);
No, that test is there because of the ugly hack in cdc_ncm. It doesn't
go through dev_hard_start_xmit(), but calls usbnet_start_xmit() directly
with a NULL skb as a signal to itself. Yes, I told you it was ugly ;)
I do agree that it would be nice to make this go away. But until that
happens usbnet_start_xmit() has to deal with NULL skbs, forwarding them
to the tx_fixup hook.
Bjørn
next prev parent reply other threads:[~2015-08-20 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 4:43 Re: [PATCH] usbnet: dereference after null check in usbnet_start_xmit() and __usbnet_read_cmd() Vivek Kumar Bhagat
2015-08-20 7:29 ` Bjørn Mork [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-19 11:21 Vivek Kumar Bhagat
2015-08-19 11:51 ` Bjørn Mork
2015-08-19 12:03 ` Bjørn Mork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vbcacta6.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=hemanshu.s@samsung.com \
--cc=netdev@vger.kernel.org \
--cc=nitin.j@samsung.com \
--cc=vivek.bhagat@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.