On Fri, 2020-10-23 at 13:16 +0300, Vasily Averin wrote: > On 10/23/20 1:01 PM, Zhang Qilong wrote: > > The normal path has only one slash. > > it is not normal path > this string is used to calculate number of symbols in "net/%s/neigh/%s" used > below
Then probably better would be to add +1 rather than use a rather odd filename. > > diff --git a/net/core/neighbour.c b/net/core/neighbour.c [] > > @@ -3623,7 +3623,7 @@ int neigh_sysctl_register(struct net_device *dev, > > struct neigh_parms *p, > > int i; > > struct neigh_sysctl_table *t; > > const char *dev_name_source; > > - char neigh_path[ sizeof("net//neigh/") + IFNAMSIZ + IFNAMSIZ ]; > > + char neigh_path[sizeof("net/neigh/") + IFNAMSIZ + IFNAMSIZ]; > > char *p_name; > > > > > > t = kmemdup(&neigh_sysctl_template, sizeof(*t), GFP_KERNEL); > >