Re: [PATCH v2] sysctl: drop unused argument set_ownership()::table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-03-15 16:41:34+0100, Joel Granados wrote:
> Hey Thomas
> 
> Did you forget to compile? I'm seeing the following error when I
> compile:

Welp...

>   ...
>   ../fs/proc/proc_sysctl.c: In function ‘proc_sys_make_inode’:
>   ../fs/proc/proc_sysctl.c:483:43: error: passing argument 2 of ‘root->set_ownership’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>     483 |                 root->set_ownership(head, table, &inode->i_uid, &inode->i_gid);
>         |                                           ^~~~~
>         |                                           |
>         |                                           struct ctl_table *
>   ../fs/proc/proc_sysctl.c:483:43: note: expected ‘kuid_t *’ but argument is of type ‘struct ctl_table *’
>   ../fs/proc/proc_sysctl.c:483:50: error: passing argument 3 of ‘root->set_ownership’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>     483 |                 root->set_ownership(head, table, &inode->i_uid, &inode->i_gid);
>         |                                                  ^~~~~~~~~~~~~
>         |                                                  |
>         |                                                  kuid_t *
>   ../fs/proc/proc_sysctl.c:483:50: note: expected ‘kgid_t *’ but argument is of type ‘kuid_t *’
>   ../fs/proc/proc_sysctl.c:483:17: error: too many arguments to function ‘root->set_ownership’
>     483 |                 root->set_ownership(head, table, &inode->i_uid, &inode->i_gid);
>         |                 ^~~~
>   cc1: some warnings being treated as errors
>   make[5]: *** [../scripts/Makefile.build:243: fs/proc/proc_sysctl.o] Error 1
>     CC      fs/xfs/libxfs/xfs_dir2_node.o
>   make[5]: *** Waiting for unfinished jobs....
>   ...
> 
> I'm guessing its just a matter of removing the table arg from
> proc_sys_make_inode?

Yes, for this error it's correct.

There are also new implementors of the set_ownership callback in ipc/
which need to be adapted.

I'll send a new revision.

Thomas




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux