[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH -next] xen-netback: fix some error return code



On 12/16/2013 10:12 PM, Ian Campbell wrote:
> On Mon, 2013-12-16 at 21:57 +0800, Wei Yongjun wrote:
>> On 12/16/2013 09:40 PM, Ian Campbell wrote:
>>> On Mon, 2013-12-16 at 13:13 +0000, Wei Liu wrote:
>>>> On Mon, Dec 16, 2013 at 01:49:29PM +0800, Wei Yongjun wrote:
>>>>> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
>>>>>
>>>>> Fix to return -EPROTO error code instead of 0(overwrite by 
>>>>> maybe_pull_tail())
>>>>> if skb_partial_csum_set() return false.
>>>>>
>>>>> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
>>>>> ---
>>>>>  drivers/net/xen-netback/netback.c | 16 ++++++++++++----
>>>>>  1 file changed, 12 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/drivers/net/xen-netback/netback.c 
>>>>> b/drivers/net/xen-netback/netback.c
>>>>> index 800496b..b16daa7 100644
>>>>> --- a/drivers/net/xen-netback/netback.c
>>>>> +++ b/drivers/net/xen-netback/netback.c
>>>>> @@ -1108,8 +1108,10 @@ static int checksum_setup_ip(struct xenvif *vif, 
>>>>> struct sk_buff *skb,
>>>>>                   goto out;
>>>>>  
>>>>>           if (!skb_partial_csum_set(skb, off,
>>>>> -                                   offsetof(struct tcphdr, check)))
>>>>> +                                   offsetof(struct tcphdr, check))) {
>>>>> +                 err = -EPROTO;
>>>> Why is this needed? It is set to -EPROTO before the 'switch'.
>>> Agreed.
>> As I said in the description, err is overwrited to 0 by the above
>> 'err = maybe_pull_tail(...)' call in the same 'case XXX'.
>> Refer to the source code:
> What tree/commit is this? Neither Linus', net or net-next look like this
> to me.

Sorry, I used linux-next tree for this patch. It looks like the linux.git and 
net tree
has this code, but not net-next.

This commit cause this issue:
https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/drivers/net/xen-netback/netback.c?id=d52eb0d46f3606b9de9965cebb2beb2202a0dc62

So this patch is need for net tree, not net-next. I will rebased this
patch with description changed.





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.