Skip to content

Commit

Permalink
xfrm: get rid of incorrect WARN
Browse files Browse the repository at this point in the history
AFAICT this message is just printed whenever input validation fails.
This is a normal failure and we shouldn't be dumping the stack over it.

Looks like it was originally a printk that was maybe incorrectly
upgraded to a WARN:

commit 62db5cf
Author: stephen hemminger <shemminger@vyatta.com>
Date:   Wed May 12 06:37:06 2010 +0000

    xfrm: add severity to printk

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
  • Loading branch information
vegard authored and klassert committed Jul 27, 2016
1 parent 1ba5bf9 commit 73efc32
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,7 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,

err = verify_newpolicy_info(&ua->policy);
if (err)
goto bad_policy;
goto free_state;

/* build an XP */
xp = xfrm_policy_construct(net, &ua->policy, attrs, &err);
Expand Down Expand Up @@ -2149,8 +2149,6 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,

return 0;

bad_policy:
WARN(1, "BAD policy passed\n");
free_state:
kfree(x);
nomem:
Expand Down

0 comments on commit 73efc32

Please sign in to comment.