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 ====================
Unified · Split
| @@ -507,7 +507,7 @@ static int ah_init_state(struct xfrm_state *x) · 506 unmodified lines | ||
| 507 | 507 | |
| 508 | 508 | if (aalg_desc->uinfo.auth.icv_fullbits/8 != |
| 509 | 509 | crypto_ahash_digestsize(ahash)) { |
| 510 | − pr_info("%s: %s digestsize %u != %hu\n", | |
| 510 | + pr_info("%s: %s digestsize %u != %u\n", | |
| 511 | 511 | __func__, x->aalg->alg_name, |
| 512 | 512 | crypto_ahash_digestsize(ahash), |
| 513 | 513 | aalg_desc->uinfo.auth.icv_fullbits / 8); |
| @@ -1108,7 +1108,7 @@ static int esp_init_authenc(struct xfrm_state *x) · 1107 unmodified lines | ||
| 1108 | 1108 | err = -EINVAL; |
| 1109 | 1109 | if (aalg_desc->uinfo.auth.icv_fullbits / 8 != |
| 1110 | 1110 | crypto_aead_authsize(aead)) { |
| 1111 | − pr_info("ESP: %s digestsize %u != %hu\n", | |
| 1111 | + pr_info("ESP: %s digestsize %u != %u\n", | |
| 1112 | 1112 | x->aalg->alg_name, |
| 1113 | 1113 | crypto_aead_authsize(aead), |
| 1114 | 1114 | aalg_desc->uinfo.auth.icv_fullbits / 8); |
| @@ -2678,8 +2678,10 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, · 2677 unmodified lines | ||
| 2678 | 2678 | *num_xfrms = 0; |
| 2679 | 2679 | return 0; |
| 2680 | 2680 | } |
| 2681 | − if (IS_ERR(pols[0])) | |
| 2681 | + if (IS_ERR(pols[0])) { | |
| 2682 | + *num_pols = 0; | |
| 2682 | 2683 | return PTR_ERR(pols[0]); |
| 2684 | + } | |
| 2683 | 2685 | |
| 2684 | 2686 | *num_xfrms = pols[0]->xfrm_nr; |
| 2685 | 2687 | |
| @@ -2694,6 +2696,7 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, · 8 unmodified lines | ||
| 2694 | 2696 | if (pols[1]) { |
| 2695 | 2697 | if (IS_ERR(pols[1])) { |
| 2696 | 2698 | xfrm_pols_put(pols, *num_pols); |
| 2699 | + *num_pols = 0; | |
| 2697 | 2700 | return PTR_ERR(pols[1]); |
| 2698 | 2701 | } |
| 2699 | 2702 | (*num_pols)++; |