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

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 8 Mar 1998 13:20:11 +0000 (GMT)


> 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

> I.e., if the socket has refused to queue the skb, the skb should remain
> unassigned until another socket queues it.

Right now it may seem to, but the logical extension to the socket filters is
to be able to bounce buffers through secondary queues to user space
daemons on rule matches (like Digitals firewall) at that point we need to
account first.

Alan

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