diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-10 04:43:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:21 -0500 |
commit | d3b7f69de2b92e4b6057d81e6c52f629a8663368 (patch) | |
tree | ad2ba9ef0cf024b3341b5eaf67929ee82b71701b /arch/um/include/net_kern.h | |
parent | 190c3e456325942a17785332fe15b68eeb3775ca (diff) |
[PATCH] uml: add locking to network transport registration
The registration of host network transports needed some locking. The
transport list itself is locked, but calls to the registration routines are
not. This is compensated for by checking that a transport structure is not
yet on any list.
I also took the opportunity to const all fields in the transport structure
except the list, which obviously can be modified.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include/net_kern.h')
-rw-r--r-- | arch/um/include/net_kern.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h index 218f8b47fdcd..92f76d82a6ef 100644 --- a/arch/um/include/net_kern.h +++ b/arch/um/include/net_kern.h | |||
@@ -52,12 +52,12 @@ struct net_kern_info { | |||
52 | 52 | ||
53 | struct transport { | 53 | struct transport { |
54 | struct list_head list; | 54 | struct list_head list; |
55 | char *name; | 55 | const char *name; |
56 | int (*setup)(char *, char **, void *); | 56 | int (* const setup)(char *, char **, void *); |
57 | const struct net_user_info *user; | 57 | const struct net_user_info *user; |
58 | const struct net_kern_info *kern; | 58 | const struct net_kern_info *kern; |
59 | int private_size; | 59 | const int private_size; |
60 | int setup_size; | 60 | const int setup_size; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | extern struct net_device *ether_init(int); | 63 | extern struct net_device *ether_init(int); |