aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ipv6_sockglue.c2
-rw-r--r--net/ipv6/mcast.c11
2 files changed, 6 insertions, 7 deletions
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));