Re: [PATCH] sctp: Fix sk_buff leak when receiving a datagram

2020-06-13 Thread Neil Horman
On Sat, Jun 13, 2020 at 08:39:25PM +0800, Xiyu Yang wrote: > In sctp_skb_recv_datagram(), the function fetch a sk_buff object from > the receiving queue to "skb" by calling skb_peek() or __skb_dequeue() > and return its reference to the caller. > > However, when calling __skb_dequeue() successfull

[PATCH] sctp: Fix sk_buff leak when receiving a datagram

2020-06-13 Thread Xiyu Yang
In sctp_skb_recv_datagram(), the function fetch a sk_buff object from the receiving queue to "skb" by calling skb_peek() or __skb_dequeue() and return its reference to the caller. However, when calling __skb_dequeue() successfully, the function forgets to hold a reference count of the "skb" object