Received: by 10.213.65.68 with SMTP id h4csp1805382imn; Thu, 29 Mar 2018 11:21:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+C0yCASH0zXM+ORb5mqz3co7hXlOvcYWrP/x7Mb/veOiVedNJDazfpsEzlpfFcOk3xRJgi X-Received: by 2002:a17:902:549:: with SMTP id 67-v6mr9789558plf.276.1522347699218; Thu, 29 Mar 2018 11:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522347699; cv=none; d=google.com; s=arc-20160816; b=VUyrE6lLym6nsYH8Y9lMiQh1KJRbZhiLZ7c3/MdXl5ZUZDQECKej1m9VVBdFqiknhC LFOUntxaYDshcRQVlM8gyS0AKi2zRc83PLThNFO0bikMmZI5cZOiiM4zmG51/sXndtRi UD02x+07vrD5TmJpod2nvM58yXFsiyp9D1RBbfNK5pxY1cRXQDdnr26NiG29YBKmRRU2 eEhPM2EOh0bSCnweioW39jzWOrZBNCz6q4m4WNzg8/ojeZXiYyi7We/5M+gLQXhg49Gg ued03cmhR9pUpE96VLKlNAj5Pew9rMHAFURoZb9vw5UuQjWcErWQiElNSCDSgFgvFtGL zOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JE5CniyYBK3S6xWi16DAMfkWFg1rOMagbT6Y3tl1GSg=; b=RWuKAu4HbmugePZN1QpUg1HaXtT1/VDTdeFxtVSgunpYuTrwn+ueB05BE3agowi1b3 M7URT5lH4mFhdCsyJeNtlr5wJIWoWlccpzeHVErFpCFR2vyiVdv/ZtS+fhFfo0PxVLie 0Ch/t/X7DyfllE83JHDKJGA7mAf9mtPtoNWfy2g+f4Nkbq1WKMYxZ4cUf7gcdpk9+RVe A86il6i8XBL3XZYkFdkQ9zENyHcJ0XxSNApFV/R6Dss+oELcwPf4o27BviwP9OwTmW+0 PBO2G+njEPgnuYfnJ0GDC3622oZ1qZFeCgVKDBEpOVzfWiN+Uqofr0CZ74ALNCaKqr07 BTFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si954236pfg.376.2018.03.29.11.21.24; Thu, 29 Mar 2018 11:21:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753793AbeC2SGm (ORCPT + 99 others); Thu, 29 Mar 2018 14:06:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59714 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753376AbeC2SGk (ORCPT ); Thu, 29 Mar 2018 14:06:40 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 64F448DC; Thu, 29 Mar 2018 18:06:39 +0000 (UTC) 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 4.9 19/28] skbuff: Fix not waking applications when errors are enqueued Date: Thu, 29 Mar 2018 20:00:38 +0200 Message-Id: <20180329175735.582981722@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180329175733.447823703@linuxfoundation.org> References: <20180329175733.447823703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-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 @@ -3717,7 +3717,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);