diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:04:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:04:44 -0400 |
commit | f8965467f366fd18f01feafb5db10512d7b4422c (patch) | |
tree | 3706a9cd779859271ca61b85c63a1bc3f82d626e /net/xfrm/xfrm_user.c | |
parent | a26272e5200765691e67d6780e52b32498fdb659 (diff) | |
parent | 2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
qlcnic: adding co maintainer
ixgbe: add support for active DA cables
ixgbe: dcb, do not tag tc_prio_control frames
ixgbe: fix ixgbe_tx_is_paused logic
ixgbe: always enable vlan strip/insert when DCB is enabled
ixgbe: remove some redundant code in setting FCoE FIP filter
ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
ixgbe: fix header len when unsplit packet overflows to data buffer
ipv6: Never schedule DAD timer on dead address
ipv6: Use POSTDAD state
ipv6: Use state_lock to protect ifa state
ipv6: Replace inet6_ifaddr->dead with state
cxgb4: notify upper drivers if the device is already up when they load
cxgb4: keep interrupts available when the ports are brought down
cxgb4: fix initial addition of MAC address
cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
cnic: Convert cnic_local_flags to atomic ops.
can: Fix SJA1000 command register writes on SMP systems
bridge: fix build for CONFIG_SYSFS disabled
ARCNET: Limit com20020 PCI ID matches for SOHARD cards
...
Fix up various conflicts with pcmcia tree drivers/net/
{pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
wireless/orinoco/spectrum_cs.c} and feature removal
(Documentation/feature-removal-schedule.txt).
Also fix a non-content conflict due to pm_qos_requirement getting
renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 6106b72826d3..ba59983aaffe 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -1741,6 +1741,10 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
1741 | if (err) | 1741 | if (err) |
1742 | return err; | 1742 | return err; |
1743 | 1743 | ||
1744 | err = verify_policy_dir(p->dir); | ||
1745 | if (err) | ||
1746 | return err; | ||
1747 | |||
1744 | if (p->index) | 1748 | if (p->index) |
1745 | xp = xfrm_policy_byid(net, mark, type, p->dir, p->index, 0, &err); | 1749 | xp = xfrm_policy_byid(net, mark, type, p->dir, p->index, 0, &err); |
1746 | else { | 1750 | else { |
@@ -1766,13 +1770,9 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
1766 | if (xp == NULL) | 1770 | if (xp == NULL) |
1767 | return -ENOENT; | 1771 | return -ENOENT; |
1768 | 1772 | ||
1769 | read_lock(&xp->lock); | 1773 | if (unlikely(xp->walk.dead)) |
1770 | if (xp->walk.dead) { | ||
1771 | read_unlock(&xp->lock); | ||
1772 | goto out; | 1774 | goto out; |
1773 | } | ||
1774 | 1775 | ||
1775 | read_unlock(&xp->lock); | ||
1776 | err = 0; | 1776 | err = 0; |
1777 | if (up->hard) { | 1777 | if (up->hard) { |
1778 | uid_t loginuid = NETLINK_CB(skb).loginuid; | 1778 | uid_t loginuid = NETLINK_CB(skb).loginuid; |
@@ -1783,7 +1783,7 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
1783 | 1783 | ||
1784 | } else { | 1784 | } else { |
1785 | // reset the timers here? | 1785 | // reset the timers here? |
1786 | printk("Dont know what to do with soft policy expire\n"); | 1786 | WARN(1, "Dont know what to do with soft policy expire\n"); |
1787 | } | 1787 | } |
1788 | km_policy_expired(xp, p->dir, up->hard, current->pid); | 1788 | km_policy_expired(xp, p->dir, up->hard, current->pid); |
1789 | 1789 | ||
@@ -1883,7 +1883,7 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
1883 | return 0; | 1883 | return 0; |
1884 | 1884 | ||
1885 | bad_policy: | 1885 | bad_policy: |
1886 | printk("BAD policy passed\n"); | 1886 | WARN(1, "BAD policy passed\n"); |
1887 | free_state: | 1887 | free_state: |
1888 | kfree(x); | 1888 | kfree(x); |
1889 | nomem: | 1889 | nomem: |
@@ -2385,8 +2385,9 @@ static int xfrm_send_state_notify(struct xfrm_state *x, struct km_event *c) | |||
2385 | case XFRM_MSG_FLUSHSA: | 2385 | case XFRM_MSG_FLUSHSA: |
2386 | return xfrm_notify_sa_flush(c); | 2386 | return xfrm_notify_sa_flush(c); |
2387 | default: | 2387 | default: |
2388 | printk("xfrm_user: Unknown SA event %d\n", c->event); | 2388 | printk(KERN_NOTICE "xfrm_user: Unknown SA event %d\n", |
2389 | break; | 2389 | c->event); |
2390 | break; | ||
2390 | } | 2391 | } |
2391 | 2392 | ||
2392 | return 0; | 2393 | return 0; |
@@ -2676,7 +2677,8 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_ev | |||
2676 | case XFRM_MSG_POLEXPIRE: | 2677 | case XFRM_MSG_POLEXPIRE: |
2677 | return xfrm_exp_policy_notify(xp, dir, c); | 2678 | return xfrm_exp_policy_notify(xp, dir, c); |
2678 | default: | 2679 | default: |
2679 | printk("xfrm_user: Unknown Policy event %d\n", c->event); | 2680 | printk(KERN_NOTICE "xfrm_user: Unknown Policy event %d\n", |
2681 | c->event); | ||
2680 | } | 2682 | } |
2681 | 2683 | ||
2682 | return 0; | 2684 | return 0; |