rpms/kernel/F-9 linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch, NONE, 1.1 kernel.spec, 1.693, 1.694

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


Author: cebbert

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

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-75
- Fix bluetooth keyboard disconnect (#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-9/kernel.spec,v
retrieving revision 1.693
retrieving revision 1.694
diff -u -r1.693 -r1.694
--- kernel.spec	25 Jun 2008 19:29:30 -0000	1.693
+++ kernel.spec	27 Jun 2008 18:52:51 -0000	1.694
@@ -672,6 +672,8 @@
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
 
+Patch2010: linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch
+
 # atl2 network driver
 Patch2020: linux-2.6-netdev-atl2.patch
 
@@ -1231,6 +1233,9 @@
 
 ApplyPatch linux-2.6-netdev-atl2.patch
 
+# fix bluetooth kbd disconnect
+ApplyPatch linux-2.6-bluetooth-signal-userspace-for-socket-errors.patch
+
 # Nouveau DRM + drm fixes
 ApplyPatch linux-2.6-drm-git-mm.patch
 ApplyPatch nouveau-drm.patch
@@ -1853,6 +1858,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Fri Jun 27 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.9-75
+- Fix bluetooth keyboard disconnect (#449872)
+
 * Wed Jun 25 2008 John W. Linville <linville at redhat.com> 2.6.25.9-74
 - 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