diff options
author | Adrian Moreno <amorenoz@redhat.com> | 2024-07-10 20:10:04 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-12 04:11:31 +0300 |
commit | 8341eee81c794db0d8dd503c2b0ea2f55eba7334 (patch) | |
tree | 1149afadff005aa1581f3a4f1570a9dc888133c3 /include/net | |
parent | c9741a03dc8e491e57b95fba0058ab46b7e506da (diff) | |
download | linux-8341eee81c794db0d8dd503c2b0ea2f55eba7334.tar.xz |
net: psample: fix flag being set in wrong skb
A typo makes PSAMPLE_ATTR_SAMPLE_RATE netlink flag be added to the wrong
sk_buff.
Fix the error and make the input sk_buff pointer "const" so that it
doesn't happen again.
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Fixes: 7b1b2b60c63f ("net: psample: allow using rate as probability")
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Link: https://patch.msgid.link/20240710171004.2164034-1-amorenoz@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/psample.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/net/psample.h b/include/net/psample.h index c52e9ebd88dd..5071b5fc2b59 100644 --- a/include/net/psample.h +++ b/include/net/psample.h @@ -38,13 +38,15 @@ struct sk_buff; #if IS_ENABLED(CONFIG_PSAMPLE) -void psample_sample_packet(struct psample_group *group, struct sk_buff *skb, - u32 sample_rate, const struct psample_metadata *md); +void psample_sample_packet(struct psample_group *group, + const struct sk_buff *skb, u32 sample_rate, + const struct psample_metadata *md); #else static inline void psample_sample_packet(struct psample_group *group, - struct sk_buff *skb, u32 sample_rate, + const struct sk_buff *skb, + u32 sample_rate, const struct psample_metadata *md) { } |