diff mbox series

[v2,net,1/2] openvswitch: switch from WARN to pr_warn

Message ID 20221025105018.466157-2-aconole@redhat.com (mailing list archive)
State Accepted
Commit fd954cc1919e35cb92f78671cab6e42d661945a3
Delegated to: Netdev Maintainers
Headers show
Series openvswitch: syzbot splat fix and introduce selftest | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: jesse@nicira.com; 1 maintainers not CCed: jesse@nicira.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Aaron Conole Oct. 25, 2022, 10:50 a.m. UTC
As noted by Paolo Abeni, pr_warn doesn't generate any splat and can still
preserve the warning to the user that feature downgrade occurred.  We
likely cannot introduce other kinds of checks / enforcement here because
syzbot can generate different genl versions to the datapath.

Reported-by: syzbot+31cde0bef4bbf8ba2d86@syzkaller.appspotmail.com
Fixes: 44da5ae5fbea ("openvswitch: Drop user features if old user space attempted to create datapath")
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 net/openvswitch/datapath.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ilya Maximets Oct. 25, 2022, 1:25 p.m. UTC | #1
On 10/25/22 12:50, Aaron Conole wrote:
> As noted by Paolo Abeni, pr_warn doesn't generate any splat and can still
> preserve the warning to the user that feature downgrade occurred.  We
> likely cannot introduce other kinds of checks / enforcement here because
> syzbot can generate different genl versions to the datapath.
> 
> Reported-by: syzbot+31cde0bef4bbf8ba2d86@syzkaller.appspotmail.com
> Fixes: 44da5ae5fbea ("openvswitch: Drop user features if old user space attempted to create datapath")
> Cc: Thomas Graf <tgraf@suug.ch>
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
>  net/openvswitch/datapath.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index c8a9075ddd0a..155263e73512 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c
> @@ -1616,7 +1616,8 @@ static void ovs_dp_reset_user_features(struct sk_buff *skb,
>  	if (IS_ERR(dp))
>  		return;
>  
> -	WARN(dp->user_features, "Dropping previously announced user features\n");
> +	pr_warn("%s: Dropping previously announced user features\n",
> +		ovs_dp_name(dp));
>  	dp->user_features = 0;
>  }
>  

Nothing changed here since v1, so

Acked-by: Ilya Maximets <i.maximets@ovn.org>
diff mbox series

Patch

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index c8a9075ddd0a..155263e73512 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1616,7 +1616,8 @@  static void ovs_dp_reset_user_features(struct sk_buff *skb,
 	if (IS_ERR(dp))
 		return;
 
-	WARN(dp->user_features, "Dropping previously announced user features\n");
+	pr_warn("%s: Dropping previously announced user features\n",
+		ovs_dp_name(dp));
 	dp->user_features = 0;
 }