diff options
author | David S. Miller <davem@davemloft.net> | 2014-03-05 20:32:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-05 20:32:02 -0500 |
commit | 67ddc87f162e2d0e29db2b6b21c5a3fbcb8be206 (patch) | |
tree | c83ac73e3d569156d4b7f3dab3e7e27e0054cd0d /net/xfrm | |
parent | 6092c79fd00ce48ee8698955ea6419cc5cd65641 (diff) | |
parent | c3bebc71c4bcdafa24b506adf0c1de3c1f77e2e0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/mwifiex/pcie.c
net/ipv6/sit.c
The SIT driver conflict consists of a bug fix being done by hand
in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper
was created (netdev_alloc_pcpu_stats()) which takes care of this.
The two wireless conflicts were overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_state.c | 23 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 5 |
3 files changed, 18 insertions, 12 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index bb3669d973a7..a75fae4b045a 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1156,7 +1156,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol, | |||
1156 | if (hlist_unhashed(&pol->bydst)) | 1156 | if (hlist_unhashed(&pol->bydst)) |
1157 | return NULL; | 1157 | return NULL; |
1158 | 1158 | ||
1159 | hlist_del(&pol->bydst); | 1159 | hlist_del_init(&pol->bydst); |
1160 | hlist_del(&pol->byidx); | 1160 | hlist_del(&pol->byidx); |
1161 | list_del(&pol->walk.all); | 1161 | list_del(&pol->walk.all); |
1162 | net->xfrm.policy_count[dir]--; | 1162 | net->xfrm.policy_count[dir]--; |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 5339c26bb0cf..06970fee9155 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -1171,6 +1171,11 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig) | |||
1171 | } | 1171 | } |
1172 | x->props.aalgo = orig->props.aalgo; | 1172 | x->props.aalgo = orig->props.aalgo; |
1173 | 1173 | ||
1174 | if (orig->aead) { | ||
1175 | x->aead = xfrm_algo_aead_clone(orig->aead); | ||
1176 | if (!x->aead) | ||
1177 | goto error; | ||
1178 | } | ||
1174 | if (orig->ealg) { | 1179 | if (orig->ealg) { |
1175 | x->ealg = xfrm_algo_clone(orig->ealg); | 1180 | x->ealg = xfrm_algo_clone(orig->ealg); |
1176 | if (!x->ealg) | 1181 | if (!x->ealg) |
@@ -1211,6 +1216,9 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig) | |||
1211 | x->props.flags = orig->props.flags; | 1216 | x->props.flags = orig->props.flags; |
1212 | x->props.extra_flags = orig->props.extra_flags; | 1217 | x->props.extra_flags = orig->props.extra_flags; |
1213 | 1218 | ||
1219 | x->tfcpad = orig->tfcpad; | ||
1220 | x->replay_maxdiff = orig->replay_maxdiff; | ||
1221 | x->replay_maxage = orig->replay_maxage; | ||
1214 | x->curlft.add_time = orig->curlft.add_time; | 1222 | x->curlft.add_time = orig->curlft.add_time; |
1215 | x->km.state = orig->km.state; | 1223 | x->km.state = orig->km.state; |
1216 | x->km.seq = orig->km.seq; | 1224 | x->km.seq = orig->km.seq; |
@@ -1223,11 +1231,12 @@ out: | |||
1223 | return NULL; | 1231 | return NULL; |
1224 | } | 1232 | } |
1225 | 1233 | ||
1226 | /* net->xfrm.xfrm_state_lock is held */ | ||
1227 | struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct net *net) | 1234 | struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct net *net) |
1228 | { | 1235 | { |
1229 | unsigned int h; | 1236 | unsigned int h; |
1230 | struct xfrm_state *x; | 1237 | struct xfrm_state *x = NULL; |
1238 | |||
1239 | spin_lock_bh(&net->xfrm.xfrm_state_lock); | ||
1231 | 1240 | ||
1232 | if (m->reqid) { | 1241 | if (m->reqid) { |
1233 | h = xfrm_dst_hash(net, &m->old_daddr, &m->old_saddr, | 1242 | h = xfrm_dst_hash(net, &m->old_daddr, &m->old_saddr, |
@@ -1244,7 +1253,7 @@ struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct net *n | |||
1244 | m->old_family)) | 1253 | m->old_family)) |
1245 | continue; | 1254 | continue; |
1246 | xfrm_state_hold(x); | 1255 | xfrm_state_hold(x); |
1247 | return x; | 1256 | break; |
1248 | } | 1257 | } |
1249 | } else { | 1258 | } else { |
1250 | h = xfrm_src_hash(net, &m->old_daddr, &m->old_saddr, | 1259 | h = xfrm_src_hash(net, &m->old_daddr, &m->old_saddr, |
@@ -1259,11 +1268,13 @@ struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct net *n | |||
1259 | m->old_family)) | 1268 | m->old_family)) |
1260 | continue; | 1269 | continue; |
1261 | xfrm_state_hold(x); | 1270 | xfrm_state_hold(x); |
1262 | return x; | 1271 | break; |
1263 | } | 1272 | } |
1264 | } | 1273 | } |
1265 | 1274 | ||
1266 | return NULL; | 1275 | spin_unlock_bh(&net->xfrm.xfrm_state_lock); |
1276 | |||
1277 | return x; | ||
1267 | } | 1278 | } |
1268 | EXPORT_SYMBOL(xfrm_migrate_state_find); | 1279 | EXPORT_SYMBOL(xfrm_migrate_state_find); |
1269 | 1280 | ||
@@ -1458,7 +1469,7 @@ xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **src, int n, | |||
1458 | { | 1469 | { |
1459 | int err = 0; | 1470 | int err = 0; |
1460 | struct xfrm_state_afinfo *afinfo = xfrm_state_get_afinfo(family); | 1471 | struct xfrm_state_afinfo *afinfo = xfrm_state_get_afinfo(family); |
1461 | struct net *net = xs_net(*dst); | 1472 | struct net *net = xs_net(*src); |
1462 | 1473 | ||
1463 | if (!afinfo) | 1474 | if (!afinfo) |
1464 | return -EAFNOSUPPORT; | 1475 | return -EAFNOSUPPORT; |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 023e5e7ea4c6..195dbe230b98 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -32,11 +32,6 @@ | |||
32 | #include <linux/in6.h> | 32 | #include <linux/in6.h> |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | static inline int aead_len(struct xfrm_algo_aead *alg) | ||
36 | { | ||
37 | return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); | ||
38 | } | ||
39 | |||
40 | static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type) | 35 | static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type) |
41 | { | 36 | { |
42 | struct nlattr *rt = attrs[type]; | 37 | struct nlattr *rt = attrs[type]; |