Re: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread Ding Tianhong
On 2017/4/28 21:16, Sabrina Dubroca wrote: > 2017-04-28, 20:48:45 +0800, Ding Tianhong wrote: >> The patch 3278682 (make skb_copy_datagram_msg() et.al. preserve >> ->msg_iter on error) will revert the iov buffer if copy to iter >> failed, but it looks no need to revert for csum error, so fix it.

Re: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread Ding Tianhong
On 2017/4/28 21:16, Sabrina Dubroca wrote: > 2017-04-28, 20:48:45 +0800, Ding Tianhong wrote: >> The patch 3278682 (make skb_copy_datagram_msg() et.al. preserve >> ->msg_iter on error) will revert the iov buffer if copy to iter >> failed, but it looks no need to revert for csum error, so fix it.

RE: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread David Laight
From: Sabrina Dubroca > Sent: 28 April 2017 14:17 ... > > if (__skb_checksum_complete(skb)) > > - goto csum_error; > > + goto fault; > > With this patch, skb_copy_and_csum_datagram_msg() will return -EFAULT > for an incorrect checksum, that doesn't

RE: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread David Laight
From: Sabrina Dubroca > Sent: 28 April 2017 14:17 ... > > if (__skb_checksum_complete(skb)) > > - goto csum_error; > > + goto fault; > > With this patch, skb_copy_and_csum_datagram_msg() will return -EFAULT > for an incorrect checksum, that doesn't

Re: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread Sabrina Dubroca
2017-04-28, 20:48:45 +0800, Ding Tianhong wrote: > The patch 3278682 (make skb_copy_datagram_msg() et.al. preserve > ->msg_iter on error) will revert the iov buffer if copy to iter > failed, but it looks no need to revert for csum error, so fix it. > > Fixes: 3278682 ("make

Re: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread Sabrina Dubroca
2017-04-28, 20:48:45 +0800, Ding Tianhong wrote: > The patch 3278682 (make skb_copy_datagram_msg() et.al. preserve > ->msg_iter on error) will revert the iov buffer if copy to iter > failed, but it looks no need to revert for csum error, so fix it. > > Fixes: 3278682 ("make