|
From: Olov H. <ol...@us...> - 2001-03-19 12:40:54
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
sec_client.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added KERNEL as originator. This tells that the stack is going down and tha=
t there is nothing to read.
The diff of the modified file(s):
--- sec_client.c 2001/03/06 11:06:24 1.16
+++ sec_client.c 2001/03/19 12:43:11 1.17
@@ -233,7 +233,8 @@
=20
enum originator_types {
BT_SEC_MAN,
- SEC_CLIENT
+ SEC_CLIENT,
+ KERNEL
};=20
=20
struct security_query {
@@ -242,7 +243,7 @@
u8 remote_bd[6]; /* out */
u8 event_param[MAX_EVENT_DATA_LENGTH];
/* out */
- u8 originator; /* out/in BT_SEC_MAN or SEC_CLIENT */
+ u8 originator; /* out/in BT_SEC_MAN, SEC_CLIENT or KERNEL*/
u32 originator_data; /* out/in con or rfcomm struct pointer */
u16 request_result; /* in */=09
} security_query;
@@ -253,6 +254,16 @@
=20
/****************** FUNCTION DEFINITION SECTION **************************=
***/
=20=20=20
+void sec_client_shutdown()
+{
+ security_query.originator =3D KERNEL;=20=20
+#ifdef __KERNEL__
+ D_PROC("wake_up process %i (%s) awakening\n", current->pid, current->com=
m);
+ wake_up_interruptible(&sec_man_wq);
+ D_PROC("wake_up process %i (%s) woke up\n", current->pid, current->comm);
+#endif
+}
+
void=20
sec_man_init(enum security_requests user)
{
@@ -460,6 +471,12 @@
=20=09
D_PROC(FNC" Someone is trying to read % d bytes from sec proc-file\n",
count);
+
+ if (security_query.originator =3D=3D KERNEL) {
+ D_PROC(FNC"Shutdown of stack in progress, nothing to read!\n");
+ return 1;
+ }
+
cli();
if (security_query.originator !=3D BT_SEC_MAN) {
D_PROC(FNC"No response yet, going to sleep\n");
|