tree:
https://android.googlesource.com/kernel/common android-mainline-tracking
head: 74f61c888eeeb9cbc57d44c61fafe32df9b3da51
commit: cf0772edababbf59ea06a5aed0345bdbd76e2d92 [409/836] ANDROID: Incremental fs:
Separate pseudo-file code
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-mainline-tracking
git checkout cf0772edababbf59ea06a5aed0345bdbd76e2d92
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the android-common/android-mainline-tracking HEAD
74f61c888eeeb9cbc57d44c61fafe32df9b3da51 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
fs/incfs/pseudo_files.c: In function 'chmod':
> fs/incfs/pseudo_files.c:325:24: error: passing argument 1 of
'notify_change' from incompatible pointer type
[-Werror=incompatible-pointer-types]
325 | error = notify_change(dentry,
&newattrs, &delegated_inode);
| ^~~~~~
| |
| struct dentry *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:2865:19: note: expected 'struct user_namespace *' but
argument is of type 'struct dentry *'
2865 | int notify_change(struct user_namespace *, struct dentry *,
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:325:32: error: passing argument 2 of 'notify_change'
from incompatible pointer type [-Werror=incompatible-pointer-types]
325 | error = notify_change(dentry, &newattrs, &delegated_inode);
| ^~~~~~~~~
| |
| struct iattr *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:2865:44: note: expected 'struct dentry *' but argument is of
type 'struct iattr *'
2865 | int notify_change(struct user_namespace *, struct dentry *,
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:325:43: error: passing argument 3 of 'notify_change'
from incompatible pointer type [-Werror=incompatible-pointer-types]
325 | error = notify_change(dentry, &newattrs, &delegated_inode);
| ^~~~~~~~~~~~~~~~
| |
| struct inode **
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:2866:5: note: expected 'struct iattr *' but argument is of
type 'struct inode **'
2866 | struct iattr *, struct inode **);
| ^~~~~~~~~~~~~~
> fs/incfs/pseudo_files.c:325:10: error: too few arguments to
function 'notify_change'
325 | error = notify_change(dentry,
&newattrs, &delegated_inode);
| ^~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:2865:5: note: declared here
2865 | int notify_change(struct user_namespace *, struct dentry *,
| ^~~~~~~~~~~~~
fs/incfs/pseudo_files.c: In function 'dir_relative_path_resolve':
> fs/incfs/pseudo_files.c:395:2: error: implicit declaration of
function 'ksys_close'; did you mean 'ksys_chown'?
[-Werror=implicit-function-declaration]
395 | ksys_close(dir_fd);
| ^~~~~~~~~~
| ksys_chown
fs/incfs/pseudo_files.c: In function 'ioctl_create_file':
> fs/incfs/pseudo_files.c:615:21: error: passing argument 1 of
'vfs_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
615 | error = vfs_create(index_dir_inode, index_file_dentry, args.mode |
0222,
| ^~~~~~~~~~~~~~~
| |
| struct inode *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1771:16: note: expected 'struct user_namespace *' but
argument is of type 'struct inode *'
1771 | int vfs_create(struct user_namespace *, struct inode *,
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:615:38: error: passing argument 2 of 'vfs_create' from
incompatible pointer type [-Werror=incompatible-pointer-types]
615 | error = vfs_create(index_dir_inode, index_file_dentry, args.mode | 0222,
| ^~~~~~~~~~~~~~~~~
| |
| struct dentry *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1771:41: note: expected 'struct inode *' but argument is of
type 'struct dentry *'
1771 | int vfs_create(struct user_namespace *, struct inode *,
| ^~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:615:67: warning: passing argument 3 of 'vfs_create'
makes pointer from integer without a cast [-Wint-conversion]
615 | error = vfs_create(index_dir_inode, index_file_dentry, args.mode | 0222,
| ~~~~~~~~~~^~~~~~
| |
| int
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1772:9: note: expected 'struct dentry *' but argument is of
type 'int'
1772 | struct dentry *, umode_t, bool);
| ^~~~~~~~~~~~~~~
> fs/incfs/pseudo_files.c:615:10: error: too few arguments to
function 'vfs_create'
615 | error = vfs_create(index_dir_inode,
index_file_dentry, args.mode | 0222,
| ^~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1771:5: note: declared here
1771 | int vfs_create(struct user_namespace *, struct inode *,
| ^~~~~~~~~~
> fs/incfs/pseudo_files.c:633:23: error: passing argument 1 of
'vfs_setxattr' from incompatible pointer type [-Werror=incompatible-pointer-types]
633 | error = vfs_setxattr(index_file_dentry, INCFS_XATTR_ID_NAME,
| ^~~~~~~~~~~~~~~~~
| |
| struct dentry *
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:18: note: expected 'struct user_namespace *' but
argument is of type 'struct dentry *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:12:
include/uapi/linux/incrementalfs.h:33:29: error: passing argument 2 of
'vfs_setxattr' from incompatible pointer type
[-Werror=incompatible-pointer-types]
33 | #define INCFS_XATTR_ID_NAME (XATTR_USER_PREFIX "incfs.id")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
fs/incfs/pseudo_files.c:633:42: note: in expansion of macro
'INCFS_XATTR_ID_NAME'
633 | error = vfs_setxattr(index_file_dentry, INCFS_XATTR_ID_NAME,
| ^~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:43: note: expected 'struct dentry *' but argument is
of type 'char *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:634:16: warning: passing argument 4 of 'vfs_setxattr'
makes pointer from integer without a cast [-Wint-conversion]
634 | file_id_str, strlen(file_id_str), XATTR_CREATE);
| ^~~~~~~~~~~~~~~~~~~
| |
| size_t {aka long unsigned int}
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:64:4: note: expected 'const void *' but argument is of
type 'size_t' {aka 'long unsigned int'}
64 | const void *, size_t, int);
| ^~~~~~~~~~~~
> fs/incfs/pseudo_files.c:633:10: error: too few arguments to
function 'vfs_setxattr'
633 | error = vfs_setxattr(index_file_dentry,
INCFS_XATTR_ID_NAME,
| ^~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:5: note: declared here
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c:642:23: error: passing argument 1 of 'vfs_setxattr'
from incompatible pointer type [-Werror=incompatible-pointer-types]
642 | error = vfs_setxattr(index_file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~~~~~~
| |
| struct dentry *
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:18: note: expected 'struct user_namespace *' but
argument is of type 'struct dentry *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:12:
include/uapi/linux/incrementalfs.h:34:31: error: passing argument 2 of
'vfs_setxattr' from incompatible pointer type
[-Werror=incompatible-pointer-types]
34 | #define INCFS_XATTR_SIZE_NAME (XATTR_USER_PREFIX "incfs.size")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
fs/incfs/pseudo_files.c:642:42: note: in expansion of macro
'INCFS_XATTR_SIZE_NAME'
642 | error = vfs_setxattr(index_file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:43: note: expected 'struct dentry *' but argument is
of type 'char *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:643:29: warning: passing argument 4 of 'vfs_setxattr'
makes pointer from integer without a cast [-Wint-conversion]
643 | (char *)&size_attr_value, sizeof(size_attr_value),
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:64:4: note: expected 'const void *' but argument is of
type 'long unsigned int'
64 | const void *, size_t, int);
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c:642:10: error: too few arguments to function
'vfs_setxattr'
642 | error = vfs_setxattr(index_file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:5: note: declared here
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c:670:24: error: passing argument 1 of 'vfs_setxattr'
from incompatible pointer type [-Werror=incompatible-pointer-types]
670 | error = vfs_setxattr(index_file_dentry,
| ^~~~~~~~~~~~~~~~~
| |
| struct dentry *
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:18: note: expected 'struct user_namespace *' but
argument is of type 'struct dentry *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:12:
include/uapi/linux/incrementalfs.h:35:35: error: passing argument 2 of
'vfs_setxattr' from incompatible pointer type
[-Werror=incompatible-pointer-types]
35 | #define INCFS_XATTR_METADATA_NAME (XATTR_USER_PREFIX
"incfs.metadata")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
fs/incfs/pseudo_files.c:671:5: note: in expansion of macro
'INCFS_XATTR_METADATA_NAME'
671 | INCFS_XATTR_METADATA_NAME,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:43: note: expected 'struct dentry *' but argument is
of type 'char *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:672:21: warning: passing argument 4 of 'vfs_setxattr'
makes pointer from integer without a cast [-Wint-conversion]
672 | attr_value, args.file_attr_len,
| ~~~~^~~~~~~~~~~~~~
| |
| __u32 {aka unsigned int}
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:64:4: note: expected 'const void *' but argument is of
type '__u32' {aka 'unsigned int'}
64 | const void *, size_t, int);
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c:670:11: error: too few arguments to function
'vfs_setxattr'
670 | error = vfs_setxattr(index_file_dentry,
| ^~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:5: note: declared here
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c: In function 'ioctl_create_mapped_file':
> fs/incfs/pseudo_files.c:819:23: error: passing argument 1 of
'vfs_getxattr' from incompatible pointer type [-Werror=incompatible-pointer-types]
819 | error = vfs_getxattr(source_file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~~~~~~~
| |
| struct dentry *
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:53:22: note: expected 'struct user_namespace *' but
argument is of type 'struct dentry *'
53 | ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:12:
include/uapi/linux/incrementalfs.h:34:31: error: passing argument 2 of
'vfs_getxattr' from incompatible pointer type
[-Werror=incompatible-pointer-types]
34 | #define INCFS_XATTR_SIZE_NAME (XATTR_USER_PREFIX "incfs.size")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
fs/incfs/pseudo_files.c:819:43: note: in expansion of macro
'INCFS_XATTR_SIZE_NAME'
819 | error = vfs_getxattr(source_file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:53:47: note: expected 'struct dentry *' but argument is
of type 'char *'
53 | ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:820:35: warning: passing argument 4 of 'vfs_getxattr'
makes pointer from integer without a cast [-Wint-conversion]
820 | (char *)&size_attr_value, sizeof(size_attr_value));
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:54:8: note: expected 'void *' but argument is of type
'long unsigned int'
54 | void *, size_t);
| ^~~~~~
> fs/incfs/pseudo_files.c:819:10: error: too few arguments to
function 'vfs_getxattr'
819 | error = vfs_getxattr(source_file_dentry,
INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:53:9: note: declared here
53 | ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c:869:21: error: passing argument 1 of 'vfs_create' from
incompatible pointer type [-Werror=incompatible-pointer-types]
869 | error = vfs_create(parent_inode, file_dentry, args.mode | 0222, true);
| ^~~~~~~~~~~~
| |
| struct inode *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1771:16: note: expected 'struct user_namespace *' but
argument is of type 'struct inode *'
1771 | int vfs_create(struct user_namespace *, struct inode *,
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:869:35: error: passing argument 2 of 'vfs_create' from
incompatible pointer type [-Werror=incompatible-pointer-types]
869 | error = vfs_create(parent_inode, file_dentry, args.mode | 0222, true);
| ^~~~~~~~~~~
| |
| struct dentry *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1771:41: note: expected 'struct inode *' but argument is of
type 'struct dentry *'
1771 | int vfs_create(struct user_namespace *, struct inode *,
| ^~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:869:58: warning: passing argument 3 of 'vfs_create'
makes pointer from integer without a cast [-Wint-conversion]
869 | error = vfs_create(parent_inode, file_dentry, args.mode | 0222, true);
| ~~~~~~~~~~^~~~~~
| |
| int
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1772:9: note: expected 'struct dentry *' but argument is of
type 'int'
1772 | struct dentry *, umode_t, bool);
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:869:10: error: too few arguments to function
'vfs_create'
869 | error = vfs_create(parent_inode, file_dentry, args.mode | 0222, true);
| ^~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1771:5: note: declared here
1771 | int vfs_create(struct user_namespace *, struct inode *,
| ^~~~~~~~~~
fs/incfs/pseudo_files.c:876:23: error: passing argument 1 of 'vfs_setxattr'
from incompatible pointer type [-Werror=incompatible-pointer-types]
876 | error = vfs_setxattr(file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~
| |
| struct dentry *
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:18: note: expected 'struct user_namespace *' but
argument is of type 'struct dentry *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:12:
include/uapi/linux/incrementalfs.h:34:31: error: passing argument 2 of
'vfs_setxattr' from incompatible pointer type
[-Werror=incompatible-pointer-types]
34 | #define INCFS_XATTR_SIZE_NAME (XATTR_USER_PREFIX "incfs.size")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
fs/incfs/pseudo_files.c:876:36: note: in expansion of macro
'INCFS_XATTR_SIZE_NAME'
876 | error = vfs_setxattr(file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:43: note: expected 'struct dentry *' but argument is
of type 'char *'
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~~~~
fs/incfs/pseudo_files.c:877:29: warning: passing argument 4 of 'vfs_setxattr'
makes pointer from integer without a cast [-Wint-conversion]
877 | (char *)&size_attr_value, sizeof(size_attr_value),
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:64:4: note: expected 'const void *' but argument is of
type 'long unsigned int'
64 | const void *, size_t, int);
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c:876:10: error: too few arguments to function
'vfs_setxattr'
876 | error = vfs_setxattr(file_dentry, INCFS_XATTR_SIZE_NAME,
| ^~~~~~~~~~~~
In file included from include/uapi/linux/incrementalfs.h:17,
from fs/incfs/pseudo_files.c:12:
include/linux/xattr.h:63:5: note: declared here
63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
| ^~~~~~~~~~~~
fs/incfs/pseudo_files.c: In function 'get_pseudo_inode':
> fs/incfs/pseudo_files.c:941:19: error: passing argument 1 of
'inode_init_owner' from incompatible pointer type
[-Werror=incompatible-pointer-types]
941 | inode_init_owner(inode, NULL,
S_IFREG | READ_WRITE_FILE_MODE);
| ^~~~~
| |
| struct inode *
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1828:46: note: expected 'struct user_namespace *' but
argument is of type 'struct inode *'
1828 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from include/linux/stat.h:7,
from include/linux/fs.h:10,
from fs/incfs/pseudo_files.c:7:
include/uapi/linux/stat.h:12:18: warning: passing argument 3 of
'inode_init_owner' makes pointer from integer without a cast [-Wint-conversion]
12 | #define S_IFREG 0100000
fs/incfs/pseudo_files.c:941:32: note: in expansion of macro 'S_IFREG'
941 | inode_init_owner(inode, NULL, S_IFREG | READ_WRITE_FILE_MODE);
| ^~~~~~~
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1829:29: note: expected 'const struct inode *' but argument
is of type 'int'
1829 | const struct inode *dir, umode_t mode);
| ~~~~~~~~~~~~~~~~~~~~^~~
> fs/incfs/pseudo_files.c:941:2: error: too few arguments to
function 'inode_init_owner'
941 | inode_init_owner(inode, NULL,
S_IFREG | READ_WRITE_FILE_MODE);
| ^~~~~~~~~~~~~~~~
In file included from fs/incfs/pseudo_files.c:7:
include/linux/fs.h:1828:6: note: declared here
1828 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/notify_change +325 fs/incfs/pseudo_files.c
313
314 static int chmod(struct dentry *dentry, umode_t mode)
315 {
316 struct inode *inode = dentry->d_inode;
317 struct inode *delegated_inode = NULL;
318 struct iattr newattrs;
319 int error;
320
321 retry_deleg:
322 inode_lock(inode);
323 newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
324 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
325 error = notify_change(dentry, &newattrs,
&delegated_inode);
326 inode_unlock(inode);
327 if (delegated_inode) {
328 error = break_deleg_wait(&delegated_inode);
329 if (!error)
330 goto retry_deleg;
331 }
332 return error;
333 }
334
335 static bool is_pseudo_filename(struct mem_range name)
336 {
337 if (incfs_equal_ranges(pending_reads_file_name_range, name))
338 return true;
339 if (incfs_equal_ranges(log_file_name_range, name))
340 return true;
341
342 return false;
343 }
344
345 static int validate_name(char *file_name)
346 {
347 struct mem_range name = range(file_name, strlen(file_name));
348 int i = 0;
349
350 if (name.len > INCFS_MAX_NAME_LEN)
351 return -ENAMETOOLONG;
352
353 if (is_pseudo_filename(name))
354 return -EINVAL;
355
356 for (i = 0; i < name.len; i++)
357 if (name.data[i] == '/')
358 return -EINVAL;
359
360 return 0;
361 }
362
363 static int dir_relative_path_resolve(
364 struct mount_info *mi,
365 const char __user *relative_path,
366 struct path *result_path)
367 {
368 struct path *base_path = &mi->mi_backing_dir_path;
369 int dir_fd = get_unused_fd_flags(0);
370 struct file *dir_f = NULL;
371 int error = 0;
372
373 if (dir_fd < 0)
374 return dir_fd;
375
376 dir_f = dentry_open(base_path, O_RDONLY | O_NOATIME, mi->mi_owner);
377
378 if (IS_ERR(dir_f)) {
379 error = PTR_ERR(dir_f);
380 goto out;
381 }
382 fd_install(dir_fd, dir_f);
383
384 if (!relative_path) {
385 /* No relative path given, just return the base dir. */
386 *result_path = *base_path;
387 path_get(result_path);
388 goto out;
389 }
390
391 error = user_path_at_empty(dir_fd, relative_path,
392 LOOKUP_FOLLOW | LOOKUP_DIRECTORY, result_path, NULL);
393
394 out:
395 ksys_close(dir_fd);
396 if (error)
397 pr_debug("incfs: %s %d\n", __func__, error);
398 return error;
399 }
400
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org