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?

Bill Hawes (whawes@star.net)
Sat, 07 Mar 1998 21:41:45 -0500

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Trevor Johnson: "Re: 2GB physical memory on an Intel/Linux box"
- Previous message: Mr. James W. Laferriere Network Engineer: "Re: [FAQ] How to delete stubborn files [was Re: 2.1.88 E2FS Problems]"
- Maybe in reply to: Bill Hawes: "bug in 2.1.89 include/net/sock.h?"

Alan Cox wrote:
> I dont believe this is correct. The packet will be freed if the filter fails
> and this itself will correct the memory count for the packet.

Hi Alan,

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,
but unless the filtering code specifically needs the skb to be assigned to a
socket, it makes more sense to me not to set the sock ownership until we're sure
the skb will be queued there.

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

Regards,
Bill

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

- Next message: Trevor Johnson: "Re: 2GB physical memory on an Intel/Linux box"
- Previous message: Mr. James W. Laferriere Network Engineer: "Re: [FAQ] How to delete stubborn files [was Re: 2.1.88 E2FS Problems]"
- Maybe in reply to: Bill Hawes: "bug in 2.1.89 include/net/sock.h?"