lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <Y/tKIKrR0ucIQ5mI@corigine.com> Date: Sun, 26 Feb 2023 13:01:36 +0100 From: Simon Horman <simon.horman@...igine.com> To: Nathan Chancellor <nathan@...nel.org> Cc: jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us, davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, paulb@...dia.com, marcelo.leitner@...il.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH net] net/sched: cls_api: Move call to tcf_exts_miss_cookie_base_destroy() On Sat, Feb 25, 2023 at 02:15:27PM -0700, Nathan Chancellor wrote: > On Sat, Feb 25, 2023 at 05:08:17PM +0100, Simon Horman wrote: > > On Fri, Feb 24, 2023 at 11:18:49AM -0700, Nathan Chancellor wrote: > > > When CONFIG_NET_CLS_ACT is disabled: > > > > > > ../net/sched/cls_api.c:141:13: warning: 'tcf_exts_miss_cookie_base_destroy' defined but not used [-Wunused-function] > > > 141 | static void tcf_exts_miss_cookie_base_destroy(struct tcf_exts *exts) > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > Due to the way the code is structured, it is possible for a definition > > > of tcf_exts_miss_cookie_base_destroy() to be present without actually > > > being used. Its single callsite is in an '#ifdef CONFIG_NET_CLS_ACT' > > > block but a definition will always be present in the file. The version > > > of tcf_exts_miss_cookie_base_destroy() that actually does something > > > depends on CONFIG_NET_TC_SKB_EXT, so the stub function is used in both > > > CONFIG_NET_CLS_ACT=n and CONFIG_NET_CLS_ACT=y + CONFIG_NET_TC_SKB_EXT=n > > > configurations. > > > > > > Move the call to tcf_exts_miss_cookie_base_destroy() in > > > tcf_exts_destroy() out of the '#ifdef CONFIG_NET_CLS_ACT', so that it > > > always appears used to the compiler, while not changing any behavior > > > with any of the various configuration combinations. > > > > > > Fixes: 80cd22c35c90 ("net/sched: cls_api: Support hardware miss to tc action") > > > Signed-off-by: Nathan Chancellor <nathan@...nel.org> > > > > Thanks Nathan, > > > > I think the #ifdefs in this file could do with some work. > > Yes, it is definitely an eye sore. I thought about cleaning it up but it > felt like net-next material to me, plus I have no other interest in this > code other than making the warning in my builds go away, if I am being > honest :) Yes, of course (x2) :) > > But as a fix this looks good to me. > > > > Reviewed-by: Simon Horman <simon.horman@...igine.com> > > Thanks for the quick review! > > Cheers, > Nathan >
Powered by blists - more mailing lists