diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:55:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:55:01 -0500 |
commit | d7fc02c7bae7b1cf69269992cf880a43a350cdaa (patch) | |
tree | a43d56fa72913a1cc98a0bbebe054d08581b3a7c /net/llc | |
parent | ee1262dbc65ce0b6234a915d8432171e8d77f518 (diff) | |
parent | 28b4d5cc17c20786848cdc07b7ea237a309776bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
mac80211: fix reorder buffer release
iwmc3200wifi: Enable wimax core through module parameter
iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
iwmc3200wifi: Coex table command does not expect a response
iwmc3200wifi: Update wiwi priority table
iwlwifi: driver version track kernel version
iwlwifi: indicate uCode type when fail dump error/event log
iwl3945: remove duplicated event logging code
b43: fix two warnings
ipw2100: fix rebooting hang with driver loaded
cfg80211: indent regulatory messages with spaces
iwmc3200wifi: fix NULL pointer dereference in pmkid update
mac80211: Fix TX status reporting for injected data frames
ath9k: enable 2GHz band only if the device supports it
airo: Fix integer overflow warning
rt2x00: Fix padding bug on L2PAD devices.
WE: Fix set events not propagated
b43legacy: avoid PPC fault during resume
b43: avoid PPC fault during resume
tcp: fix a timewait refcnt race
...
Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
CTL_UNNUMBERED removed) in
kernel/sysctl_check.c
net/ipv4/sysctl_net_ipv4.c
net/ipv6/addrconf.c
net/sctp/sysctl.c
Diffstat (limited to 'net/llc')
-rw-r--r-- | net/llc/af_llc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 7aa4fd170104..3a66546cad06 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -140,14 +140,17 @@ static struct proto llc_proto = { | |||
140 | 140 | ||
141 | /** | 141 | /** |
142 | * llc_ui_create - alloc and init a new llc_ui socket | 142 | * llc_ui_create - alloc and init a new llc_ui socket |
143 | * @net: network namespace (must be default network) | ||
143 | * @sock: Socket to initialize and attach allocated sk to. | 144 | * @sock: Socket to initialize and attach allocated sk to. |
144 | * @protocol: Unused. | 145 | * @protocol: Unused. |
146 | * @kern: on behalf of kernel or userspace | ||
145 | * | 147 | * |
146 | * Allocate and initialize a new llc_ui socket, validate the user wants a | 148 | * Allocate and initialize a new llc_ui socket, validate the user wants a |
147 | * socket type we have available. | 149 | * socket type we have available. |
148 | * Returns 0 upon success, negative upon failure. | 150 | * Returns 0 upon success, negative upon failure. |
149 | */ | 151 | */ |
150 | static int llc_ui_create(struct net *net, struct socket *sock, int protocol) | 152 | static int llc_ui_create(struct net *net, struct socket *sock, int protocol, |
153 | int kern) | ||
151 | { | 154 | { |
152 | struct sock *sk; | 155 | struct sock *sk; |
153 | int rc = -ESOCKTNOSUPPORT; | 156 | int rc = -ESOCKTNOSUPPORT; |
@@ -155,7 +158,7 @@ static int llc_ui_create(struct net *net, struct socket *sock, int protocol) | |||
155 | if (!capable(CAP_NET_RAW)) | 158 | if (!capable(CAP_NET_RAW)) |
156 | return -EPERM; | 159 | return -EPERM; |
157 | 160 | ||
158 | if (net != &init_net) | 161 | if (!net_eq(net, &init_net)) |
159 | return -EAFNOSUPPORT; | 162 | return -EAFNOSUPPORT; |
160 | 163 | ||
161 | if (likely(sock->type == SOCK_DGRAM || sock->type == SOCK_STREAM)) { | 164 | if (likely(sock->type == SOCK_DGRAM || sock->type == SOCK_STREAM)) { |
@@ -1092,7 +1095,7 @@ out: | |||
1092 | return rc; | 1095 | return rc; |
1093 | } | 1096 | } |
1094 | 1097 | ||
1095 | static struct net_proto_family llc_ui_family_ops = { | 1098 | static const struct net_proto_family llc_ui_family_ops = { |
1096 | .family = PF_LLC, | 1099 | .family = PF_LLC, |
1097 | .create = llc_ui_create, | 1100 | .create = llc_ui_create, |
1098 | .owner = THIS_MODULE, | 1101 | .owner = THIS_MODULE, |