Commit 290fdc70 authored by David S. Miller's avatar David S. Miller

Merge bk://kernel.bkbits.net/acme/sock-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents b34b4482 3ee81afa
...@@ -682,8 +682,10 @@ static int ppp_ioctl(struct inode *inode, struct file *file, ...@@ -682,8 +682,10 @@ static int ppp_ioctl(struct inode *inode, struct file *file,
if (code == 0) if (code == 0)
break; break;
err = -EFAULT; err = -EFAULT;
if (copy_from_user(code, uprog.filter, len)) if (copy_from_user(code, uprog.filter, len)) {
kfree(code);
break; break;
}
err = sk_chk_filter(code, uprog.len); err = sk_chk_filter(code, uprog.len);
if (err) { if (err) {
kfree(code); kfree(code);
......
...@@ -44,7 +44,7 @@ struct xfrm_selector ...@@ -44,7 +44,7 @@ struct xfrm_selector
uid_t user; uid_t user;
}; };
#define XFRM_INF (~(u64)0) #define XFRM_INF (~(__u64)0)
struct xfrm_lifetime_cfg struct xfrm_lifetime_cfg
{ {
...@@ -164,7 +164,7 @@ struct xfrm_usersa_info { ...@@ -164,7 +164,7 @@ struct xfrm_usersa_info {
}; };
struct xfrm_usersa_id { struct xfrm_usersa_id {
xfrm_address_t saddr; xfrm_address_t daddr;
__u32 spi; __u32 spi;
__u16 family; __u16 family;
__u8 proto; __u8 proto;
......
...@@ -280,7 +280,6 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) ...@@ -280,7 +280,6 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
write_unlock_bh(&xfrm_policy_lock); write_unlock_bh(&xfrm_policy_lock);
if (delpol) { if (delpol) {
atomic_dec(&delpol->refcnt);
xfrm_policy_kill(delpol); xfrm_policy_kill(delpol);
xfrm_pol_put(delpol); xfrm_pol_put(delpol);
} }
......
...@@ -260,7 +260,7 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -260,7 +260,7 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
if (!x) if (!x)
return err; return err;
x1 = xfrm_state_lookup(&x->props.saddr, x->id.spi, x->id.proto, x->props.family); x1 = xfrm_state_lookup(&x->id.daddr, x->id.spi, x->id.proto, x->props.family);
if (x1) { if (x1) {
xfrm_state_put(x); xfrm_state_put(x);
xfrm_state_put(x1); xfrm_state_put(x1);
...@@ -277,7 +277,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -277,7 +277,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
struct xfrm_state *x; struct xfrm_state *x;
struct xfrm_usersa_id *p = NLMSG_DATA(nlh); struct xfrm_usersa_id *p = NLMSG_DATA(nlh);
x = xfrm_state_lookup(&p->saddr, p->spi, p->proto, p->family); x = xfrm_state_lookup(&p->daddr, p->spi, p->proto, p->family);
if (x == NULL) if (x == NULL)
return -ESRCH; return -ESRCH;
...@@ -403,7 +403,7 @@ static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -403,7 +403,7 @@ static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
struct sk_buff *resp_skb; struct sk_buff *resp_skb;
int err; int err;
x = xfrm_state_lookup(&p->saddr, p->spi, p->proto, p->family); x = xfrm_state_lookup(&p->daddr, p->spi, p->proto, p->family);
err = -ESRCH; err = -ESRCH;
if (x == NULL) if (x == NULL)
goto out_noput; goto out_noput;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment