aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/connector.h
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2010-02-02 18:58:48 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-02 18:58:48 -0500
commitf98bfbd78c37c5946cc53089da32a5f741efdeb7 (patch)
tree885c756a95f28d4d00868f6eb06ab9c45f11b2e2 /include/linux/connector.h
parenta4c89051c83693e6cd5655b90300ec23a35e04f1 (diff)
connector: Delete buggy notification code.
On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote: > > There are at least two ways to fix it: using a big cannon and a small > > one. The former way is to disable notification registration, since it is > > not used by anyone at all. Second way is to check whether calling > > process is root and its destination group is -1 (kind of priveledged > > one) before command is dispatched to workqueue. > > Well if no one is using it, removing it makes the most sense, right? > > No objection from me, care to make up a patch either way for this? Getting it is not used, let's drop support for notifications about (un)registered events from connector. Another option was to check credentials on receiving, but we can always restore it without bugs if needed, but genetlink has a wider code base and none complained, that userspace can not get notification when some other clients were (un)registered. Kudos for Sebastian Krahmer <krahmer@suse.de>, who found a bug in the code. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/connector.h')
-rw-r--r--include/linux/connector.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 72ba63eb83c5..3a779ffba60b 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -24,9 +24,6 @@
24 24
25#include <linux/types.h> 25#include <linux/types.h>
26 26
27#define CN_IDX_CONNECTOR 0xffffffff
28#define CN_VAL_CONNECTOR 0xffffffff
29
30/* 27/*
31 * Process Events connector unique ids -- used for message routing 28 * Process Events connector unique ids -- used for message routing
32 */ 29 */
@@ -75,30 +72,6 @@ struct cn_msg {
75 __u8 data[0]; 72 __u8 data[0];
76}; 73};
77 74
78/*
79 * Notify structure - requests notification about
80 * registering/unregistering idx/val in range [first, first+range].
81 */
82struct cn_notify_req {
83 __u32 first;
84 __u32 range;
85};
86
87/*
88 * Main notification control message
89 * *_notify_num - number of appropriate cn_notify_req structures after
90 * this struct.
91 * group - notification receiver's idx.
92 * len - total length of the attached data.
93 */
94struct cn_ctl_msg {
95 __u32 idx_notify_num;
96 __u32 val_notify_num;
97 __u32 group;
98 __u32 len;
99 __u8 data[0];
100};
101
102#ifdef __KERNEL__ 75#ifdef __KERNEL__
103 76
104#include <asm/atomic.h> 77#include <asm/atomic.h>
@@ -151,11 +124,6 @@ struct cn_callback_entry {
151 u32 seq, group; 124 u32 seq, group;
152}; 125};
153 126
154struct cn_ctl_entry {
155 struct list_head notify_entry;
156 struct cn_ctl_msg *msg;
157};
158
159struct cn_dev { 127struct cn_dev {
160 struct cb_id id; 128 struct cb_id id;
161 129