From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: David Miller <davem@davemloft.net>,
pabeni@redhat.com, edumazet@google.com,
hannes@stressinduktion.org,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
LinuxArm <linuxarm@huawei.com>,
"weiyongjun (A)" <weiyongjun1@huawei.com>
Subject: Re: [PATCH v2] iov_iter: don't revert iov buffer if csum error
Date: Sat, 29 Apr 2017 03:46:47 +0100 [thread overview]
Message-ID: <20170429024647.GO29622@ZenIV.linux.org.uk> (raw)
In-Reply-To: <d1ef9185-0956-aed9-e44b-84458cf28764@huawei.com>
On Sat, Apr 29, 2017 at 10:38:48AM +0800, Ding Tianhong wrote:
> The patch 327868212381 (make skb_copy_datagram_msg() et.al. preserve
> ->msg_iter on error) will revert the iov buffer if copy to iter
> failed, but it didn't copy any datagram if the skb_checksum_complete
> error, so no need to revert any data at this place.
The bug is real, but I would suggest a simpler fix:
if (__skb_checksum_complete(skb))
return -EINVAL;
leaving the rest as-is.
next prev parent reply other threads:[~2017-04-29 2:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-29 2:38 [PATCH v2] iov_iter: don't revert iov buffer if csum error Ding Tianhong
2017-04-29 2:46 ` Al Viro [this message]
2017-04-29 9:37 ` Ding Tianhong
2017-04-29 20:48 ` Al Viro
2017-05-01 2:52 ` David Miller
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=20170429024647.GO29622@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=weiyongjun1@huawei.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 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).