git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
ipv4
/
igmp.c
diff --git
a/net/ipv4/igmp.c
b/net/ipv4/igmp.c
index
d512239
..
024ae56
100644
(file)
--- a/
net/ipv4/igmp.c
+++ b/
net/ipv4/igmp.c
@@
-72,7
+72,6
@@
* Vinay Kulkarni
*/
* Vinay Kulkarni
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@
-139,14
+138,14
@@
time_before(jiffies, (in_dev)->mr_v2_seen)))
static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im);
time_before(jiffies, (in_dev)->mr_v2_seen)))
static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im);
-static void igmpv3_del_delrec(struct in_device *in_dev, __
u
32 multiaddr);
+static void igmpv3_del_delrec(struct in_device *in_dev, __
be
32 multiaddr);
static void igmpv3_clear_delrec(struct in_device *in_dev);
static int sf_setstate(struct ip_mc_list *pmc);
static void sf_markstate(struct ip_mc_list *pmc);
#endif
static void ip_mc_clear_src(struct ip_mc_list *pmc);
static void igmpv3_clear_delrec(struct in_device *in_dev);
static int sf_setstate(struct ip_mc_list *pmc);
static void sf_markstate(struct ip_mc_list *pmc);
#endif
static void ip_mc_clear_src(struct ip_mc_list *pmc);
-static int ip_mc_add_src(struct in_device *in_dev, __
u
32 *pmca, int sfmode,
- int sfcount, __
u
32 *psfsrc, int delta);
+static int ip_mc_add_src(struct in_device *in_dev, __
be
32 *pmca, int sfmode,
+ int sfcount, __
be
32 *psfsrc, int delta);
static void ip_ma_put(struct ip_mc_list *im)
{
static void ip_ma_put(struct ip_mc_list *im)
{
@@
-427,7
+426,7
@@
static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
first = 1;
psf_prev = NULL;
for (psf=*psf_list; psf; psf=psf_next) {
first = 1;
psf_prev = NULL;
for (psf=*psf_list; psf; psf=psf_next) {
-
u
32 *psrc;
+
__be
32 *psrc;
psf_next = psf->sf_next;
psf_next = psf->sf_next;
@@
-440,7
+439,7
@@
static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
if (isquery)
psf->sf_gsresp = 0;
if (isquery)
psf->sf_gsresp = 0;
- if (AVAILABLE(skb) < sizeof(
u
32) +
+ if (AVAILABLE(skb) < sizeof(
__be
32) +
first*sizeof(struct igmpv3_grec)) {
if (truncate && !first)
break; /* truncate these */
first*sizeof(struct igmpv3_grec)) {
if (truncate && !first)
break; /* truncate these */
@@
-456,7
+455,9
@@
static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
skb = add_grhead(skb, pmc, type, &pgr);
first = 0;
}
skb = add_grhead(skb, pmc, type, &pgr);
first = 0;
}
- psrc = (u32 *)skb_put(skb, sizeof(u32));
+ if (!skb)
+ return NULL;
+ psrc = (__be32 *)skb_put(skb, sizeof(__be32));
*psrc = psf->sf_inaddr;
scount++; stotal++;
if ((type == IGMPV3_ALLOW_NEW_SOURCES ||
*psrc = psf->sf_inaddr;
scount++; stotal++;
if ((type == IGMPV3_ALLOW_NEW_SOURCES ||
@@
-631,8
+632,8
@@
static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc,
struct igmphdr *ih;
struct rtable *rt;
struct net_device *dev = in_dev->dev;
struct igmphdr *ih;
struct rtable *rt;
struct net_device *dev = in_dev->dev;
-
u32
group = pmc ? pmc->multiaddr : 0;
-
u32
dst;
+
__be32
group = pmc ? pmc->multiaddr : 0;
+
__be32
dst;
if (type == IGMPV3_HOST_MEMBERSHIP_REPORT)
return igmpv3_send_report(in_dev, pmc);
if (type == IGMPV3_HOST_MEMBERSHIP_REPORT)
return igmpv3_send_report(in_dev, pmc);
@@
-749,7
+750,7
@@
static void igmp_timer_expire(unsigned long data)
}
/* mark EXCLUDE-mode sources */
}
/* mark EXCLUDE-mode sources */
-static int igmp_xmarksources(struct ip_mc_list *pmc, int nsrcs, __
u
32 *srcs)
+static int igmp_xmarksources(struct ip_mc_list *pmc, int nsrcs, __
be
32 *srcs)
{
struct ip_sf_list *psf;
int i, scount;
{
struct ip_sf_list *psf;
int i, scount;
@@
-776,7
+777,7
@@
static int igmp_xmarksources(struct ip_mc_list *pmc, int nsrcs, __u32 *srcs)
return 1;
}
return 1;
}
-static int igmp_marksources(struct ip_mc_list *pmc, int nsrcs, __
u
32 *srcs)
+static int igmp_marksources(struct ip_mc_list *pmc, int nsrcs, __
be
32 *srcs)
{
struct ip_sf_list *psf;
int i, scount;
{
struct ip_sf_list *psf;
int i, scount;
@@
-804,7
+805,7
@@
static int igmp_marksources(struct ip_mc_list *pmc, int nsrcs, __u32 *srcs)
return 1;
}
return 1;
}
-static void igmp_heard_report(struct in_device *in_dev,
u
32 group)
+static void igmp_heard_report(struct in_device *in_dev,
__be
32 group)
{
struct ip_mc_list *im;
{
struct ip_mc_list *im;
@@
-829,7
+830,7
@@
static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
struct igmphdr *ih = skb->h.igmph;
struct igmpv3_query *ih3 = (struct igmpv3_query *)ih;
struct ip_mc_list *im;
struct igmphdr *ih = skb->h.igmph;
struct igmpv3_query *ih3 = (struct igmpv3_query *)ih;
struct ip_mc_list *im;
-
u32
group = ih->group;
+
__be32
group = ih->group;
int max_delay;
int mark = 0;
int max_delay;
int mark = 0;
@@
-863,7
+864,7
@@
static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
ih3 = (struct igmpv3_query *) skb->h.raw;
if (ih3->nsrcs) {
if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)
ih3 = (struct igmpv3_query *) skb->h.raw;
if (ih3->nsrcs) {
if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)
- + ntohs(ih3->nsrcs)*sizeof(__
u
32)))
+ + ntohs(ih3->nsrcs)*sizeof(__
be
32)))
return;
ih3 = (struct igmpv3_query *) skb->h.raw;
}
return;
ih3 = (struct igmpv3_query *) skb->h.raw;
}
@@
-932,8
+933,8
@@
int igmp_rcv(struct sk_buff *skb)
goto drop;
switch (skb->ip_summed) {
goto drop;
switch (skb->ip_summed) {
- case CHECKSUM_
HW
:
- if (!
(u16)
csum_fold(skb->csum))
+ case CHECKSUM_
COMPLETE
:
+ if (!csum_fold(skb->csum))
break;
/* fall through */
case CHECKSUM_NONE:
break;
/* fall through */
case CHECKSUM_NONE:
@@
-986,7
+987,7
@@
drop:
* Add a filter to a device
*/
* Add a filter to a device
*/
-static void ip_mc_filter_add(struct in_device *in_dev,
u
32 addr)
+static void ip_mc_filter_add(struct in_device *in_dev,
__be
32 addr)
{
char buf[MAX_ADDR_LEN];
struct net_device *dev = in_dev->dev;
{
char buf[MAX_ADDR_LEN];
struct net_device *dev = in_dev->dev;
@@
-1006,7
+1007,7
@@
static void ip_mc_filter_add(struct in_device *in_dev, u32 addr)
* Remove a filter from a device
*/
* Remove a filter from a device
*/
-static void ip_mc_filter_del(struct in_device *in_dev,
u
32 addr)
+static void ip_mc_filter_del(struct in_device *in_dev,
__be
32 addr)
{
char buf[MAX_ADDR_LEN];
struct net_device *dev = in_dev->dev;
{
char buf[MAX_ADDR_LEN];
struct net_device *dev = in_dev->dev;
@@
-1029,10
+1030,9
@@
static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im)
* for deleted items allows change reports to use common code with
* non-deleted or query-response MCA's.
*/
* for deleted items allows change reports to use common code with
* non-deleted or query-response MCA's.
*/
- pmc = k
m
alloc(sizeof(*pmc), GFP_KERNEL);
+ pmc = k
z
alloc(sizeof(*pmc), GFP_KERNEL);
if (!pmc)
return;
if (!pmc)
return;
- memset(pmc, 0, sizeof(*pmc));
spin_lock_bh(&im->lock);
pmc->interface = im->interface;
in_dev_hold(in_dev);
spin_lock_bh(&im->lock);
pmc->interface = im->interface;
in_dev_hold(in_dev);
@@
-1057,7
+1057,7
@@
static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im)
spin_unlock_bh(&in_dev->mc_tomb_lock);
}
spin_unlock_bh(&in_dev->mc_tomb_lock);
}
-static void igmpv3_del_delrec(struct in_device *in_dev, __
u
32 multiaddr)
+static void igmpv3_del_delrec(struct in_device *in_dev, __
be
32 multiaddr)
{
struct ip_mc_list *pmc, *pmc_prev;
struct ip_sf_list *psf, *psf_next;
{
struct ip_mc_list *pmc, *pmc_prev;
struct ip_sf_list *psf, *psf_next;
@@
-1195,7
+1195,7
@@
static void igmp_group_added(struct ip_mc_list *im)
* A socket has joined a multicast group on device dev.
*/
* A socket has joined a multicast group on device dev.
*/
-void ip_mc_inc_group(struct in_device *in_dev,
u
32 addr)
+void ip_mc_inc_group(struct in_device *in_dev,
__be
32 addr)
{
struct ip_mc_list *im;
{
struct ip_mc_list *im;
@@
-1254,7
+1254,7
@@
out:
* A socket has left a multicast group on device dev
*/
* A socket has left a multicast group on device dev
*/
-void ip_mc_dec_group(struct in_device *in_dev,
u
32 addr)
+void ip_mc_dec_group(struct in_device *in_dev,
__be
32 addr)
{
struct ip_mc_list *i, **ip;
{
struct ip_mc_list *i, **ip;
@@
-1399,12
+1399,12
@@
static struct in_device * ip_mc_find_dev(struct ip_mreqn *imr)
/*
* Join a socket to a group
*/
/*
* Join a socket to a group
*/
-int sysctl_igmp_max_memberships = IP_MAX_MEMBERSHIPS;
-int sysctl_igmp_max_msf = IP_MAX_MSF;
+int sysctl_igmp_max_memberships
__read_mostly
= IP_MAX_MEMBERSHIPS;
+int sysctl_igmp_max_msf
__read_mostly
= IP_MAX_MSF;
static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode,
static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode,
- __
u
32 *psfsrc)
+ __
be
32 *psfsrc)
{
struct ip_sf_list *psf, *psf_prev;
int rv = 0;
{
struct ip_sf_list *psf, *psf_prev;
int rv = 0;
@@
-1452,8
+1452,8
@@
static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode,
#define igmp_ifc_event(x) do { } while (0)
#endif
#define igmp_ifc_event(x) do { } while (0)
#endif
-static int ip_mc_del_src(struct in_device *in_dev, __
u
32 *pmca, int sfmode,
- int sfcount, __
u
32 *psfsrc, int delta)
+static int ip_mc_del_src(struct in_device *in_dev, __
be
32 *pmca, int sfmode,
+ int sfcount, __
be
32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int changerec = 0;
{
struct ip_mc_list *pmc;
int changerec = 0;
@@
-1519,7
+1519,7
@@
out_unlock:
* Add multicast single-source filter to the interface list
*/
static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode,
* Add multicast single-source filter to the interface list
*/
static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode,
- __
u
32 *psfsrc, int delta)
+ __
be
32 *psfsrc, int delta)
{
struct ip_sf_list *psf, *psf_prev;
{
struct ip_sf_list *psf, *psf_prev;
@@
-1530,10
+1530,9
@@
static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode,
psf_prev = psf;
}
if (!psf) {
psf_prev = psf;
}
if (!psf) {
- psf = k
m
alloc(sizeof(*psf), GFP_ATOMIC);
+ psf = k
z
alloc(sizeof(*psf), GFP_ATOMIC);
if (!psf)
return -ENOBUFS;
if (!psf)
return -ENOBUFS;
- memset(psf, 0, sizeof(*psf));
psf->sf_inaddr = *psfsrc;
if (psf_prev) {
psf_prev->sf_next = psf;
psf->sf_inaddr = *psfsrc;
if (psf_prev) {
psf_prev->sf_next = psf;
@@
-1626,8
+1625,8
@@
static int sf_setstate(struct ip_mc_list *pmc)
/*
* Add multicast source filter list to the interface list
*/
/*
* Add multicast source filter list to the interface list
*/
-static int ip_mc_add_src(struct in_device *in_dev, __
u
32 *pmca, int sfmode,
- int sfcount, __
u
32 *psfsrc, int delta)
+static int ip_mc_add_src(struct in_device *in_dev, __
be
32 *pmca, int sfmode,
+ int sfcount, __
be
32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int isexclude;
{
struct ip_mc_list *pmc;
int isexclude;
@@
-1720,7
+1719,7
@@
static void ip_mc_clear_src(struct ip_mc_list *pmc)
int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
{
int err;
int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
{
int err;
-
u
32 addr = imr->imr_multiaddr.s_addr;
+
__be
32 addr = imr->imr_multiaddr.s_addr;
struct ip_mc_socklist *iml=NULL, *i;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *iml=NULL, *i;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
@@
-1794,31
+1793,37
@@
int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *iml, **imlp;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *iml, **imlp;
struct in_device *in_dev;
-
u
32 group = imr->imr_multiaddr.s_addr;
+
__be
32 group = imr->imr_multiaddr.s_addr;
u32 ifindex;
u32 ifindex;
+ int ret = -EADDRNOTAVAIL;
rtnl_lock();
in_dev = ip_mc_find_dev(imr);
rtnl_lock();
in_dev = ip_mc_find_dev(imr);
- if (!in_dev) {
- rtnl_unlock();
- return -ENODEV;
- }
ifindex = imr->imr_ifindex;
for (imlp = &inet->mc_list; (iml = *imlp) != NULL; imlp = &iml->next) {
ifindex = imr->imr_ifindex;
for (imlp = &inet->mc_list; (iml = *imlp) != NULL; imlp = &iml->next) {
- if (iml->multi.imr_multiaddr.s_addr == group &&
- iml->multi.imr_ifindex == ifindex) {
- (void) ip_mc_leave_src(sk, iml, in_dev);
+ if (iml->multi.imr_multiaddr.s_addr != group)
+ continue;
+ if (ifindex) {
+ if (iml->multi.imr_ifindex != ifindex)
+ continue;
+ } else if (imr->imr_address.s_addr && imr->imr_address.s_addr !=
+ iml->multi.imr_address.s_addr)
+ continue;
-
*imlp = iml->next
;
+
(void) ip_mc_leave_src(sk, iml, in_dev)
;
+ *imlp = iml->next;
+
+ if (in_dev)
ip_mc_dec_group(in_dev, group);
ip_mc_dec_group(in_dev, group);
- rtnl_unlock();
- sock_kfree_s(sk, iml, sizeof(*iml));
- return 0;
- }
+ rtnl_unlock();
+ sock_kfree_s(sk, iml, sizeof(*iml));
+ return 0;
}
}
+ if (!in_dev)
+ ret = -ENODEV;
rtnl_unlock();
rtnl_unlock();
- return
-EADDRNOTAVAIL
;
+ return
ret
;
}
int ip_mc_source(int add, int omode, struct sock *sk, struct
}
int ip_mc_source(int add, int omode, struct sock *sk, struct
@@
-1826,7
+1831,7
@@
int ip_mc_source(int add, int omode, struct sock *sk, struct
{
int err;
struct ip_mreqn imr;
{
int err;
struct ip_mreqn imr;
-
u
32 addr = mreqs->imr_multiaddr;
+
__be
32 addr = mreqs->imr_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev = NULL;
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *pmc;
struct in_device *in_dev = NULL;
struct inet_sock *inet = inet_sk(sk);
@@
-1880,7
+1885,7
@@
int ip_mc_source(int add, int omode, struct sock *sk, struct
rv = !0;
for (i=0; i<psl->sl_count; i++) {
rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
rv = !0;
for (i=0; i<psl->sl_count; i++) {
rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
- sizeof(__
u
32));
+ sizeof(__
be
32));
if (rv == 0)
break;
}
if (rv == 0)
break;
}
@@
-1932,7
+1937,7
@@
int ip_mc_source(int add, int omode, struct sock *sk, struct
rv = 1; /* > 0 for insert logic below if sl_count is 0 */
for (i=0; i<psl->sl_count; i++) {
rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
rv = 1; /* > 0 for insert logic below if sl_count is 0 */
for (i=0; i<psl->sl_count; i++) {
rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
- sizeof(__
u
32));
+ sizeof(__
be
32));
if (rv == 0)
break;
}
if (rv == 0)
break;
}
@@
-1957,7
+1962,7
@@
int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
{
int err = 0;
struct ip_mreqn imr;
{
int err = 0;
struct ip_mreqn imr;
-
u
32 addr = msf->imsf_multiaddr;
+
__be
32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
@@
-2041,7
+2046,7
@@
int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
{
int err, len, count, copycount;
struct ip_mreqn imr;
{
int err, len, count, copycount;
struct ip_mreqn imr;
-
u
32 addr = msf->imsf_multiaddr;
+
__be
32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
@@
-2100,7
+2105,7
@@
int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
{
int err, i, count, copycount;
struct sockaddr_in *psin;
{
int err, i, count, copycount;
struct sockaddr_in *psin;
-
u
32 addr;
+
__be
32 addr;
struct ip_mc_socklist *pmc;
struct inet_sock *inet = inet_sk(sk);
struct ip_sf_socklist *psl;
struct ip_mc_socklist *pmc;
struct inet_sock *inet = inet_sk(sk);
struct ip_sf_socklist *psl;
@@
-2153,7
+2158,7
@@
done:
/*
* check if a multicast source filter allows delivery for a given <src,dst,intf>
*/
/*
* check if a multicast source filter allows delivery for a given <src,dst,intf>
*/
-int ip_mc_sf_allow(struct sock *sk,
u32 loc_addr, u
32 rmt_addr, int dif)
+int ip_mc_sf_allow(struct sock *sk,
__be32 loc_addr, __be
32 rmt_addr, int dif)
{
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *pmc;
{
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *pmc;
@@
-2202,18
+2207,18
@@
void ip_mc_drop_socket(struct sock *sk)
struct in_device *in_dev;
inet->mc_list = iml->next;
struct in_device *in_dev;
inet->mc_list = iml->next;
- if ((in_dev = inetdev_by_index(iml->multi.imr_ifindex)) != NULL) {
- (void) ip_mc_leave_src(sk, iml, in_dev);
+ in_dev = inetdev_by_index(iml->multi.imr_ifindex);
+ (void) ip_mc_leave_src(sk, iml, in_dev);
+ if (in_dev != NULL) {
ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr);
in_dev_put(in_dev);
}
sock_kfree_s(sk, iml, sizeof(*iml));
ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr);
in_dev_put(in_dev);
}
sock_kfree_s(sk, iml, sizeof(*iml));
-
}
rtnl_unlock();
}
}
rtnl_unlock();
}
-int ip_check_mc(struct in_device *in_dev,
u32 mc_addr, u
32 src_addr, u16 proto)
+int ip_check_mc(struct in_device *in_dev,
__be32 mc_addr, __be
32 src_addr, u16 proto)
{
struct ip_mc_list *im;
struct ip_sf_list *psf;
{
struct ip_mc_list *im;
struct ip_sf_list *psf;
@@
-2361,7
+2366,7
@@
static int igmp_mc_seq_show(struct seq_file *seq, void *v)
}
seq_printf(seq,
}
seq_printf(seq,
- "\t\t\t\t%08
l
X %5d %d:%08lX\t\t%d\n",
+ "\t\t\t\t%08X %5d %d:%08lX\t\t%d\n",
im->multiaddr, im->users,
im->tm_running, im->tm_running ?
jiffies_to_clock_t(im->timer.expires-jiffies) : 0,
im->multiaddr, im->users,
im->tm_running, im->tm_running ?
jiffies_to_clock_t(im->timer.expires-jiffies) : 0,
@@
-2381,7
+2386,7
@@
static int igmp_mc_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct igmp_mc_iter_state *s = k
m
alloc(sizeof(*s), GFP_KERNEL);
+ struct igmp_mc_iter_state *s = k
z
alloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
if (!s)
goto out;
@@
-2391,7
+2396,6
@@
static int igmp_mc_seq_open(struct inode *inode, struct file *file)
seq = file->private_data;
seq->private = s;
seq = file->private_data;
seq->private = s;
- memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
out:
return rc;
out_kfree:
@@
-2556,7
+2560,7
@@
static int igmp_mcf_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct igmp_mcf_iter_state *s = k
m
alloc(sizeof(*s), GFP_KERNEL);
+ struct igmp_mcf_iter_state *s = k
z
alloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
if (!s)
goto out;
@@
-2566,7
+2570,6
@@
static int igmp_mcf_seq_open(struct inode *inode, struct file *file)
seq = file->private_data;
seq->private = s;
seq = file->private_data;
seq->private = s;
- memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
out:
return rc;
out_kfree: