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

Re: [Xen-devel] [PATCH net v4] xen-netback: fix fragment detection in checksum setup



On Tue, Dec 03, 2013 at 02:05:17PM +0000, Paul Durrant wrote:
[...]
> > >
> > > - header_size = skb->network_header + off + MAX_IPOPTLEN;
> > > - maybe_pull_tail(skb, header_size);
> > > + if (!maybe_pull_tail(skb, sizeof(struct iphdr), MAX_IP_HDR_LEN))
> > > +         goto out;
> > > +
> > 
> > I think you need to correctly update err to reflect this failure.
> > Using -EPROTO will wrongly blame frontend while it is backend that's
> > failing to process the packet.
> > 
> 
> But a failure should only occur if the packet is malformed, so that would be 
> a frontend error wouldn't it?
> 

__pskb_pull_tail may fail due to malloc failure.

However the return value of __pskb_pull_tail cannot reflect the wether
the failure is due to malformed packet or OOM. Not sure what's the best
solution here. What's the malformed packet you were talking about?

Wei.

>   Paul

_______________________________________________
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®.