aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/atm/lec.c3
-rw-r--r--net/bridge/netfilter/ebt_stp.c1
-rw-r--r--net/bridge/netfilter/ebtables.c4
-rw-r--r--net/core/dev_mcast.c2
-rw-r--r--net/core/dv.c2
-rw-r--r--net/ipv4/igmp.c15
-rw-r--r--net/ipv4/ip_sockglue.c6
-rw-r--r--net/ipv4/netfilter/ip_conntrack_helper_pptp.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_gre.c5
-rw-r--r--net/ipv6/ipv6_sockglue.c2
-rw-r--r--net/ipv6/mcast.c11
-rw-r--r--net/ipv6/netfilter/ip6t_mac.c1
-rw-r--r--net/ipv6/tcp_ipv6.c20
-rw-r--r--net/irda/irias_object.c12
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/sched/Kconfig2
-rw-r--r--net/sched/ematch.c1
-rw-r--r--net/sctp/sm_make_chunk.c2
-rw-r--r--net/sctp/socket.c4
-rw-r--r--net/socket.c2
-rw-r--r--net/sunrpc/auth.c2
-rw-r--r--net/sunrpc/auth_unix.c2
-rw-r--r--net/sunrpc/clnt.c4
-rw-r--r--net/sunrpc/svc.c2
24 files changed, 61 insertions, 48 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index eea051338498..93ce390996c7 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1811,8 +1811,7 @@ make_entry(struct lec_priv *priv, unsigned char *mac_addr)
1811{ 1811{
1812 struct lec_arp_table *to_return; 1812 struct lec_arp_table *to_return;
1813 1813
1814 to_return = (struct lec_arp_table *) kmalloc(sizeof(struct lec_arp_table), 1814 to_return = kmalloc(sizeof(struct lec_arp_table), GFP_ATOMIC);
1815 GFP_ATOMIC);
1816 if (!to_return) { 1815 if (!to_return) {
1817 printk("LEC: Arp entry kmalloc failed\n"); 1816 printk("LEC: Arp entry kmalloc failed\n");
1818 return NULL; 1817 return NULL;
diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 9d2ef4ffe276..0248c67277ee 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -10,6 +10,7 @@
10 10
11#include <linux/netfilter_bridge/ebtables.h> 11#include <linux/netfilter_bridge/ebtables.h>
12#include <linux/netfilter_bridge/ebt_stp.h> 12#include <linux/netfilter_bridge/ebt_stp.h>
13#include <linux/etherdevice.h>
13#include <linux/module.h> 14#include <linux/module.h>
14 15
15#define BPDU_TYPE_CONFIG 0 16#define BPDU_TYPE_CONFIG 0
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index f8ffbf6e2333..00729b3604f8 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -944,7 +944,7 @@ static int do_replace(void __user *user, unsigned int len)
944 if (countersize) 944 if (countersize)
945 memset(newinfo->counters, 0, countersize); 945 memset(newinfo->counters, 0, countersize);
946 946
947 newinfo->entries = (char *)vmalloc(tmp.entries_size); 947 newinfo->entries = vmalloc(tmp.entries_size);
948 if (!newinfo->entries) { 948 if (!newinfo->entries) {
949 ret = -ENOMEM; 949 ret = -ENOMEM;
950 goto free_newinfo; 950 goto free_newinfo;
@@ -1146,7 +1146,7 @@ int ebt_register_table(struct ebt_table *table)
1146 if (!newinfo) 1146 if (!newinfo)
1147 return -ENOMEM; 1147 return -ENOMEM;
1148 1148
1149 newinfo->entries = (char *)vmalloc(table->table->entries_size); 1149 newinfo->entries = vmalloc(table->table->entries_size);
1150 if (!(newinfo->entries)) 1150 if (!(newinfo->entries))
1151 goto free_newinfo; 1151 goto free_newinfo;
1152 1152
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index cb530eef0e39..05d60850840e 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -158,7 +158,7 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
158 int err = 0; 158 int err = 0;
159 struct dev_mc_list *dmi, *dmi1; 159 struct dev_mc_list *dmi, *dmi1;
160 160
161 dmi1 = (struct dev_mc_list *)kmalloc(sizeof(*dmi), GFP_ATOMIC); 161 dmi1 = kmalloc(sizeof(*dmi), GFP_ATOMIC);
162 162
163 spin_lock_bh(&dev->xmit_lock); 163 spin_lock_bh(&dev->xmit_lock);
164 for (dmi = dev->mc_list; dmi != NULL; dmi = dmi->next) { 164 for (dmi = dev->mc_list; dmi != NULL; dmi = dmi->next) {
diff --git a/net/core/dv.c b/net/core/dv.c
index c5deb3655257..1516a90a138d 100644
--- a/net/core/dv.c
+++ b/net/core/dv.c
@@ -457,7 +457,7 @@ void divert_frame(struct sk_buff *skb)
457 unsigned char *skb_data_end = skb->data + skb->len; 457 unsigned char *skb_data_end = skb->data + skb->len;
458 458
459 /* Packet is already aimed at us, return */ 459 /* Packet is already aimed at us, return */
460 if (!compare_ether_addr(eth, skb->dev->dev_addr)) 460 if (!compare_ether_addr(eth->h_dest, skb->dev->dev_addr))
461 return; 461 return;
462 462
463 /* proto is not IP, do nothing */ 463 /* proto is not IP, do nothing */
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 34758118c10c..192092b89e53 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -975,7 +975,7 @@ static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im)
975 * for deleted items allows change reports to use common code with 975 * for deleted items allows change reports to use common code with
976 * non-deleted or query-response MCA's. 976 * non-deleted or query-response MCA's.
977 */ 977 */
978 pmc = (struct ip_mc_list *)kmalloc(sizeof(*pmc), GFP_KERNEL); 978 pmc = kmalloc(sizeof(*pmc), GFP_KERNEL);
979 if (!pmc) 979 if (!pmc)
980 return; 980 return;
981 memset(pmc, 0, sizeof(*pmc)); 981 memset(pmc, 0, sizeof(*pmc));
@@ -1155,7 +1155,7 @@ void ip_mc_inc_group(struct in_device *in_dev, u32 addr)
1155 } 1155 }
1156 } 1156 }
1157 1157
1158 im = (struct ip_mc_list *)kmalloc(sizeof(*im), GFP_KERNEL); 1158 im = kmalloc(sizeof(*im), GFP_KERNEL);
1159 if (!im) 1159 if (!im)
1160 goto out; 1160 goto out;
1161 1161
@@ -1476,7 +1476,7 @@ static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode,
1476 psf_prev = psf; 1476 psf_prev = psf;
1477 } 1477 }
1478 if (!psf) { 1478 if (!psf) {
1479 psf = (struct ip_sf_list *)kmalloc(sizeof(*psf), GFP_ATOMIC); 1479 psf = kmalloc(sizeof(*psf), GFP_ATOMIC);
1480 if (!psf) 1480 if (!psf)
1481 return -ENOBUFS; 1481 return -ENOBUFS;
1482 memset(psf, 0, sizeof(*psf)); 1482 memset(psf, 0, sizeof(*psf));
@@ -1659,7 +1659,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
1659 err = -ENOBUFS; 1659 err = -ENOBUFS;
1660 if (count >= sysctl_igmp_max_memberships) 1660 if (count >= sysctl_igmp_max_memberships)
1661 goto done; 1661 goto done;
1662 iml = (struct ip_mc_socklist *)sock_kmalloc(sk,sizeof(*iml),GFP_KERNEL); 1662 iml = sock_kmalloc(sk,sizeof(*iml),GFP_KERNEL);
1663 if (iml == NULL) 1663 if (iml == NULL)
1664 goto done; 1664 goto done;
1665 1665
@@ -1823,8 +1823,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
1823 1823
1824 if (psl) 1824 if (psl)
1825 count += psl->sl_max; 1825 count += psl->sl_max;
1826 newpsl = (struct ip_sf_socklist *)sock_kmalloc(sk, 1826 newpsl = sock_kmalloc(sk, IP_SFLSIZE(count), GFP_KERNEL);
1827 IP_SFLSIZE(count), GFP_KERNEL);
1828 if (!newpsl) { 1827 if (!newpsl) {
1829 err = -ENOBUFS; 1828 err = -ENOBUFS;
1830 goto done; 1829 goto done;
@@ -1907,8 +1906,8 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
1907 goto done; 1906 goto done;
1908 } 1907 }
1909 if (msf->imsf_numsrc) { 1908 if (msf->imsf_numsrc) {
1910 newpsl = (struct ip_sf_socklist *)sock_kmalloc(sk, 1909 newpsl = sock_kmalloc(sk, IP_SFLSIZE(msf->imsf_numsrc),
1911 IP_SFLSIZE(msf->imsf_numsrc), GFP_KERNEL); 1910 GFP_KERNEL);
1912 if (!newpsl) { 1911 if (!newpsl) {
1913 err = -ENOBUFS; 1912 err = -ENOBUFS;
1914 goto done; 1913 goto done;
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 6986e11d65cc..2bf8d782f678 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -621,7 +621,7 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
621 err = -ENOBUFS; 621 err = -ENOBUFS;
622 break; 622 break;
623 } 623 }
624 msf = (struct ip_msfilter *)kmalloc(optlen, GFP_KERNEL); 624 msf = kmalloc(optlen, GFP_KERNEL);
625 if (msf == 0) { 625 if (msf == 0) {
626 err = -ENOBUFS; 626 err = -ENOBUFS;
627 break; 627 break;
@@ -778,7 +778,7 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
778 err = -ENOBUFS; 778 err = -ENOBUFS;
779 break; 779 break;
780 } 780 }
781 gsf = (struct group_filter *)kmalloc(optlen,GFP_KERNEL); 781 gsf = kmalloc(optlen,GFP_KERNEL);
782 if (gsf == 0) { 782 if (gsf == 0) {
783 err = -ENOBUFS; 783 err = -ENOBUFS;
784 break; 784 break;
@@ -798,7 +798,7 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
798 goto mc_msf_out; 798 goto mc_msf_out;
799 } 799 }
800 msize = IP_MSFILTER_SIZE(gsf->gf_numsrc); 800 msize = IP_MSFILTER_SIZE(gsf->gf_numsrc);
801 msf = (struct ip_msfilter *)kmalloc(msize,GFP_KERNEL); 801 msf = kmalloc(msize,GFP_KERNEL);
802 if (msf == 0) { 802 if (msf == 0) {
803 err = -ENOBUFS; 803 err = -ENOBUFS;
804 goto mc_msf_out; 804 goto mc_msf_out;
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
index 4108a5e12b3c..d716bba798f2 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
@@ -762,7 +762,7 @@ static struct ip_conntrack_helper pptp = {
762 .help = conntrack_pptp_help 762 .help = conntrack_pptp_help
763}; 763};
764 764
765extern void __exit ip_ct_proto_gre_fini(void); 765extern void ip_ct_proto_gre_fini(void);
766extern int __init ip_ct_proto_gre_init(void); 766extern int __init ip_ct_proto_gre_init(void);
767 767
768/* ip_conntrack_pptp initialization */ 768/* ip_conntrack_pptp initialization */
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_gre.c b/net/ipv4/netfilter/ip_conntrack_proto_gre.c
index 57956dee60c8..c777abf16cb7 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_gre.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_gre.c
@@ -309,7 +309,10 @@ int __init ip_ct_proto_gre_init(void)
309 return ip_conntrack_protocol_register(&gre); 309 return ip_conntrack_protocol_register(&gre);
310} 310}
311 311
312void __exit ip_ct_proto_gre_fini(void) 312/* This cannot be __exit, as it is invoked from ip_conntrack_helper_pptp.c's
313 * init() code on errors.
314 */
315void ip_ct_proto_gre_fini(void)
313{ 316{
314 struct list_head *pos, *n; 317 struct list_head *pos, *n;
315 318
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index c63868dd2ca2..5eac9318320e 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -549,7 +549,7 @@ done:
549 retv = -ENOBUFS; 549 retv = -ENOBUFS;
550 break; 550 break;
551 } 551 }
552 gsf = (struct group_filter *)kmalloc(optlen,GFP_KERNEL); 552 gsf = kmalloc(optlen,GFP_KERNEL);
553 if (gsf == 0) { 553 if (gsf == 0) {
554 retv = -ENOBUFS; 554 retv = -ENOBUFS;
555 break; 555 break;
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 1cf305a9f8dd..cc3e9f560867 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -449,8 +449,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
449 449
450 if (psl) 450 if (psl)
451 count += psl->sl_max; 451 count += psl->sl_max;
452 newpsl = (struct ip6_sf_socklist *)sock_kmalloc(sk, 452 newpsl = sock_kmalloc(sk, IP6_SFLSIZE(count), GFP_ATOMIC);
453 IP6_SFLSIZE(count), GFP_ATOMIC);
454 if (!newpsl) { 453 if (!newpsl) {
455 err = -ENOBUFS; 454 err = -ENOBUFS;
456 goto done; 455 goto done;
@@ -535,8 +534,8 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
535 goto done; 534 goto done;
536 } 535 }
537 if (gsf->gf_numsrc) { 536 if (gsf->gf_numsrc) {
538 newpsl = (struct ip6_sf_socklist *)sock_kmalloc(sk, 537 newpsl = sock_kmalloc(sk, IP6_SFLSIZE(gsf->gf_numsrc),
539 IP6_SFLSIZE(gsf->gf_numsrc), GFP_ATOMIC); 538 GFP_ATOMIC);
540 if (!newpsl) { 539 if (!newpsl) {
541 err = -ENOBUFS; 540 err = -ENOBUFS;
542 goto done; 541 goto done;
@@ -768,7 +767,7 @@ static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
768 * for deleted items allows change reports to use common code with 767 * for deleted items allows change reports to use common code with
769 * non-deleted or query-response MCA's. 768 * non-deleted or query-response MCA's.
770 */ 769 */
771 pmc = (struct ifmcaddr6 *)kmalloc(sizeof(*pmc), GFP_ATOMIC); 770 pmc = kmalloc(sizeof(*pmc), GFP_ATOMIC);
772 if (!pmc) 771 if (!pmc)
773 return; 772 return;
774 memset(pmc, 0, sizeof(*pmc)); 773 memset(pmc, 0, sizeof(*pmc));
@@ -1937,7 +1936,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode,
1937 psf_prev = psf; 1936 psf_prev = psf;
1938 } 1937 }
1939 if (!psf) { 1938 if (!psf) {
1940 psf = (struct ip6_sf_list *)kmalloc(sizeof(*psf), GFP_ATOMIC); 1939 psf = kmalloc(sizeof(*psf), GFP_ATOMIC);
1941 if (!psf) 1940 if (!psf)
1942 return -ENOBUFS; 1941 return -ENOBUFS;
1943 memset(psf, 0, sizeof(*psf)); 1942 memset(psf, 0, sizeof(*psf));
diff --git a/net/ipv6/netfilter/ip6t_mac.c b/net/ipv6/netfilter/ip6t_mac.c
index ae0b09291d17..c848152315bc 100644
--- a/net/ipv6/netfilter/ip6t_mac.c
+++ b/net/ipv6/netfilter/ip6t_mac.c
@@ -11,6 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/skbuff.h> 12#include <linux/skbuff.h>
13#include <linux/if_ether.h> 13#include <linux/if_ether.h>
14#include <linux/etherdevice.h>
14 15
15#include <linux/netfilter_ipv6/ip6t_mac.h> 16#include <linux/netfilter_ipv6/ip6t_mac.h>
16#include <linux/netfilter_ipv6/ip6_tables.h> 17#include <linux/netfilter_ipv6/ip6_tables.h>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index a25f4e8a8ada..66d04004afda 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -67,6 +67,9 @@
67#include <linux/proc_fs.h> 67#include <linux/proc_fs.h>
68#include <linux/seq_file.h> 68#include <linux/seq_file.h>
69 69
70/* Socket used for sending RSTs and ACKs */
71static struct socket *tcp6_socket;
72
70static void tcp_v6_send_reset(struct sk_buff *skb); 73static void tcp_v6_send_reset(struct sk_buff *skb);
71static void tcp_v6_reqsk_send_ack(struct sk_buff *skb, struct request_sock *req); 74static void tcp_v6_reqsk_send_ack(struct sk_buff *skb, struct request_sock *req);
72static void tcp_v6_send_check(struct sock *sk, int len, 75static void tcp_v6_send_check(struct sock *sk, int len,
@@ -611,7 +614,7 @@ static void tcp_v6_send_reset(struct sk_buff *skb)
611 if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { 614 if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) {
612 615
613 if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) { 616 if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) {
614 ip6_xmit(NULL, buff, &fl, NULL, 0); 617 ip6_xmit(tcp6_socket->sk, buff, &fl, NULL, 0);
615 TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); 618 TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);
616 TCP_INC_STATS_BH(TCP_MIB_OUTRSTS); 619 TCP_INC_STATS_BH(TCP_MIB_OUTRSTS);
617 return; 620 return;
@@ -675,7 +678,7 @@ static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, u32 win, u32
675 678
676 if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { 679 if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) {
677 if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) { 680 if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) {
678 ip6_xmit(NULL, buff, &fl, NULL, 0); 681 ip6_xmit(tcp6_socket->sk, buff, &fl, NULL, 0);
679 TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); 682 TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);
680 return; 683 return;
681 } 684 }
@@ -1600,8 +1603,21 @@ static struct inet_protosw tcpv6_protosw = {
1600 1603
1601void __init tcpv6_init(void) 1604void __init tcpv6_init(void)
1602{ 1605{
1606 int err;
1607
1603 /* register inet6 protocol */ 1608 /* register inet6 protocol */
1604 if (inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP) < 0) 1609 if (inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP) < 0)
1605 printk(KERN_ERR "tcpv6_init: Could not register protocol\n"); 1610 printk(KERN_ERR "tcpv6_init: Could not register protocol\n");
1606 inet6_register_protosw(&tcpv6_protosw); 1611 inet6_register_protosw(&tcpv6_protosw);
1612
1613 err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_TCP, &tcp6_socket);
1614 if (err < 0)
1615 panic("Failed to create the TCPv6 control socket.\n");
1616 tcp6_socket->sk->sk_allocation = GFP_ATOMIC;
1617
1618 /* Unhash it so that IP input processing does not even
1619 * see it, we do not wish this socket to see incoming
1620 * packets.
1621 */
1622 tcp6_socket->sk->sk_prot->unhash(tcp6_socket->sk);
1607} 1623}
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
index 75f2666e8630..c6d169fbdceb 100644
--- a/net/irda/irias_object.c
+++ b/net/irda/irias_object.c
@@ -82,8 +82,7 @@ struct ias_object *irias_new_object( char *name, int id)
82 82
83 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 83 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
84 84
85 obj = (struct ias_object *) kmalloc(sizeof(struct ias_object), 85 obj = kmalloc(sizeof(struct ias_object), GFP_ATOMIC);
86 GFP_ATOMIC);
87 if (obj == NULL) { 86 if (obj == NULL) {
88 IRDA_WARNING("%s(), Unable to allocate object!\n", 87 IRDA_WARNING("%s(), Unable to allocate object!\n",
89 __FUNCTION__); 88 __FUNCTION__);
@@ -348,8 +347,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
348 IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); 347 IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;);
349 IRDA_ASSERT(name != NULL, return;); 348 IRDA_ASSERT(name != NULL, return;);
350 349
351 attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), 350 attrib = kmalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
352 GFP_ATOMIC);
353 if (attrib == NULL) { 351 if (attrib == NULL) {
354 IRDA_WARNING("%s: Unable to allocate attribute!\n", 352 IRDA_WARNING("%s: Unable to allocate attribute!\n",
355 __FUNCTION__); 353 __FUNCTION__);
@@ -385,8 +383,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
385 IRDA_ASSERT(name != NULL, return;); 383 IRDA_ASSERT(name != NULL, return;);
386 IRDA_ASSERT(octets != NULL, return;); 384 IRDA_ASSERT(octets != NULL, return;);
387 385
388 attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), 386 attrib = kmalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
389 GFP_ATOMIC);
390 if (attrib == NULL) { 387 if (attrib == NULL) {
391 IRDA_WARNING("%s: Unable to allocate attribute!\n", 388 IRDA_WARNING("%s: Unable to allocate attribute!\n",
392 __FUNCTION__); 389 __FUNCTION__);
@@ -420,8 +417,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
420 IRDA_ASSERT(name != NULL, return;); 417 IRDA_ASSERT(name != NULL, return;);
421 IRDA_ASSERT(value != NULL, return;); 418 IRDA_ASSERT(value != NULL, return;);
422 419
423 attrib = (struct ias_attrib *) kmalloc(sizeof( struct ias_attrib), 420 attrib = kmalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
424 GFP_ATOMIC);
425 if (attrib == NULL) { 421 if (attrib == NULL) {
426 IRDA_WARNING("%s: Unable to allocate attribute!\n", 422 IRDA_WARNING("%s: Unable to allocate attribute!\n",
427 __FUNCTION__); 423 __FUNCTION__);
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index f69e5ed9bd06..c6ee29f8eec0 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1237,7 +1237,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq)
1237 goto done; 1237 goto done;
1238 1238
1239 err = -ENOBUFS; 1239 err = -ENOBUFS;
1240 i = (struct packet_mclist *)kmalloc(sizeof(*i), GFP_KERNEL); 1240 i = kmalloc(sizeof(*i), GFP_KERNEL);
1241 if (i == NULL) 1241 if (i == NULL)
1242 goto done; 1242 goto done;
1243 1243
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 55cd5327fbd7..8a260d43ceef 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -411,7 +411,7 @@ config NET_EMATCH_META
411 tristate "Metadata" 411 tristate "Metadata"
412 depends on NET_EMATCH 412 depends on NET_EMATCH
413 ---help--- 413 ---help---
414 Say Y here if you want to be ablt to classify packets based on 414 Say Y here if you want to be able to classify packets based on
415 metadata such as load average, netfilter attributes, socket 415 metadata such as load average, netfilter attributes, socket
416 attributes and routing decisions. 416 attributes and routing decisions.
417 417
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 64b047c65568..5cb956b721e8 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -92,7 +92,6 @@
92#include <linux/rtnetlink.h> 92#include <linux/rtnetlink.h>
93#include <linux/skbuff.h> 93#include <linux/skbuff.h>
94#include <net/pkt_cls.h> 94#include <net/pkt_cls.h>
95#include <config/net/ematch/stack.h>
96 95
97static LIST_HEAD(ematch_ops); 96static LIST_HEAD(ematch_ops);
98static DEFINE_RWLOCK(ematch_mod_lock); 97static DEFINE_RWLOCK(ematch_mod_lock);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index f9573eba5c7a..556c495c6922 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1287,7 +1287,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
1287 - (bodysize % SCTP_COOKIE_MULTIPLE); 1287 - (bodysize % SCTP_COOKIE_MULTIPLE);
1288 *cookie_len = headersize + bodysize; 1288 *cookie_len = headersize + bodysize;
1289 1289
1290 retval = (sctp_cookie_param_t *)kmalloc(*cookie_len, GFP_ATOMIC); 1290 retval = kmalloc(*cookie_len, GFP_ATOMIC);
1291 1291
1292 if (!retval) { 1292 if (!retval) {
1293 *cookie_len = 0; 1293 *cookie_len = 0;
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index fc04d185fa33..a268eab68ca1 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -860,7 +860,7 @@ SCTP_STATIC int sctp_setsockopt_bindx(struct sock* sk,
860 return -EFAULT; 860 return -EFAULT;
861 861
862 /* Alloc space for the address array in kernel memory. */ 862 /* Alloc space for the address array in kernel memory. */
863 kaddrs = (struct sockaddr *)kmalloc(addrs_size, GFP_KERNEL); 863 kaddrs = kmalloc(addrs_size, GFP_KERNEL);
864 if (unlikely(!kaddrs)) 864 if (unlikely(!kaddrs))
865 return -ENOMEM; 865 return -ENOMEM;
866 866
@@ -1150,7 +1150,7 @@ SCTP_STATIC int sctp_setsockopt_connectx(struct sock* sk,
1150 return -EFAULT; 1150 return -EFAULT;
1151 1151
1152 /* Alloc space for the address array in kernel memory. */ 1152 /* Alloc space for the address array in kernel memory. */
1153 kaddrs = (struct sockaddr *)kmalloc(addrs_size, GFP_KERNEL); 1153 kaddrs = kmalloc(addrs_size, GFP_KERNEL);
1154 if (unlikely(!kaddrs)) 1154 if (unlikely(!kaddrs))
1155 return -ENOMEM; 1155 return -ENOMEM;
1156 1156
diff --git a/net/socket.c b/net/socket.c
index 06fa217f58a9..b38a263853c3 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -993,7 +993,7 @@ static int sock_fasync(int fd, struct file *filp, int on)
993 993
994 if (on) 994 if (on)
995 { 995 {
996 fna=(struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL); 996 fna = kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
997 if(fna==NULL) 997 if(fna==NULL)
998 return -ENOMEM; 998 return -ENOMEM;
999 } 999 }
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 8c7756036e95..9ac1b8c26c01 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -94,7 +94,7 @@ rpcauth_init_credcache(struct rpc_auth *auth, unsigned long expire)
94 struct rpc_cred_cache *new; 94 struct rpc_cred_cache *new;
95 int i; 95 int i;
96 96
97 new = (struct rpc_cred_cache *)kmalloc(sizeof(*new), GFP_KERNEL); 97 new = kmalloc(sizeof(*new), GFP_KERNEL);
98 if (!new) 98 if (!new)
99 return -ENOMEM; 99 return -ENOMEM;
100 for (i = 0; i < RPC_CREDCACHE_NR; i++) 100 for (i = 0; i < RPC_CREDCACHE_NR; i++)
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c
index 890fb5ea0dcb..1b3ed4fd1987 100644
--- a/net/sunrpc/auth_unix.c
+++ b/net/sunrpc/auth_unix.c
@@ -70,7 +70,7 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
70 dprintk("RPC: allocating UNIX cred for uid %d gid %d\n", 70 dprintk("RPC: allocating UNIX cred for uid %d gid %d\n",
71 acred->uid, acred->gid); 71 acred->uid, acred->gid);
72 72
73 if (!(cred = (struct unx_cred *) kmalloc(sizeof(*cred), GFP_KERNEL))) 73 if (!(cred = kmalloc(sizeof(*cred), GFP_KERNEL)))
74 return ERR_PTR(-ENOMEM); 74 return ERR_PTR(-ENOMEM);
75 75
76 atomic_set(&cred->uc_count, 1); 76 atomic_set(&cred->uc_count, 1);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 4cef7fa2b740..d2f0550c4ba0 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -118,7 +118,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname,
118 goto out_err; 118 goto out_err;
119 119
120 err = -ENOMEM; 120 err = -ENOMEM;
121 clnt = (struct rpc_clnt *) kmalloc(sizeof(*clnt), GFP_KERNEL); 121 clnt = kmalloc(sizeof(*clnt), GFP_KERNEL);
122 if (!clnt) 122 if (!clnt)
123 goto out_err; 123 goto out_err;
124 memset(clnt, 0, sizeof(*clnt)); 124 memset(clnt, 0, sizeof(*clnt));
@@ -225,7 +225,7 @@ rpc_clone_client(struct rpc_clnt *clnt)
225{ 225{
226 struct rpc_clnt *new; 226 struct rpc_clnt *new;
227 227
228 new = (struct rpc_clnt *)kmalloc(sizeof(*new), GFP_KERNEL); 228 new = kmalloc(sizeof(*new), GFP_KERNEL);
229 if (!new) 229 if (!new)
230 goto out_no_clnt; 230 goto out_no_clnt;
231 memcpy(new, clnt, sizeof(*new)); 231 memcpy(new, clnt, sizeof(*new));
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index a8bd34d47425..b08419e1fc68 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -32,7 +32,7 @@ svc_create(struct svc_program *prog, unsigned int bufsize)
32 int vers; 32 int vers;
33 unsigned int xdrsize; 33 unsigned int xdrsize;
34 34
35 if (!(serv = (struct svc_serv *) kmalloc(sizeof(*serv), GFP_KERNEL))) 35 if (!(serv = kmalloc(sizeof(*serv), GFP_KERNEL)))
36 return NULL; 36 return NULL;
37 memset(serv, 0, sizeof(*serv)); 37 memset(serv, 0, sizeof(*serv));
38 serv->sv_name = prog->pg_name; 38 serv->sv_name = prog->pg_name;