summaryrefslogtreecommitdiff
path: root/net/openvswitch/vport.h
diff options
context:
space:
mode:
authorNathan Huckleberry <nhuck@google.com>2022-09-14 02:07:38 +0300
committerJakub Kicinski <kuba@kernel.org>2022-09-20 04:28:50 +0300
commit8bb7c4f8c9276eb61f7f39cc107f67a0e81de610 (patch)
tree98a1e3bcf5bdb316795d9335de4dae25abfbc3ff /net/openvswitch/vport.h
parent73c99e26036529e633a0f2d628ad7ddff6594668 (diff)
downloadlinux-8bb7c4f8c9276eb61f7f39cc107f67a0e81de610.tar.xz
openvswitch: Change the return type for vport_ops.send function hook to int
All usages of the vport_ops struct have the .send field set to dev_queue_xmit or internal_dev_recv. Since most usages are set to dev_queue_xmit, the function hook should match the signature of dev_queue_xmit. The only call to vport_ops->send() is in net/openvswitch/vport.c and it throws away the return value. This mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. Reported-by: Dan Carpenter <error27@gmail.com> Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Cc: llvm@lists.linux.dev Signed-off-by: Nathan Huckleberry <nhuck@google.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Eelco Chaudron <echaudro@redhat.com> Link: https://lore.kernel.org/r/20220913230739.228313-1-nhuck@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/openvswitch/vport.h')
-rw-r--r--net/openvswitch/vport.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index 7d276f60c000..6ff45e8a0868 100644
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -132,7 +132,7 @@ struct vport_ops {
int (*set_options)(struct vport *, struct nlattr *);
int (*get_options)(const struct vport *, struct sk_buff *);
- netdev_tx_t (*send) (struct sk_buff *skb);
+ int (*send)(struct sk_buff *skb);
struct module *owner;
struct list_head list;
};