Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79452
b: refs/heads/master
c: ba93ef7
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 28, 2008
1 parent 319d95d commit 162f12d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd329bfa96dd9dabfc3b5154317bf5fbe9440455
refs/heads/master: ba93ef746560df597b19bbcee04ce7ed70ebc700
10 changes: 7 additions & 3 deletions trunk/net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct net_device *ipmr_new_tunnel(struct vifctl *v)
p.iph.ihl = 5;
p.iph.protocol = IPPROTO_IPIP;
sprintf(p.name, "dvmrp%d", v->vifc_vifi);
ifr.ifr_ifru.ifru_data = (void*)&p;
ifr.ifr_ifru.ifru_data = (__force void __user *)&p;

oldfs = get_fs(); set_fs(KERNEL_DS);
err = dev->do_ioctl(dev, &ifr, SIOCADDTUNNEL);
Expand Down Expand Up @@ -954,10 +954,12 @@ int ip_mroute_setsockopt(struct sock *sk,int optname,char __user *optval,int opt
#ifdef CONFIG_IP_PIMSM
case MRT_PIM:
{
int v, ret;
int v;

if (get_user(v,(int __user *)optval))
return -EFAULT;
v = (v)?1:0;
v = (v) ? 1 : 0;

rtnl_lock();
ret = 0;
if (v != mroute_do_pim) {
Expand Down Expand Up @@ -1659,6 +1661,7 @@ static struct vif_device *ipmr_vif_seq_idx(struct ipmr_vif_iter *iter,
}

static void *ipmr_vif_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(mrt_lock)
{
read_lock(&mrt_lock);
return *pos ? ipmr_vif_seq_idx(seq->private, *pos - 1)
Expand All @@ -1682,6 +1685,7 @@ static void *ipmr_vif_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}

static void ipmr_vif_seq_stop(struct seq_file *seq, void *v)
__releases(mrt_lock)
{
read_unlock(&mrt_lock);
}
Expand Down

0 comments on commit 162f12d

Please sign in to comment.