Received: by 10.213.65.68 with SMTP id h4csp1815021imn; Thu, 29 Mar 2018 11:32:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49OHLM2eFQm1xf3v64Xj0EZ5qamLzOu7f3G2wxsO60h8ipCn2UCXyaMfXYmetU7ZQnM4lCf X-Received: by 10.98.144.205 with SMTP id q74mr7232764pfk.55.1522348351238; Thu, 29 Mar 2018 11:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522348351; cv=none; d=google.com; s=arc-20160816; b=FDwe8FWImv8OJ2auAAUK2I8mgbjwNNJruc1lQslkOqf/gJJMmvVFrZj7gyoB6cKIZA ZO3q/t0ikv9kbR5L1oHbkFQfrGhSt3EzvHtekatgUt7E9T/JrrcnnraB/l57dWpXU7uH ECMFW5knhfM8O8tvdTM3vx+g7REHfFbVgcvdHBvL4Utxa2ZS7u+PTh0fjF7zR+ADst/Q itjTtHPHKwHag10UA6QAD4BIaFipmjRAsjHmGIz5ARH5OAwMYJaS6VLJn8xDTA7ZPsvI lmX5oI910DcClYBqX88sXMPNd9hwR2aI5lIPXkWJdMuEKfsxKXDKdRYCgGsq+FdCdUN/ LU5w== 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=ngVM8jCHkPWCZ6a4IHIMXxAO0h630w+n0cJBneMxVvI=; b=SbES8C+qL67hcz9jkyOtePpidFYKr3c7TV5j2+4aKQO/1yBYkAEeXGgB3keTLZRkoc jtA6QxQYK5zJiMlhIUhHgCM+UuxXH/aCJwhHovK8Ni0nDCKquKIaYKw6pwHjcXXQOadv xbt3F6JL+iZr5uMiOp6af4witM8uJzZi7PU+eF/+20HRehZLsFjH+Lb5SZzag+R3cTQ5 LRxB7dk/Tu9Ke4E/AZ/73HI0/cyNvYwzP8CwGFNBACCq17fMdeJWszw4YvwbAYDmZopz QHjU+Vl/haSVw5wdCxDP+vFI/kvfXvmsLxbuobVGmAaDk9b6Q3rCkQQaiCGCiu37GxAl duPw== 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 t16-v6si6113434plo.358.2018.03.29.11.32.17; Thu, 29 Mar 2018 11:32:31 -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 S1753091AbeC2SEA (ORCPT + 99 others); Thu, 29 Mar 2018 14:04:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58676 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752195AbeC2SD6 (ORCPT ); Thu, 29 Mar 2018 14:03:58 -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 34F97C48; Thu, 29 Mar 2018 18:03:57 +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.15 46/47] skbuff: Fix not waking applications when errors are enqueued Date: Thu, 29 Mar 2018 20:00:27 +0200 Message-Id: <20180329175733.378608317@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180329175729.225211114@linuxfoundation.org> References: <20180329175729.225211114@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.15-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 @@ -4173,7 +4173,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);