diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 20:13:53 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 20:13:53 +0200 |
commit | ec8dab36e0738d3059980d144e34f16a26bbda7d (patch) | |
tree | d1854559838c4ac228c9586faae44625c08d30ba /net/bluetooth/bnep | |
parent | a0c22f226502be6eab37a1d9bf6fb0fadf551376 (diff) | |
download | kernel_samsung_smdk4412-ec8dab36e0738d3059980d144e34f16a26bbda7d.zip kernel_samsung_smdk4412-ec8dab36e0738d3059980d144e34f16a26bbda7d.tar.gz kernel_samsung_smdk4412-ec8dab36e0738d3059980d144e34f16a26bbda7d.tar.bz2 |
[Bluetooth] Signal user-space for HIDP and BNEP socket errors
When using the HIDP or BNEP kernel support, the user-space needs to
know if the connection has been terminated for some reasons. Wake up
the application if that happens. Otherwise kernel and user-space are
no longer on the same page and weird behaviors can happen.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/bnep')
-rw-r--r-- | net/bluetooth/bnep/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index f85d946..24e91eb 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -507,6 +507,11 @@ static int bnep_session(void *arg) /* Delete network device */ unregister_netdev(dev); + /* Wakeup user-space polling for socket errors */ + s->sock->sk->sk_err = EUNATCH; + + wake_up_interruptible(s->sock->sk->sk_sleep); + /* Release the socket */ fput(s->sock->file); |