History

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec

Steffen Klassert says: ==================== pull request (net): ipsec 2022-07-20 1) Fix a policy refcount imbalance in xfrm_bundle_lookup. From Hangyu Hua. 2) Fix some clang -Wformat warnings. Justin Stitt ====================

David S. Miller committed 4 years ago

Commit ef562172 parents 48ea8ea e79b9473 files · +6 −3Browse files

Unified · Split

3 files
  1. net/ipv4/ah4.c +1 −1
  2. net/ipv4/esp4.c +1 −1
  3. net/xfrm/xfrm_policy.c +4 −1
net/ipv4/ah4.c+1−1
@@ -507,7 +507,7 @@ static int ah_init_state(struct xfrm_state *x) · 506 unmodified lines
507507
508508 if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
509509 crypto_ahash_digestsize(ahash)) {
510− pr_info("%s: %s digestsize %u != %hu\n",
510+ pr_info("%s: %s digestsize %u != %u\n",
511511 __func__, x->aalg->alg_name,
512512 crypto_ahash_digestsize(ahash),
513513 aalg_desc->uinfo.auth.icv_fullbits / 8);
net/ipv4/esp4.c+1−1
@@ -1108,7 +1108,7 @@ static int esp_init_authenc(struct xfrm_state *x) · 1107 unmodified lines
11081108 err = -EINVAL;
11091109 if (aalg_desc->uinfo.auth.icv_fullbits / 8 !=
11101110 crypto_aead_authsize(aead)) {
1111− pr_info("ESP: %s digestsize %u != %hu\n",
1111+ pr_info("ESP: %s digestsize %u != %u\n",
11121112 x->aalg->alg_name,
11131113 crypto_aead_authsize(aead),
11141114 aalg_desc->uinfo.auth.icv_fullbits / 8);
net/xfrm/xfrm_policy.c+4−1
@@ -2678,8 +2678,10 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, · 2677 unmodified lines
26782678 *num_xfrms = 0;
26792679 return 0;
26802680 }
2681− if (IS_ERR(pols[0]))
2681+ if (IS_ERR(pols[0])) {
2682+ *num_pols = 0;
26822683 return PTR_ERR(pols[0]);
2684+ }
26832685
26842686 *num_xfrms = pols[0]->xfrm_nr;
26852687
@@ -2694,6 +2696,7 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, · 8 unmodified lines
26942696 if (pols[1]) {
26952697 if (IS_ERR(pols[1])) {
26962698 xfrm_pols_put(pols, *num_pols);
2699+ *num_pols = 0;
26972700 return PTR_ERR(pols[1]);
26982701 }
26992702 (*num_pols)++;