rpms/kernel/F-8 linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch, NONE, 1.1 kernel.spec, 1.478, 1.479

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Fri Jun 27 18:53:55 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31394

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch 
Log Message:
* Fri Jun 27 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.9-39
- Fix bluetooth keyboard disconnect (F9#449872)


linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch:

--- NEW FILE linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch ---
From: Marcel Holtmann <marcel at holtmann.org>
Date: Thu, 26 Jun 2008 20:15:15 +0000 (+0200)
Subject: [Bluetooth] Signal user-space for HIDP and BNEP socket errors
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fholtmann%2Fbluetooth-2.6.git;a=commitdiff_plain;h=c14bf10817f09ffc15e7f16e97d8119cd04c3ca8

[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 at holtmann.org>
---

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);
 
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 519cdb9..96434d7 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -581,6 +581,12 @@ static int hidp_session(void *arg)
 		hid_free_device(session->hid);
 	}
 
+	/* Wakeup user-space polling for socket errors */
+	session->intr_sock->sk->sk_err = EUNATCH;
+	session->ctrl_sock->sk->sk_err = EUNATCH;
+
+	hidp_schedule(session);
+
 	fput(session->intr_sock->file);
 
 	wait_event_timeout(*(ctrl_sk->sk_sleep),
@@ -879,6 +885,10 @@ int hidp_del_connection(struct hidp_conndel_req *req)
 			skb_queue_purge(&session->ctrl_transmit);
 			skb_queue_purge(&session->intr_transmit);
 
+			/* Wakeup user-space polling for socket errors */
+			session->intr_sock->sk->sk_err = EUNATCH;
+			session->ctrl_sock->sk->sk_err = EUNATCH;
+
 			/* Kill session thread */
 			atomic_inc(&session->terminate);
 			hidp_schedule(session);


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.478
retrieving revision 1.479
diff -u -r1.478 -r1.479
--- kernel.spec	26 Jun 2008 19:29:52 -0000	1.478
+++ kernel.spec	27 Jun 2008 18:52:40 -0000	1.479
@@ -657,6 +657,7 @@
 Patch721: linux-2.6-netdev-e1000-disable-alpm.patch
 Patch725: linux-2.6-netdev-atl2.patch
 Patch727: linux-2.6-e1000-ich9.patch
+Patch728: linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch
 
 Patch768: linux-2.6-acpi-fix-sizeof.patch
 Patch769: linux-2.6-acpi-fix-error-with-external-methods.patch
@@ -1183,6 +1184,8 @@
 ApplyPatch linux-2.6-e1000-ich9.patch
 # add atl2 network driver for eeepc
 ApplyPatch linux-2.6-netdev-atl2.patch
+# fix bluetooth kbd disconnect
+ApplyPatch linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch
 
 # ACPI/PM patches
 # acpi has a bug in the sizeof function causing thermal panics (from 2.6.26)
@@ -1821,6 +1824,9 @@
 
 
 %changelog
+* Fri Jun 27 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.9-39
+- Fix bluetooth keyboard disconnect (F9#449872)
+
 * Wed Jun 25 2008 John W. Linville <linville at redhat.com> 2.6.25.9-38
 - Upstream wireless fixes from 2008-06-25
   (http://marc.info/?l=linux-wireless&m=121440912502527&w=2)




More information about the fedora-extras-commits mailing list