linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] xfrm: policy: Remove obsolete WARN while xfrm policy inserting
@ 2020-03-27 12:34 YueHaibing
  2020-03-28 11:23 ` Steffen Klassert
  0 siblings, 1 reply; 8+ messages in thread
From: YueHaibing @ 2020-03-27 12:34 UTC (permalink / raw)
  To: steffen.klassert, herbert, davem, kuba; +Cc: netdev, linux-kernel, YueHaibing

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@huawei.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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-21  6:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 12:34 [PATCH net-next] xfrm: policy: Remove obsolete WARN while xfrm policy inserting YueHaibing
2020-03-28 11:23 ` Steffen Klassert
2020-03-30 14:05   ` Yuehaibing
2020-04-06  9:03     ` Steffen Klassert
2020-04-09  8:19       ` Yuehaibing
2020-04-15  7:14         ` Steffen Klassert
2020-04-17 11:01           ` Yuehaibing
2020-04-21  6:28             ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).