Message ID | 20201023100146.34948-1-zhangqilong3@huawei.com |
---|---|
State | Rejected |
Delegated to: | David Miller |
Headers | show |
Series | [-next] neigh: remove the extra slash | expand |
Context | Check | Description |
---|---|---|
jkicinski/cover_letter | success | Link |
jkicinski/fixes_present | success | Link |
jkicinski/patch_count | success | Link |
jkicinski/tree_selection | success | Guessed tree name to be net-next |
jkicinski/subject_prefix | warning | Target tree name not specified in the subject |
jkicinski/source_inline | success | Was 0 now: 0 |
jkicinski/verify_signedoff | success | Link |
jkicinski/module_param | success | Was 0 now: 0 |
jkicinski/build_32bit | success | Errors and warnings before: 3 this patch: 3 |
jkicinski/kdoc | success | Errors and warnings before: 0 this patch: 0 |
jkicinski/verify_fixes | success | Link |
jkicinski/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
jkicinski/build_allmodconfig_warn | success | Errors and warnings before: 3 this patch: 3 |
jkicinski/header_inline | success | Link |
jkicinski/stable | success | Stable not CCed |
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 > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> > --- > net/core/neighbour.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/core/neighbour.c b/net/core/neighbour.c > index 8e39e28b0a8d..503501842a7d 100644 > --- 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); >
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); > >
> 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. Hi, Joe I use the splicing method to rewrite it in patch V2 [0001-neigh-Adjustment-calculation-method-of-neighbour-pat.patch], I think it will be clearer. Looking forward to your reply. Thanks, best wish to you. Zhang Qilong > > > > 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); > > > >
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 8e39e28b0a8d..503501842a7d 100644 --- 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);
The normal path has only one slash. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)