Message ID | 20170804145938.25427-2-bjorn.andersson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp2265797qge; Fri, 4 Aug 2017 07:59:53 -0700 (PDT) X-Received: by 10.98.135.141 with SMTP id i135mr2740465pfe.254.1501858793519; Fri, 04 Aug 2017 07:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501858793; cv=none; d=google.com; s=arc-20160816; b=HVb6zjxqCjyRQLNq2/3PG8XOzjBAB9poRPVGa6lps/p6r1xpEyx6MhpKcWvfyLUzDm YjMBRg/kZrfA26JhLGFKLIcrhQgY0J9Z6oWJ+1EusmLBUIowkkxcEx8jE3tnEVLLvjEB MtCW8ZqVzQXkHXXIM9Y3OC8tMxMxlfATxdQGPo6MqmUlm68l3MbMPvsMYsMSPyL9J/cy /f3Nnw86fPn/UVQYq6xbfeoJNRGR00eXUg28SybD4YrYmt3mZEgVmF71HatGiK41MWsx SmlxN8/3oJkVmuDVdPtqHE3J7EHub+7l/hns7DlhhCoXy1gDJL7cbyFd/LuRr+oPr57P bv1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sdMC2DzGK8m3h+gvGjy6vv3jNFwxh9JXka0nOM+ABsg=; b=wupcYwqDr6LsH1fvCJJvBWc17fh2IOdnBm3lxXxgwl1ihxbyJGTBnuE2xCnS8RBPeP w1c69RepDdMHER7iJj2yLLbRAXPxqnc0EL5HalSCjToq37ZVyzvtc2PlhFsnr1sTVuJ/ vi9GbRoLN5sPZ9sh3RMUhMxYTBKRzCGe2rUEWOVx6ehQgx8EO9YX1qXkRSiBgm8neQMs fCNgok0uORaqg8Bze+lfmVGgMh8zYK/rqUqz4bS7xQv1cbmrTzATC2+rCTyM+BXHQHzQ IDnnOZowediwuozsZCBbnnTfwfx5fST9VmyDSECsSLwwTpZX00tYbAWmmTG5SgvwO/yz VmGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=E0HSLM6m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si1335004pld.380.2017.08.04.07.59.53; Fri, 04 Aug 2017 07:59:53 -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; dkim=pass header.i=@linaro.org header.b=E0HSLM6m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752763AbdHDO7r (ORCPT <rfc822;rob.herring@linaro.org> + 25 others); Fri, 4 Aug 2017 10:59:47 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35290 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752248AbdHDO7o (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Aug 2017 10:59:44 -0400 Received: by mail-pf0-f170.google.com with SMTP id t86so8915064pfe.2 for <linux-kernel@vger.kernel.org>; Fri, 04 Aug 2017 07:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sdMC2DzGK8m3h+gvGjy6vv3jNFwxh9JXka0nOM+ABsg=; b=E0HSLM6m0YJoMQwLWtoJYMN6ZgtXXjL8Q0v4pR6c2zs4AmQlRDwh+FZoKlRGlvuFpl XmiCodSXHR65b9N9WCJ0tlzUvaa1d0OaiI6YhqHtWJj/1xGTx4phesY9QbnFFk9VlmwI mqv5CoTUhrQ4gnRkvs2X71qLoynWPmh5WvHbU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sdMC2DzGK8m3h+gvGjy6vv3jNFwxh9JXka0nOM+ABsg=; b=kZ8tmZ2ontAyVaEHnMpTV+d34kXuP+I265DxPFld6c4u2j5iDL5r7bO3zGm4lEzas3 kRIpGCR+R2YIr+5WCS1i3sA0ksPhbeW4QojsWliCeb83PnKx99X+yF8LFeGeGHfyXJIL Z6YNT90j98eqrgZWf7mGWs9oGcGcYoG+bwQJB3fvhZtpJqBslR7xdV5GbvVzqhdUjm8k PKyikZlL+dBgGUjD7UQ5MZPQnu+FlhOlu4hCKUGjeTIUFPlMyeBihya3r5hvERTZvelA mLix89P0W+w7X2THlSAG30xhLeJwPtnYliqltqRBRxdTSEaVe7GUDL8NL2hlotwKtBAf CDUw== X-Gm-Message-State: AIVw112OEDSrsQHZA6lkMFLqhKraL7gO7yAe6K4PxblPmL9Zg9+5OEuZ Pqk5vkNMMDGBPHAO X-Received: by 10.84.141.131 with SMTP id 3mr3264436plv.224.1501858783698; Fri, 04 Aug 2017 07:59:43 -0700 (PDT) Received: from localhost.localdomain (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79]) by smtp.gmail.com with ESMTPSA id q24sm3584283pgc.61.2017.08.04.07.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 07:59:43 -0700 (PDT) From: Bjorn Andersson <bjorn.andersson@linaro.org> To: "David S. Miller" <davem@davemloft.net>, Andy Gross <andy.gross@linaro.org>, David Brown <david.brown@linaro.org> Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] net: qrtr: Invoke sk_error_report() after setting sk_err Date: Fri, 4 Aug 2017 07:59:33 -0700 Message-Id: <20170804145938.25427-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170804145938.25427-1-bjorn.andersson@linaro.org> References: <20170804145938.25427-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[1/6] net: qrtr: Invoke sk_error_report() after setting sk_err
|
expand
|
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 5586609afa27..2058b27821a4 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -541,7 +541,7 @@ static void qrtr_reset_ports(void) sock_hold(&ipc->sk); ipc->sk.sk_err = ENETRESET; - wake_up_interruptible(sk_sleep(&ipc->sk)); + ipc->sk.sk_error_report(&ipc->sk); sock_put(&ipc->sk); } mutex_unlock(&qrtr_port_lock);
Rather than manually waking up any context sleeping on the sock to signal an error we should call sk_error_report(). This has the added benefit that in-kernel consumers can override this notificatino with its own callback. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> --- net/qrtr/qrtr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.12.0