* [PATCH net] skbuff: Fix not waking applications when errors are enqueued
@ 2018-03-14 20:32 Vinicius Costa Gomes
2018-03-16 16:37 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Costa Gomes @ 2018-03-14 20:32 UTC (permalink / raw)
To: netdev; +Cc: Vinicius Costa Gomes, randy.e.witt, davem, eric.dumazet
When errors are enqueued to the error queue via sock_queue_err_skb()
function, it is possible that the waiting application is not notified.
Calling 'sk->sk_data_ready()' would not notify applications that
selected only POLLERR events in poll() (for example).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Randy E. Witt <randy.e.witt@intel.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
net/core/skbuff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index baf990528943..1ea4be79c0a7 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4179,7 +4179,7 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
skb_queue_tail(&sk->sk_error_queue, skb);
if (!sock_flag(sk, SOCK_DEAD))
- sk->sk_data_ready(sk);
+ sk->sk_error_report(sk);
return 0;
}
EXPORT_SYMBOL(sock_queue_err_skb);
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] skbuff: Fix not waking applications when errors are enqueued
2018-03-14 20:32 [PATCH net] skbuff: Fix not waking applications when errors are enqueued Vinicius Costa Gomes
@ 2018-03-16 16:37 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-16 16:37 UTC (permalink / raw)
To: vinicius.gomes; +Cc: netdev, randy.e.witt, eric.dumazet
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: Wed, 14 Mar 2018 13:32:09 -0700
> When errors are enqueued to the error queue via sock_queue_err_skb()
> function, it is possible that the waiting application is not notified.
>
> Calling 'sk->sk_data_ready()' would not notify applications that
> selected only POLLERR events in poll() (for example).
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reported-by: Randy E. Witt <randy.e.witt@intel.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Applied and queued up for -stable, thank you.
Since this is going into 'net', it doesn't need to be in your net-next
submission as 'net' changes will (eventually) propagate into net-next.
Please fix that up, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-16 16:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-14 20:32 [PATCH net] skbuff: Fix not waking applications when errors are enqueued Vinicius Costa Gomes
2018-03-16 16:37 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox