Re: [IPv4] Fix issue reported by Coverity in net/ipv4/udp.c

2005-12-02 Thread Jayachandran C.
On Fri, Dec 02, 2005 at 07:47:45AM +0100, Eric Dumazet wrote: > Herbert Xu a écrit : > >Jayachandran C. <[EMAIL PROTECTED]> wrote: [incorrect patch deleted] > > > >This is wrong. If we're peeking, we've incremented the refcount of the > >skb without taking it off the list. So if it isn't on the l

Re: [IPv4] Fix issue reported by Coverity in net/ipv4/udp.c

2005-12-02 Thread Eric Dumazet
Herbert Xu a écrit : That's a good idea. Dave, here is a patch for 2.6.16. [IP]: Simplify and consolidate MSG_PEEK error handling When a packet is obtained from skb_recv_datagram with MSG_PEEK enabled it is left on the socket receive queue. This means that when we detect a checksum error we

Re: [IPv4] Fix issue reported by Coverity in net/ipv4/udp.c

2005-12-02 Thread Herbert Xu
On Fri, Dec 02, 2005 at 07:47:45AM +0100, Eric Dumazet wrote: > > Then maybe we could just do something like that : > > if (skb == skb_peek(&sk->sk_receive_queue)) { > __skb_unlink(skb, &sk->sk_receive_queue); > atomic_dec(&skb->users); /* drop reference */ >

Re: [IPv4] Fix issue reported by Coverity in net/ipv4/udp.c

2005-12-01 Thread Eric Dumazet
Herbert Xu a écrit : Jayachandran C. <[EMAIL PROTECTED]> wrote: diff -ur linux-2.6.15-rc3-git1.clean/net/ipv4/udp.c linux-2.6.15-rc3-git1/net/ipv4/udp.c --- linux-2.6.15-rc3-git1.clean/net/ipv4/udp.c Wed Nov 30 21:55:27 2005 +++ linux-2.6.15-rc3-git1/net/ipv4/udp.cThu Dec 1 05:23:40

Re: [IPv4] Fix issue reported by Coverity in net/ipv4/udp.c

2005-12-01 Thread Herbert Xu
Jayachandran C. <[EMAIL PROTECTED]> wrote: > > diff -ur linux-2.6.15-rc3-git1.clean/net/ipv4/udp.c > linux-2.6.15-rc3-git1/net/ipv4/udp.c > --- linux-2.6.15-rc3-git1.clean/net/ipv4/udp.c Wed Nov 30 21:55:27 2005 > +++ linux-2.6.15-rc3-git1/net/ipv4/udp.cThu Dec 1 05:23:40 2005 > @@ -848,