Message ID | 20240328-jag-sysctl_remset_misc-v1-0-47c1463b3af2@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 28 Mar 2024 16:57:47 +0100, Joel Granados wrote: > What? > These commits remove the sentinel element (last empty element) from the > sysctl arrays of all the files under the "mm/", "security/", "ipc/", > "init/", "io_uring/", "drivers/perf/" and "crypto/" directories that > register a sysctl array. The inclusion of [4] to mainline allows the > removal of sentinel elements without behavioral change. This is safe > because the sysctl registration code (register_sysctl() and friends) use > the array size in addition to checking for a sentinel [1]. > > [...] Applied, thanks! [6/7] io_uring: Remove the now superfluous sentinel elements from ctl_table array (no commit info) Best regards,
On Thu, 28 Mar 2024 16:57:47 +0100, Joel Granados wrote: > What? > These commits remove the sentinel element (last empty element) from the > sysctl arrays of all the files under the "mm/", "security/", "ipc/", > "init/", "io_uring/", "drivers/perf/" and "crypto/" directories that > register a sysctl array. The inclusion of [4] to mainline allows the > removal of sentinel elements without behavioral change. This is safe > because the sysctl registration code (register_sysctl() and friends) use > the array size in addition to checking for a sentinel [1]. > > [...] Applied drivers/perf change to will (for-next/perf), thanks! [7/7] drivers: perf: Remove the now superfluous sentinel elements from ctl_table array https://git.kernel.org/will/c/f66ae597411c Cheers,
diff --git i/fs/proc/proc_sysctl.c w/fs/proc/proc_sysctl.c index 37cde0efee57..896c498600e8 100644 --- i/fs/proc/proc_sysctl.c +++ w/fs/proc/proc_sysctl.c @@ -966,6 +966,7 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set, table[0].procname = new_name; table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO; init_header(&new->header, set->dir.header.root, set, node, table, 1); + printk("%ld sysctl saved mem kzalloc\n", sizeof(struct ctl_table)); return new; } @@ -1189,6 +1190,7 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, s> link_name += len; link++; } + printk("%ld sysctl saved mem kzalloc\n", sizeof(struct ctl_table)); init_header(links, dir->header.root, dir->header.set, node, link_table, head->ctl_table_size); links->nreg = nr_entries;