Hello!
On 31.10.2019 9:47, Christophe JAILLET wrote:
Use '__skb_queue_purge()' instead of re-implementing it.
In don't see that double underscore below...
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
net/vmw_vsock/af_vsock.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 2ab43b2bba31..2983dc92ca63 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
[...]
@@ -662,8 +661,7 @@ static void __vsock_release(struct sock *sk, int level)
sock_orphan(sk);
sk->sk_shutdown = SHUTDOWN_MASK;
- while ((skb = skb_dequeue(&sk->sk_receive_queue)))
- kfree_skb(skb);
+ skb_queue_purge(&sk->sk_receive_queue);
/* Clean up any sockets that never were accepted. */
while ((pending = vsock_dequeue_accept(sk)) != NULL) {
MBR, Sergei