From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AIpwx48kUbvyx6S0Xa9QCFM3Vx0bFXXmv+nioimlI7hVrQIg9NBZaltY+FsMzwkUB5ZgFVVxrTe1 ARC-Seal: i=1; a=rsa-sha256; t=1523021161; cv=none; d=google.com; s=arc-20160816; b=kF4MIEjWW+rQRSOuTah87iOGDiM4Zr8n+DGSZUKPxpdZdVuI/U01HSWDMT9N9kmDI+ kKbdLkEEuMb23d8RlST2Zan1QG2VcIdXCVydxPdxHfHF9H4YuyJmPOxj2KNxUSXGg5Rx N+e/O+u5WICrRNheVng3v5B4DTN4z/vl0MWKAzu5v/lN4kcNnBI70nQWaPp9g9SQsSHr /srrMVe78U0ANdNqKy/BIcAmcuIXLHJWwQ+kf5nCYgTpbLgQHOPibTLHl5D6ob+A/bSh 5zk8Vwl+agSSF6iWEkoHF+8IxtyTJSutXXz7zofezaEdkn/RK6xJyIpEGvxPeHvyGuy9 0dxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=58FJLWE0c1hOctHuPHmbJFoJCuKjZAg/S8itUEc8PDo=; b=ZmliE6EW/ZluPhYiVpDdUChqC19uii27RDSu/OogDdfKbqYZF1oRV7f1SBrufiTvwf mzbTmTG1RHewvHzSflsrOk9SIoPatvdYxLVvTRjZqdD+cRpfUd5bwJLXsHmAKki3zv3c CXrAxwbe6p5CI75Bia1s72vW8VbGVDGazX8Bce16hoNNx2wYOPYnoeYooEnDp+zjUO7V 5a3deqi/hcyIoh04Yo65wnUZETEetad8qW4OlTWH8/eLZ8bLjTh1FeWR+Q745udCDWin uPs8/qq9Eht31oj6+/76NKyAUKzZmCrHHyc0lz36D3IK1nUnVdaoP6fZx2fpdpK77Tah Y2Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Randy E. Witt" , Eric Dumazet , Vinicius Costa Gomes , "David S. Miller" Subject: [PATCH 3.18 30/93] skbuff: Fix not waking applications when errors are enqueued Date: Fri, 6 Apr 2018 15:22:59 +0200 Message-Id: <20180406084226.271456575@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084224.918716300@linuxfoundation.org> References: <20180406084224.918716300@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1597003437570211955?= X-GMAIL-MSGID: =?utf-8?q?1597003437570211955?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vinicius Costa Gomes [ Upstream commit 6e5d58fdc9bedd0255a8781b258f10bbdc63e975 ] 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 Reviewed-by: Eric Dumazet Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3527,7 +3527,7 @@ int sock_queue_err_skb(struct sock *sk, 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);