lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Mar 2020 20:34:43 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <steffen.klassert@...unet.com>, <herbert@...dor.apana.org.au>,
        <davem@...emloft.net>, <kuba@...nel.org>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH net-next] xfrm: policy: Remove obsolete WARN while xfrm policy inserting

Since commit 7cb8a93968e3 ("xfrm: Allow inserting policies with matching
mark and different priorities"), we allow duplicate policies with
different priority, this WARN is not needed any more.

Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 net/xfrm/xfrm_policy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index dbda08e..5c4387c 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1508,7 +1508,7 @@ static void xfrm_policy_insert_inexact_list(struct hlist_head *chain,
 		    !selector_cmp(&pol->selector, &policy->selector) &&
 		    xfrm_policy_mark_match(policy, pol) &&
 		    xfrm_sec_ctx_match(pol->security, policy->security) &&
-		    !WARN_ON(delpol)) {
+		    !delpol) {
 			delpol = pol;
 			if (policy->priority > pol->priority)
 				continue;
@@ -1543,7 +1543,7 @@ static struct xfrm_policy *xfrm_policy_insert_list(struct hlist_head *chain,
 		    !selector_cmp(&pol->selector, &policy->selector) &&
 		    xfrm_policy_mark_match(policy, pol) &&
 		    xfrm_sec_ctx_match(pol->security, policy->security) &&
-		    !WARN_ON(delpol)) {
+		    !delpol) {
 			if (excl)
 				return ERR_PTR(-EEXIST);
 			delpol = pol;
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ