Linux-kernel mailing list archive 1998-10,: Re: bug in 2.1.89 include/net/sock.h?

# Re: bug in 2.1.89 include/net/sock.h?

A.N.Kuznetsov (kuznet@ms2.inr.ac.ru)
Sun, 8 Mar 1998 18:06:15 +0300 (MSK)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: MOLNAR Ingo: "Re: Oops: 0000 (2.1.89)"
- Previous message: Pavel Machek: "Re: Idea: flink() and anon_open()"
- In reply to: Alan Cox: "Re: bug in 2.1.89 include/net/sock.h?"
- Next in thread: A.N.Kuznetsov: "Fixes for 2.1.89"

Hello!

> > There are some places where the skb->sk pointer is cleared before calling
> > kfree_skb after a sock_queue_rcv_skb failure, so in this case the memory space
> > would not get credited back to the socket. I'm not sure which is the error here,
>
> Those are the places that are bugs. Setting skb->sk=NULL is a bad thing to be doing
> in 2.1.x (it made sense in 2.0). Probably we need skb_disown(skb) to be sure
> behaviour is always right

It exists (skb_orphan(skb)) and widely used by inet.
Actually, I tried to fix all the places, where skb->sk=NULL construction
was used, but probably missed something, especially in protocols
different of IPv[46].

Alexey Kuznetsov

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

- Next message: MOLNAR Ingo: "Re: Oops: 0000 (2.1.89)"
- Previous message: Pavel Machek: "Re: Idea: flink() and anon_open()"
- In reply to: Alan Cox: "Re: bug in 2.1.89 include/net/sock.h?"
- Next in thread: A.N.Kuznetsov: "Fixes for 2.1.89"