Intro:
======
When hit a kernel warning when using openvswitch kernel module. Digging into the source code, we found it's due to the code snippet
if (WARN_ON(i.cmd >= family->resv_start_op && (i.doit.validate || i.dumpit.validate))) return -EINVAL;
in the gene_validate_ops() in net/netlink/genetlink.c, introduced in
108880a07bab genetlink: add iterator for walking family ops
from buglink https://bugs.launchpad.net/bugs/2053155
How to fix:
===========
We need to cherry-pick the missing patch
Fixes: e4ba4554209f ("net: openvswitch: add missing .resv_start_op")
Author: Jakub Kicinski <email address hidden>
Date: Thu Oct 27 20:25:01 2022 -0700
net: openvswitch: add missing .resv_start_op
I missed one of the families in OvS when annotating .resv_start_op.
This triggers the warning added in commit ce48ebdd5651 ("genetlink:
limit the use of validation workarounds to old ops").
Intro: >resv_start_ op &&
(i. doit.validate || i.dumpit. validate) ))
return -EINVAL;
======
When hit a kernel warning when using openvswitch kernel module. Digging into the source code, we found it's due to the code snippet
if (WARN_ON(i.cmd >= family-
in the gene_validate_ops() in net/netlink/ genetlink. c, introduced in /bugs.launchpad .net/bugs/ 2053155
108880a07bab genetlink: add iterator for walking family ops
from buglink
https:/
How to fix:
===========
We need to cherry-pick the missing patch
Fixes: e4ba4554209f ("net: openvswitch: add missing .resv_start_op")
Author: Jakub Kicinski <email address hidden>
Date: Thu Oct 27 20:25:01 2022 -0700
net: openvswitch: add missing .resv_start_op
I missed one of the families in OvS when annotating .resv_start_op.
This triggers the warning added in commit ce48ebdd5651 ("genetlink:
limit the use of validation workarounds to old ops").
Reported-by: <email address hidden>
Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
Thanks!