aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:55:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:55:01 -0500
commitd7fc02c7bae7b1cf69269992cf880a43a350cdaa (patch)
treea43d56fa72913a1cc98a0bbebe054d08581b3a7c /net/ax25
parentee1262dbc65ce0b6234a915d8432171e8d77f518 (diff)
parent28b4d5cc17c20786848cdc07b7ea237a309776bb (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/ax25')
-rw-r--r--net/ax25/af_ax25.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index f45460730371..5588ba69c468 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -369,6 +369,9 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
369 if (ax25_ctl.digi_count > AX25_MAX_DIGIS) 369 if (ax25_ctl.digi_count > AX25_MAX_DIGIS)
370 return -EINVAL; 370 return -EINVAL;
371 371
372 if (ax25_ctl.arg > ULONG_MAX / HZ && ax25_ctl.cmd != AX25_KILL)
373 return -EINVAL;
374
372 digi.ndigi = ax25_ctl.digi_count; 375 digi.ndigi = ax25_ctl.digi_count;
373 for (k = 0; k < digi.ndigi; k++) 376 for (k = 0; k < digi.ndigi; k++)
374 digi.calls[k] = ax25_ctl.digi_addr[k]; 377 digi.calls[k] = ax25_ctl.digi_addr[k];
@@ -418,14 +421,10 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
418 break; 421 break;
419 422
420 case AX25_T3: 423 case AX25_T3:
421 if (ax25_ctl.arg < 0)
422 goto einval_put;
423 ax25->t3 = ax25_ctl.arg * HZ; 424 ax25->t3 = ax25_ctl.arg * HZ;
424 break; 425 break;
425 426
426 case AX25_IDLE: 427 case AX25_IDLE:
427 if (ax25_ctl.arg < 0)
428 goto einval_put;
429 ax25->idle = ax25_ctl.arg * 60 * HZ; 428 ax25->idle = ax25_ctl.arg * 60 * HZ;
430 break; 429 break;
431 430
@@ -800,12 +799,13 @@ static struct proto ax25_proto = {
800 .obj_size = sizeof(struct sock), 799 .obj_size = sizeof(struct sock),
801}; 800};
802 801
803static int ax25_create(struct net *net, struct socket *sock, int protocol) 802static int ax25_create(struct net *net, struct socket *sock, int protocol,
803 int kern)
804{ 804{
805 struct sock *sk; 805 struct sock *sk;
806 ax25_cb *ax25; 806 ax25_cb *ax25;
807 807
808 if (net != &init_net) 808 if (!net_eq(net, &init_net))
809 return -EAFNOSUPPORT; 809 return -EAFNOSUPPORT;
810 810
811 switch (sock->type) { 811 switch (sock->type) {
@@ -1961,7 +1961,7 @@ static const struct file_operations ax25_info_fops = {
1961 1961
1962#endif 1962#endif
1963 1963
1964static struct net_proto_family ax25_family_ops = { 1964static const struct net_proto_family ax25_family_ops = {
1965 .family = PF_AX25, 1965 .family = PF_AX25,
1966 .create = ax25_create, 1966 .create = ax25_create,
1967 .owner = THIS_MODULE, 1967 .owner = THIS_MODULE,