Message ID | 20230928-jag-sysctl_remove_empty_elem_drivers-v1-0-e59120fca9f9@samsung.com |
---|---|
State | Superseded |
Headers | show |
Le 02/10/2023 à 10:47, Joel Granados a écrit : > On Thu, Sep 28, 2023 at 04:31:30PM +0000, Christophe Leroy wrote: > I followed this trace and proc_handler is correctly defined in tty_table > (struct ctl_table) in drivers/tty/tty_io.c:tty_init and there is not > path that changes these values. > Additionally, we then fail trying to print instead of continuing with > the initialization. My conjecture is that this might be due to something > different than tht sysctl register call. > > Does this happen consistenly or is this just a one off issue? Don't know. > > To what branch are these patches being applied to? As far as I understand from https://github.com/linuxppc/linux-snowpatch/commits/snowpatch/375319, it's being applied on https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=d774975 > > I'm going to post my V2 and keep working on this issue if it pops up > again. > Christophe
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index c88854df0b62..e0073a627bac 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -976,6 +976,8 @@ 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); + // Counts additional sentinel used for each new dir. + printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table)); return new; } @@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_ link_name += len; link++; } + // Counts additional sentinel used for each new registration + //if ((head->ctl_table + head->ctl_table_size)->procname) + 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;