Skip to content

Commit ef56217

Browse files
committed
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 ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 48ea8ea + e79b947 commit ef56217

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

net/ipv4/ah4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static int ah_init_state(struct xfrm_state *x)
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ static int esp_init_authenc(struct xfrm_state *x)
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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,8 +2678,10 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family,
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,
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)++;

0 commit comments

Comments
 (0)