Hi, Patrick McHardy a écrit : > Eric Leblond wrote: >> Hi, >> >> Patrick McHardy a écrit : >> >>> Eric Leblond wrote: >>> >>>> +static int nf_log_proc_dostring(ctl_table *table, int write, struct >>>> file *filp, >>>> >>>> + for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++) { >>>> + char *pr_name = kmalloc(3, GFP_KERNEL); >>>> + /* FIXME free at deinit but there is currently no deinit */ >>>> + snprintf(pr_name, 3, "%d", i); >>>> + nf_log_sysctl_table[i].ctl_name = i; >>>> >>> This ctl_name use seems rather abusive. The names are used >>> as numeric identifiers, we can't just stuff index values in >>> there :) >>> >> Your remark is not clear for me. I store here a integer which is the >> protocol number. I see it as a real numeric identifier. >> >> Which change are you suggesting ? > > Its an identifier for the sysctl syscall, its not meant to be used with > private identifiers. And any new sysctl should use CTL_UNNUMBERED (which > you do, but then overwrite it). Ok, once you've said it, it quiet obvious :/ A reworked patchset will follow as reply to this mail. Thanks once again for your remarks and your patience. BR, -- Eric Leblond <eric@xxxxxx> INL: http://www.inl.fr/ NuFW: http://www.nufw.org/ -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html