All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, Chris Lew <clew@codeaurora.org>
Subject: [PATCH v2 1/7] net: qrtr: Invoke sk_error_report() after setting sk_err
Date: Tue, 10 Oct 2017 23:45:17 -0700	[thread overview]
Message-ID: <20171011064523.7902-2-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20171011064523.7902-1-bjorn.andersson@linaro.org>

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 notification with
its own callback.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- None

 net/qrtr/qrtr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index c2f5c13550c0..7e4b49a8349e 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);
-- 
2.12.0

  reply	other threads:[~2017-10-11  6:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  6:45 [PATCH v2 0/7] net: qrtr: Fixes and support receiving version 2 packets Bjorn Andersson
2017-10-11  6:45 ` Bjorn Andersson [this message]
2017-10-11  6:45 ` [PATCH v2 2/7] net: qrtr: Move constants to header file Bjorn Andersson
2017-10-11  6:45 ` [PATCH v2 3/7] net: qrtr: Add control packet definition to uapi Bjorn Andersson
2017-10-11  6:45 ` [PATCH v2 4/7] net: qrtr: Pass source and destination to enqueue functions Bjorn Andersson
2017-10-11  6:45 ` [PATCH v2 5/7] net: qrtr: Clean up control packet handling Bjorn Andersson
2017-10-11  6:45 ` [PATCH v2 6/7] net: qrtr: Use sk_buff->cb in receive path Bjorn Andersson
2017-10-11  6:45 ` [PATCH v2 7/7] net: qrtr: Support decoding incoming v2 packets Bjorn Andersson
2017-10-11 22:38 ` [PATCH v2 0/7] net: qrtr: Fixes and support receiving version 2 packets David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171011064523.7902-2-bjorn.andersson@linaro.org \
    --to=bjorn.andersson@linaro.org \
    --cc=clew@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.