diff options
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 8dbb38b91de2..006c88c163e0 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -2113,7 +2113,6 @@ static int xfrm_notify_policy_flush(struct km_event *c) | |||
2113 | unsigned char *b; | 2113 | unsigned char *b; |
2114 | int len = 0; | 2114 | int len = 0; |
2115 | #ifdef CONFIG_XFRM_SUB_POLICY | 2115 | #ifdef CONFIG_XFRM_SUB_POLICY |
2116 | struct xfrm_userpolicy_type upt; | ||
2117 | len += RTA_SPACE(sizeof(struct xfrm_userpolicy_type)); | 2116 | len += RTA_SPACE(sizeof(struct xfrm_userpolicy_type)); |
2118 | #endif | 2117 | #endif |
2119 | len += NLMSG_LENGTH(0); | 2118 | len += NLMSG_LENGTH(0); |
@@ -2126,12 +2125,8 @@ static int xfrm_notify_policy_flush(struct km_event *c) | |||
2126 | 2125 | ||
2127 | nlh = NLMSG_PUT(skb, c->pid, c->seq, XFRM_MSG_FLUSHPOLICY, 0); | 2126 | nlh = NLMSG_PUT(skb, c->pid, c->seq, XFRM_MSG_FLUSHPOLICY, 0); |
2128 | nlh->nlmsg_flags = 0; | 2127 | nlh->nlmsg_flags = 0; |
2129 | 2128 | if (copy_to_user_policy_type(c->data.type, skb) < 0) | |
2130 | #ifdef CONFIG_XFRM_SUB_POLICY | 2129 | goto nlmsg_failure; |
2131 | memset(&upt, 0, sizeof(upt)); | ||
2132 | upt.type = c->data.type; | ||
2133 | RTA_PUT(skb, XFRMA_POLICY_TYPE, sizeof(upt), &upt); | ||
2134 | #endif | ||
2135 | 2130 | ||
2136 | nlh->nlmsg_len = skb->tail - b; | 2131 | nlh->nlmsg_len = skb->tail - b; |
2137 | 2132 | ||
@@ -2139,9 +2134,6 @@ static int xfrm_notify_policy_flush(struct km_event *c) | |||
2139 | return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_POLICY, GFP_ATOMIC); | 2134 | return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_POLICY, GFP_ATOMIC); |
2140 | 2135 | ||
2141 | nlmsg_failure: | 2136 | nlmsg_failure: |
2142 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
2143 | rtattr_failure: | ||
2144 | #endif | ||
2145 | kfree_skb(skb); | 2137 | kfree_skb(skb); |
2146 | return -1; | 2138 | return -1; |
2147 | } | 2139 | } |