diff options
-rw-r--r-- | drivers/atm/he.c | 14 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/Kconfig | 1 | ||||
-rw-r--r-- | drivers/isdn/i4l/Kconfig | 3 | ||||
-rw-r--r-- | net/ax25/af_ax25.c | 19 | ||||
-rw-r--r-- | net/bridge/br_if.c | 1 | ||||
-rw-r--r-- | net/socket.c | 7 |
6 files changed, 26 insertions, 19 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 29e66d603d3c..70667033a568 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -921,9 +921,9 @@ out_free_rbpq_base: | |||
921 | he_dev->rbrq_phys); | 921 | he_dev->rbrq_phys); |
922 | i = CONFIG_RBPL_SIZE; | 922 | i = CONFIG_RBPL_SIZE; |
923 | out_free_rbpl_virt: | 923 | out_free_rbpl_virt: |
924 | while (--i) | 924 | while (i--) |
925 | pci_pool_free(he_dev->rbps_pool, he_dev->rbpl_virt[i].virt, | 925 | pci_pool_free(he_dev->rbpl_pool, he_dev->rbpl_virt[i].virt, |
926 | he_dev->rbps_base[i].phys); | 926 | he_dev->rbpl_base[i].phys); |
927 | kfree(he_dev->rbpl_virt); | 927 | kfree(he_dev->rbpl_virt); |
928 | 928 | ||
929 | out_free_rbpl_base: | 929 | out_free_rbpl_base: |
@@ -933,11 +933,11 @@ out_free_rbpl_base: | |||
933 | out_destroy_rbpl_pool: | 933 | out_destroy_rbpl_pool: |
934 | pci_pool_destroy(he_dev->rbpl_pool); | 934 | pci_pool_destroy(he_dev->rbpl_pool); |
935 | 935 | ||
936 | i = CONFIG_RBPL_SIZE; | 936 | i = CONFIG_RBPS_SIZE; |
937 | out_free_rbps_virt: | 937 | out_free_rbps_virt: |
938 | while (--i) | 938 | while (i--) |
939 | pci_pool_free(he_dev->rbpl_pool, he_dev->rbps_virt[i].virt, | 939 | pci_pool_free(he_dev->rbps_pool, he_dev->rbps_virt[i].virt, |
940 | he_dev->rbpl_base[i].phys); | 940 | he_dev->rbps_base[i].phys); |
941 | kfree(he_dev->rbps_virt); | 941 | kfree(he_dev->rbps_virt); |
942 | 942 | ||
943 | out_free_rbps_base: | 943 | out_free_rbps_base: |
diff --git a/drivers/isdn/hardware/mISDN/Kconfig b/drivers/isdn/hardware/mISDN/Kconfig index bde55d7287fa..eadc1cd34a20 100644 --- a/drivers/isdn/hardware/mISDN/Kconfig +++ b/drivers/isdn/hardware/mISDN/Kconfig | |||
@@ -78,6 +78,7 @@ config MISDN_NETJET | |||
78 | depends on PCI | 78 | depends on PCI |
79 | select MISDN_IPAC | 79 | select MISDN_IPAC |
80 | select ISDN_HDLC | 80 | select ISDN_HDLC |
81 | select ISDN_I4L | ||
81 | help | 82 | help |
82 | Enable support for Traverse Technologies NETJet PCI cards. | 83 | Enable support for Traverse Technologies NETJet PCI cards. |
83 | 84 | ||
diff --git a/drivers/isdn/i4l/Kconfig b/drivers/isdn/i4l/Kconfig index dd744ffd240b..07c4e49f9e77 100644 --- a/drivers/isdn/i4l/Kconfig +++ b/drivers/isdn/i4l/Kconfig | |||
@@ -141,8 +141,7 @@ endmenu | |||
141 | endif | 141 | endif |
142 | 142 | ||
143 | config ISDN_HDLC | 143 | config ISDN_HDLC |
144 | tristate | 144 | tristate |
145 | depends on HISAX_ST5481 | ||
146 | select CRC_CCITT | 145 | select CRC_CCITT |
147 | select BITREVERSE | 146 | select BITREVERSE |
148 | 147 | ||
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index fbcac76fdc0d..4102de1022ee 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -641,15 +641,10 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, | |||
641 | 641 | ||
642 | case SO_BINDTODEVICE: | 642 | case SO_BINDTODEVICE: |
643 | if (optlen > IFNAMSIZ) | 643 | if (optlen > IFNAMSIZ) |
644 | optlen=IFNAMSIZ; | 644 | optlen = IFNAMSIZ; |
645 | if (copy_from_user(devname, optval, optlen)) { | ||
646 | res = -EFAULT; | ||
647 | break; | ||
648 | } | ||
649 | 645 | ||
650 | dev = dev_get_by_name(&init_net, devname); | 646 | if (copy_from_user(devname, optval, optlen)) { |
651 | if (dev == NULL) { | 647 | res = -EFAULT; |
652 | res = -ENODEV; | ||
653 | break; | 648 | break; |
654 | } | 649 | } |
655 | 650 | ||
@@ -657,12 +652,18 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, | |||
657 | (sock->state != SS_UNCONNECTED || | 652 | (sock->state != SS_UNCONNECTED || |
658 | sk->sk_state == TCP_LISTEN)) { | 653 | sk->sk_state == TCP_LISTEN)) { |
659 | res = -EADDRNOTAVAIL; | 654 | res = -EADDRNOTAVAIL; |
660 | dev_put(dev); | 655 | break; |
656 | } | ||
657 | |||
658 | dev = dev_get_by_name(&init_net, devname); | ||
659 | if (!dev) { | ||
660 | res = -ENODEV; | ||
661 | break; | 661 | break; |
662 | } | 662 | } |
663 | 663 | ||
664 | ax25->ax25_dev = ax25_dev_ax25dev(dev); | 664 | ax25->ax25_dev = ax25_dev_ax25dev(dev); |
665 | ax25_fillin_cb(ax25, ax25->ax25_dev); | 665 | ax25_fillin_cb(ax25, ax25->ax25_dev); |
666 | dev_put(dev); | ||
666 | break; | 667 | break; |
667 | 668 | ||
668 | default: | 669 | default: |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 142ebac14176..b1b3b0fbf41c 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -432,6 +432,7 @@ err2: | |||
432 | br_fdb_delete_by_port(br, p, 1); | 432 | br_fdb_delete_by_port(br, p, 1); |
433 | err1: | 433 | err1: |
434 | kobject_put(&p->kobj); | 434 | kobject_put(&p->kobj); |
435 | p = NULL; /* kobject_put frees */ | ||
435 | err0: | 436 | err0: |
436 | dev_set_promiscuity(dev, -1); | 437 | dev_set_promiscuity(dev, -1); |
437 | put_back: | 438 | put_back: |
diff --git a/net/socket.c b/net/socket.c index 49917a1cac7d..41e8847508aa 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2098,12 +2098,17 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) | |||
2098 | unsigned long a[6]; | 2098 | unsigned long a[6]; |
2099 | unsigned long a0, a1; | 2099 | unsigned long a0, a1; |
2100 | int err; | 2100 | int err; |
2101 | unsigned int len; | ||
2101 | 2102 | ||
2102 | if (call < 1 || call > SYS_ACCEPT4) | 2103 | if (call < 1 || call > SYS_ACCEPT4) |
2103 | return -EINVAL; | 2104 | return -EINVAL; |
2104 | 2105 | ||
2106 | len = nargs[call]; | ||
2107 | if (len > sizeof(a)) | ||
2108 | return -EINVAL; | ||
2109 | |||
2105 | /* copy_from_user should be SMP safe. */ | 2110 | /* copy_from_user should be SMP safe. */ |
2106 | if (copy_from_user(a, args, nargs[call])) | 2111 | if (copy_from_user(a, args, len)) |
2107 | return -EFAULT; | 2112 | return -EFAULT; |
2108 | 2113 | ||
2109 | audit_socketcall(nargs[call] / sizeof(unsigned long), a); | 2114 | audit_socketcall(nargs[call] / sizeof(unsigned long), a); |