From: Wen Gong <wgong@codeaurora.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
ath11k@lists.infradead.org
Subject: Re: [PATCH v2] net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue
Date: Mon, 06 Jan 2020 10:04:25 +0800 [thread overview]
Message-ID: <2540a09c73dd896bb793924275bdab0e@codeaurora.org> (raw)
In-Reply-To: <20200105.144704.221506192255563950.davem@davemloft.net>
On 2020-01-06 06:47, David Miller wrote:
> From: Wen Gong <wgong@codeaurora.org>
> Date: Fri, 3 Jan 2020 12:50:16 +0800
>
>> The len used for skb_put_padto is wrong, it need to add len of hdr.
>
> Thanks, applied.
>
> There is another bug here, skb_put_padto() returns an error and frees
> the SKB when the put fails. There really needs to be a check here,
> because currently the code right now will keep using the freed up
> skb in that situation.
>
Thanks David.
Yes, __skb_put_padto will return -ENOMEM if __skb_pad fail.
I think it can return the same error immediately and do not do the next
steps in qrtr_node_enqueue.
> Thanks.
next prev parent reply other threads:[~2020-01-06 2:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 4:50 [PATCH v2] net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue Wen Gong
2020-01-05 22:47 ` David Miller
2020-01-06 2:04 ` Wen Gong [this message]
2020-02-25 22:52 ` Doug Anderson
2020-02-27 4:28 ` David Miller
2020-03-17 10:26 ` Greg KH
2020-03-17 15:45 ` Doug Anderson
2020-03-19 7:46 ` Greg KH
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=2540a09c73dd896bb793924275bdab0e@codeaurora.org \
--to=wgong@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).