[arnd-playground:set_fs 6/11] arch/csky/kernel/signal.c:143:14: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git set_fs
head: 0a081326831928b0d739bce68b8c0f9138b9c8ba
commit: a954036380ae20dbfa0c203bf6cafb21d1f3cedd [6/11] uaccess: generalize access_ok()
config: csky-randconfig-s032-20220211 (https://download.01.org/0day-ci/archive/20220212/202202121334.YatMsSbt-lk...)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground set_fs
git checkout a954036380ae20dbfa0c203bf6cafb21d1f3cedd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
arch/csky/kernel/signal.c:142:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct rt_sigframe *frame @@ got void [noderef] __user * @@
arch/csky/kernel/signal.c:142:15: sparse: expected struct rt_sigframe *frame
arch/csky/kernel/signal.c:142:15: sparse: got void [noderef] __user *
>> arch/csky/kernel/signal.c:143:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got struct rt_sigframe *frame @@
arch/csky/kernel/signal.c:143:14: sparse: expected void const [noderef] __user *ptr
arch/csky/kernel/signal.c:143:14: sparse: got struct rt_sigframe *frame
arch/csky/kernel/signal.c:146:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct siginfo [noderef] [usertype] __user *to @@ got struct siginfo * @@
arch/csky/kernel/signal.c:146:38: sparse: expected struct siginfo [noderef] [usertype] __user *to
arch/csky/kernel/signal.c:146:38: sparse: got struct siginfo *
arch/csky/kernel/signal.c:149:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long * @@
arch/csky/kernel/signal.c:149:16: sparse: expected void const volatile [noderef] __user *ptr
arch/csky/kernel/signal.c:149:16: sparse: got unsigned long *
arch/csky/kernel/signal.c:149:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *ptr @@ got unsigned long * @@
arch/csky/kernel/signal.c:149:16: sparse: expected void [noderef] __user *ptr
arch/csky/kernel/signal.c:149:16: sparse: got unsigned long *
arch/csky/kernel/signal.c:150:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got struct ucontext ** @@
arch/csky/kernel/signal.c:150:16: sparse: expected void const volatile [noderef] __user *ptr
arch/csky/kernel/signal.c:150:16: sparse: got struct ucontext **
arch/csky/kernel/signal.c:150:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *ptr @@ got struct ucontext ** @@
arch/csky/kernel/signal.c:150:16: sparse: expected void [noderef] __user *ptr
arch/csky/kernel/signal.c:150:16: sparse: got struct ucontext **
arch/csky/kernel/signal.c:151:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sigaltstack [noderef] [usertype] __user * @@ got struct sigaltstack * @@
arch/csky/kernel/signal.c:151:33: sparse: expected struct sigaltstack [noderef] [usertype] __user *
arch/csky/kernel/signal.c:151:33: sparse: got struct sigaltstack *
arch/csky/kernel/signal.c:152:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rt_sigframe [noderef] __user *frame @@ got struct rt_sigframe *frame @@
arch/csky/kernel/signal.c:152:33: sparse: expected struct rt_sigframe [noderef] __user *frame
arch/csky/kernel/signal.c:152:33: sparse: got struct rt_sigframe *frame
arch/csky/kernel/signal.c:153:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct sigset_t * @@
arch/csky/kernel/signal.c:153:32: sparse: expected void [noderef] __user *to
arch/csky/kernel/signal.c:153:32: sparse: got struct sigset_t *
arch/csky/kernel/signal.c: note: in included file:
include/linux/uaccess.h:107:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
include/linux/uaccess.h:107:39: sparse: expected void const *from
include/linux/uaccess.h:107:39: sparse: got void const [noderef] __user *from
include/linux/uaccess.h:141:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:141:33: sparse: expected void *to
include/linux/uaccess.h:141:33: sparse: got void [noderef] __user *to
include/linux/uaccess.h:107:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
include/linux/uaccess.h:107:39: sparse: expected void const *from
include/linux/uaccess.h:107:39: sparse: got void const [noderef] __user *from
include/linux/uaccess.h:107:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
include/linux/uaccess.h:107:39: sparse: expected void const *from
include/linux/uaccess.h:107:39: sparse: got void const [noderef] __user *from
include/linux/uaccess.h:141:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:141:33: sparse: expected void *to
include/linux/uaccess.h:141:33: sparse: got void [noderef] __user *to
arch/csky/kernel/signal.c: note: in included file (through include/linux/uaccess.h):
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: cast removes address space '__user' of expression
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: asm output is not an lvalue
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: cast removes address space '__user' of expression
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: cast removes address space '__user' of expression
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: asm output is not an lvalue
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: cast removes address space '__user' of expression
arch/csky/kernel/signal.c: note: in included file:
include/linux/uaccess.h:141:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:141:33: sparse: expected void *to
include/linux/uaccess.h:141:33: sparse: got void [noderef] __user *to
arch/csky/kernel/signal.c: note: in included file (through include/linux/uaccess.h):
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: generating address of non-lvalue (11)
arch/csky/include/asm/uaccess.h:112:17: sparse: sparse: generating address of non-lvalue (11)
vim +143 arch/csky/kernel/signal.c
e9564df753fd54 Guo Ren 2018-09-05 135
e9564df753fd54 Guo Ren 2018-09-05 136 static int
e9564df753fd54 Guo Ren 2018-09-05 137 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
e9564df753fd54 Guo Ren 2018-09-05 138 {
e9564df753fd54 Guo Ren 2018-09-05 139 struct rt_sigframe *frame;
e9564df753fd54 Guo Ren 2018-09-05 140 int err = 0;
e9564df753fd54 Guo Ren 2018-09-05 141
bf241682936293 Guo Ren 2019-04-01 @142 frame = get_sigframe(ksig, regs, sizeof(*frame));
bf241682936293 Guo Ren 2019-04-01 @143 if (!access_ok(frame, sizeof(*frame)))
bf241682936293 Guo Ren 2019-04-01 144 return -EFAULT;
e9564df753fd54 Guo Ren 2018-09-05 145
e9564df753fd54 Guo Ren 2018-09-05 146 err |= copy_siginfo_to_user(&frame->info, &ksig->info);
e9564df753fd54 Guo Ren 2018-09-05 147
e9564df753fd54 Guo Ren 2018-09-05 148 /* Create the ucontext. */
e9564df753fd54 Guo Ren 2018-09-05 149 err |= __put_user(0, &frame->uc.uc_flags);
bf241682936293 Guo Ren 2019-04-01 150 err |= __put_user(NULL, &frame->uc.uc_link);
bf241682936293 Guo Ren 2019-04-01 151 err |= __save_altstack(&frame->uc.uc_stack, regs->usp);
bf241682936293 Guo Ren 2019-04-01 152 err |= setup_sigcontext(frame, regs);
bf241682936293 Guo Ren 2019-04-01 153 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
e9564df753fd54 Guo Ren 2018-09-05 154 if (err)
bf241682936293 Guo Ren 2019-04-01 155 return -EFAULT;
e9564df753fd54 Guo Ren 2018-09-05 156
bf241682936293 Guo Ren 2019-04-01 157 /* Set up to return from userspace. */
87f3248cdb9aea Guo Ren 2021-01-04 158 regs->lr = (unsigned long)VDSO_SYMBOL(
87f3248cdb9aea Guo Ren 2021-01-04 159 current->mm->context.vdso, rt_sigreturn);
e9564df753fd54 Guo Ren 2018-09-05 160
bf241682936293 Guo Ren 2019-04-01 161 /*
bf241682936293 Guo Ren 2019-04-01 162 * Set up registers for signal handler.
bf241682936293 Guo Ren 2019-04-01 163 * Registers that we don't modify keep the value they had from
bf241682936293 Guo Ren 2019-04-01 164 * user-space at the time we took the signal.
bf241682936293 Guo Ren 2019-04-01 165 * We always pass siginfo and mcontext, regardless of SA_SIGINFO,
bf241682936293 Guo Ren 2019-04-01 166 * since some things rely on this (e.g. glibc's debug/segfault.c).
bf241682936293 Guo Ren 2019-04-01 167 */
bf241682936293 Guo Ren 2019-04-01 168 regs->pc = (unsigned long)ksig->ka.sa.sa_handler;
bf241682936293 Guo Ren 2019-04-01 169 regs->usp = (unsigned long)frame;
bf241682936293 Guo Ren 2019-04-01 170 regs->a0 = ksig->sig; /* a0: signal number */
bf241682936293 Guo Ren 2019-04-01 171 regs->a1 = (unsigned long)(&(frame->info)); /* a1: siginfo pointer */
bf241682936293 Guo Ren 2019-04-01 172 regs->a2 = (unsigned long)(&(frame->uc)); /* a2: ucontext pointer */
e9564df753fd54 Guo Ren 2018-09-05 173
bf241682936293 Guo Ren 2019-04-01 174 return 0;
e9564df753fd54 Guo Ren 2018-09-05 175 }
e9564df753fd54 Guo Ren 2018-09-05 176
:::::: The code at line 143 was first introduced by commit
:::::: bf241682936293291dcf40fd93cdd0f5e6222902 csky: Reconstruct signal processing
:::::: TO: Guo Ren <ren_guo(a)c-sky.com>
:::::: CC: Guo Ren <ren_guo(a)c-sky.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[kdave-btrfs-devel:for-next 79/93] fs/btrfs/ordered-data.c:168: warning: expecting prototype for Add an ordered extent to the per(). Prototype was for btrfs_add_ordered_extent() instead
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git for-next
head: 57b409a8644b7c0f8974ff16b3a5e231cccc3ec3
commit: acfd26ee6a09af2a5c347978407fddcd8819e534 [79/93] btrfs: add ram_bytes and offset to btrfs_ordered_extent
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220212/202202121310.oqkfnupw-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/kdave/btrfs-devel/commit/acfd26ee6a09af2a5c347978407fd...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel for-next
git checkout acfd26ee6a09af2a5c347978407fddcd8819e534
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash fs/btrfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/btrfs/ordered-data.c:168: warning: expecting prototype for Add an ordered extent to the per(). Prototype was for btrfs_add_ordered_extent() instead
vim +168 fs/btrfs/ordered-data.c
dc17ff8f11d129 Chris Mason 2008-01-08 145
acfd26ee6a09af Omar Sandoval 2019-11-06 146 /**
acfd26ee6a09af Omar Sandoval 2019-11-06 147 * Add an ordered extent to the per-inode tree.
acfd26ee6a09af Omar Sandoval 2019-11-06 148 *
acfd26ee6a09af Omar Sandoval 2019-11-06 149 * @inode: Inode that this extent is for.
acfd26ee6a09af Omar Sandoval 2019-11-06 150 * @file_offset: Logical offset in file where the extent starts.
acfd26ee6a09af Omar Sandoval 2019-11-06 151 * @num_bytes: Logical length of extent in file.
acfd26ee6a09af Omar Sandoval 2019-11-06 152 * @ram_bytes: Full length of unencoded data.
acfd26ee6a09af Omar Sandoval 2019-11-06 153 * @disk_bytenr: Offset of extent on disk.
acfd26ee6a09af Omar Sandoval 2019-11-06 154 * @disk_num_bytes: Size of extent on disk.
acfd26ee6a09af Omar Sandoval 2019-11-06 155 * @offset: Offset into unencoded data where file data starts.
acfd26ee6a09af Omar Sandoval 2019-11-06 156 * @flags: Flags specifying type of extent (1 << BTRFS_ORDERED_*).
acfd26ee6a09af Omar Sandoval 2019-11-06 157 * @compress_type: Compression algorithm used for data.
acfd26ee6a09af Omar Sandoval 2019-11-06 158 *
acfd26ee6a09af Omar Sandoval 2019-11-06 159 * Most of these parameters correspond to &struct btrfs_file_extent_item. The
acfd26ee6a09af Omar Sandoval 2019-11-06 160 * tree is given a single reference on the ordered extent that was inserted.
eb84ae039e10f1 Chris Mason 2008-07-17 161 *
acfd26ee6a09af Omar Sandoval 2019-11-06 162 * Return: 0 or -ENOMEM.
eb84ae039e10f1 Chris Mason 2008-07-17 163 */
acfd26ee6a09af Omar Sandoval 2019-11-06 164 int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset,
acfd26ee6a09af Omar Sandoval 2019-11-06 165 u64 num_bytes, u64 ram_bytes, u64 disk_bytenr,
acfd26ee6a09af Omar Sandoval 2019-11-06 166 u64 disk_num_bytes, u64 offset, unsigned flags,
bffe633e00fb6b Omar Sandoval 2019-12-02 167 int compress_type)
dc17ff8f11d129 Chris Mason 2008-01-08 @168 {
da69fea9f785d8 Nikolay Borisov 2020-06-03 169 struct btrfs_root *root = inode->root;
da69fea9f785d8 Nikolay Borisov 2020-06-03 170 struct btrfs_fs_info *fs_info = root->fs_info;
da69fea9f785d8 Nikolay Borisov 2020-06-03 171 struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree;
e6dcd2dc9c4891 Chris Mason 2008-07-17 172 struct rb_node *node;
e6dcd2dc9c4891 Chris Mason 2008-07-17 173 struct btrfs_ordered_extent *entry;
7dbeaad0af7d0a Qu Wenruo 2020-06-10 174 int ret;
dc17ff8f11d129 Chris Mason 2008-01-08 175
acfd26ee6a09af Omar Sandoval 2019-11-06 176 if (flags &
acfd26ee6a09af Omar Sandoval 2019-11-06 177 ((1 << BTRFS_ORDERED_NOCOW) | (1 << BTRFS_ORDERED_PREALLOC))) {
7dbeaad0af7d0a Qu Wenruo 2020-06-10 178 /* For nocow write, we can release the qgroup rsv right now */
8b8a979f1fc690 Nikolay Borisov 2020-06-03 179 ret = btrfs_qgroup_free_data(inode, NULL, file_offset, num_bytes);
7dbeaad0af7d0a Qu Wenruo 2020-06-10 180 if (ret < 0)
7dbeaad0af7d0a Qu Wenruo 2020-06-10 181 return ret;
7dbeaad0af7d0a Qu Wenruo 2020-06-10 182 ret = 0;
7dbeaad0af7d0a Qu Wenruo 2020-06-10 183 } else {
7dbeaad0af7d0a Qu Wenruo 2020-06-10 184 /*
7dbeaad0af7d0a Qu Wenruo 2020-06-10 185 * The ordered extent has reserved qgroup space, release now
7dbeaad0af7d0a Qu Wenruo 2020-06-10 186 * and pass the reserved number for qgroup_record to free.
7dbeaad0af7d0a Qu Wenruo 2020-06-10 187 */
72b7d15bf1e1ee Nikolay Borisov 2020-06-03 188 ret = btrfs_qgroup_release_data(inode, file_offset, num_bytes);
7dbeaad0af7d0a Qu Wenruo 2020-06-10 189 if (ret < 0)
7dbeaad0af7d0a Qu Wenruo 2020-06-10 190 return ret;
7dbeaad0af7d0a Qu Wenruo 2020-06-10 191 }
6352b91da1a210 Miao Xie 2012-09-06 192 entry = kmem_cache_zalloc(btrfs_ordered_extent_cache, GFP_NOFS);
dc17ff8f11d129 Chris Mason 2008-01-08 193 if (!entry)
dc17ff8f11d129 Chris Mason 2008-01-08 194 return -ENOMEM;
dc17ff8f11d129 Chris Mason 2008-01-08 195
e6dcd2dc9c4891 Chris Mason 2008-07-17 196 entry->file_offset = file_offset;
bffe633e00fb6b Omar Sandoval 2019-12-02 197 entry->num_bytes = num_bytes;
acfd26ee6a09af Omar Sandoval 2019-11-06 198 entry->ram_bytes = ram_bytes;
acfd26ee6a09af Omar Sandoval 2019-11-06 199 entry->disk_bytenr = disk_bytenr;
bffe633e00fb6b Omar Sandoval 2019-12-02 200 entry->disk_num_bytes = disk_num_bytes;
acfd26ee6a09af Omar Sandoval 2019-11-06 201 entry->offset = offset;
bffe633e00fb6b Omar Sandoval 2019-12-02 202 entry->bytes_left = num_bytes;
da69fea9f785d8 Nikolay Borisov 2020-06-03 203 entry->inode = igrab(&inode->vfs_inode);
261507a02ccba9 Li Zefan 2010-12-17 204 entry->compress_type = compress_type;
77cef2ec548456 Josef Bacik 2013-08-29 205 entry->truncated_len = (u64)-1;
7dbeaad0af7d0a Qu Wenruo 2020-06-10 206 entry->qgroup_rsv = ret;
d8e3fb106f3938 Naohiro Aota 2021-02-04 207 entry->physical = (u64)-1;
3c198fe064491d Qu Wenruo 2021-01-21 208
acfd26ee6a09af Omar Sandoval 2019-11-06 209 ASSERT((flags & ~BTRFS_ORDERED_TYPE_FLAGS) == 0);
acfd26ee6a09af Omar Sandoval 2019-11-06 210 entry->flags = flags;
3eaa2885276fd6 Chris Mason 2008-07-24 211
5deb17e18e27a3 Josef Bacik 2020-10-09 212 percpu_counter_add_batch(&fs_info->ordered_bytes, num_bytes,
4297ff84dc24d1 Josef Bacik 2019-04-10 213 fs_info->delalloc_batch);
5deb17e18e27a3 Josef Bacik 2020-10-09 214
e6dcd2dc9c4891 Chris Mason 2008-07-17 215 /* one ref for the tree */
e76edab7f059bc Elena Reshetova 2017-03-03 216 refcount_set(&entry->refs, 1);
e6dcd2dc9c4891 Chris Mason 2008-07-17 217 init_waitqueue_head(&entry->wait);
e6dcd2dc9c4891 Chris Mason 2008-07-17 218 INIT_LIST_HEAD(&entry->list);
487781796d3022 Filipe Manana 2020-08-11 219 INIT_LIST_HEAD(&entry->log_list);
3eaa2885276fd6 Chris Mason 2008-07-24 220 INIT_LIST_HEAD(&entry->root_extent_list);
9afab8820bb8b5 Miao Xie 2012-10-25 221 INIT_LIST_HEAD(&entry->work_list);
9afab8820bb8b5 Miao Xie 2012-10-25 222 init_completion(&entry->completion);
dc17ff8f11d129 Chris Mason 2008-01-08 223
acbf1dd0fcbd10 Nikolay Borisov 2020-08-31 224 trace_btrfs_ordered_extent_add(inode, entry);
1abe9b8a138c99 liubo 2011-03-24 225
5fd02043553b02 Josef Bacik 2012-05-02 226 spin_lock_irq(&tree->lock);
e6dcd2dc9c4891 Chris Mason 2008-07-17 227 node = tree_insert(&tree->tree, file_offset,
e6dcd2dc9c4891 Chris Mason 2008-07-17 228 &entry->rb_node);
43c04fb1b8c9f4 Jeff Mahoney 2011-10-03 229 if (node)
511a32b5493f0d Nikolay Borisov 2019-11-29 230 btrfs_panic(fs_info, -EEXIST,
511a32b5493f0d Nikolay Borisov 2019-11-29 231 "inconsistency in ordered tree at offset %llu",
511a32b5493f0d Nikolay Borisov 2019-11-29 232 file_offset);
5fd02043553b02 Josef Bacik 2012-05-02 233 spin_unlock_irq(&tree->lock);
d397712bcc6a75 Chris Mason 2009-01-05 234
199c2a9c3d1389 Miao Xie 2013-05-15 235 spin_lock(&root->ordered_extent_lock);
3eaa2885276fd6 Chris Mason 2008-07-24 236 list_add_tail(&entry->root_extent_list,
199c2a9c3d1389 Miao Xie 2013-05-15 237 &root->ordered_extents);
199c2a9c3d1389 Miao Xie 2013-05-15 238 root->nr_ordered_extents++;
199c2a9c3d1389 Miao Xie 2013-05-15 239 if (root->nr_ordered_extents == 1) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 240 spin_lock(&fs_info->ordered_root_lock);
199c2a9c3d1389 Miao Xie 2013-05-15 241 BUG_ON(!list_empty(&root->ordered_root));
0b246afa62b0cf Jeff Mahoney 2016-06-22 242 list_add_tail(&root->ordered_root, &fs_info->ordered_roots);
0b246afa62b0cf Jeff Mahoney 2016-06-22 243 spin_unlock(&fs_info->ordered_root_lock);
199c2a9c3d1389 Miao Xie 2013-05-15 244 }
199c2a9c3d1389 Miao Xie 2013-05-15 245 spin_unlock(&root->ordered_extent_lock);
3eaa2885276fd6 Chris Mason 2008-07-24 246
8b62f87bad9cf0 Josef Bacik 2017-10-19 247 /*
8b62f87bad9cf0 Josef Bacik 2017-10-19 248 * We don't need the count_max_extents here, we can assume that all of
8b62f87bad9cf0 Josef Bacik 2017-10-19 249 * that work has been done at higher layers, so this is truly the
8b62f87bad9cf0 Josef Bacik 2017-10-19 250 * smallest the extent is going to get.
8b62f87bad9cf0 Josef Bacik 2017-10-19 251 */
da69fea9f785d8 Nikolay Borisov 2020-06-03 252 spin_lock(&inode->lock);
da69fea9f785d8 Nikolay Borisov 2020-06-03 253 btrfs_mod_outstanding_extents(inode, 1);
da69fea9f785d8 Nikolay Borisov 2020-06-03 254 spin_unlock(&inode->lock);
8b62f87bad9cf0 Josef Bacik 2017-10-19 255
dc17ff8f11d129 Chris Mason 2008-01-08 256 return 0;
dc17ff8f11d129 Chris Mason 2008-01-08 257 }
dc17ff8f11d129 Chris Mason 2008-01-08 258
:::::: The code at line 168 was first introduced by commit
:::::: dc17ff8f11d129db9e83ab7244769e4eae05e14d Btrfs: Add data=ordered support
:::::: TO: Chris Mason <chris.mason(a)oracle.com>
:::::: CC: Chris Mason <chris.mason(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[peterz-queue:locking/core 6/7] kernel/locking/lockdep.c:6017:57: error: 'offset' undeclared; did you mean 'off_t'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head: 2300c94a775d0f2a733ef11285cc0abe8126edf6
commit: 065af96d73df2653a2d7da572cf8ba57218479ef [6/7] locking/lockdep: Cleanup reinit_class()
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220212/202202121348.Uty03Al8-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/core
git checkout 065af96d73df2653a2d7da572cf8ba57218479ef
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
kernel/locking/lockdep.c: In function 'reinit_class':
>> kernel/locking/lockdep.c:6017:57: error: 'offset' undeclared (first use in this function); did you mean 'off_t'?
6017 | BUILD_BUG_ON(offsetof(struct lock_class, lock_entry) > offset);
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in definition of macro '__compiletime_assert'
326 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:346:2: note: in expansion of macro '_compiletime_assert'
346 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
kernel/locking/lockdep.c:6017:2: note: in expansion of macro 'BUILD_BUG_ON'
6017 | BUILD_BUG_ON(offsetof(struct lock_class, lock_entry) > offset);
| ^~~~~~~~~~~~
kernel/locking/lockdep.c:6017:57: note: each undeclared identifier is reported only once for each function it appears in
6017 | BUILD_BUG_ON(offsetof(struct lock_class, lock_entry) > offset);
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in definition of macro '__compiletime_assert'
326 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:346:2: note: in expansion of macro '_compiletime_assert'
346 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
kernel/locking/lockdep.c:6017:2: note: in expansion of macro 'BUILD_BUG_ON'
6017 | BUILD_BUG_ON(offsetof(struct lock_class, lock_entry) > offset);
| ^~~~~~~~~~~~
vim +6017 kernel/locking/lockdep.c
6011
6012 static void reinit_class(struct lock_class *class)
6013 {
6014 WARN_ON_ONCE(!class->lock_entry.next);
6015 WARN_ON_ONCE(!list_empty(&class->locks_after));
6016 WARN_ON_ONCE(!list_empty(&class->locks_before));
> 6017 BUILD_BUG_ON(offsetof(struct lock_class, lock_entry) > offset);
6018 BUILD_BUG_ON(offsetof(struct lock_class, locks_after) > offset);
6019 BUILD_BUG_ON(offsetof(struct lock_class, locks_before) > offset);
6020 memset_startat(class, 0, key);
6021 }
6022
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[nbd168-wireless:mtk-flow-offload 9/9] drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1414:28: warning: variable 'phy' set but not used
by kernel test robot
tree: https://github.com/nbd168/wireless mtk-flow-offload
head: 1ba2137278dd5c4747b6e43be7aae4e94fb9c76e
commit: 1ba2137278dd5c4747b6e43be7aae4e94fb9c76e [9/9] mt76: mt7915: add Wireless Ethernet Dispatch support
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220212/202202121320.bRZMLlj6-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/nbd168/wireless/commit/1ba2137278dd5c4747b6e43be7aae4e...
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mtk-flow-offload
git checkout 1ba2137278dd5c4747b6e43be7aae4e94fb9c76e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7915/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7915/mac.c: In function 'mt7915_txwi_free':
>> drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1414:28: warning: variable 'phy' set but not used [-Wunused-but-set-variable]
1414 | struct mt7915_phy *phy;
| ^~~
vim +/phy +1414 drivers/net/wireless/mediatek/mt76/mt7915/mac.c
1407
1408 static void
1409 mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
1410 struct ieee80211_sta *sta, struct list_head *free_list)
1411 {
1412 struct mt76_dev *mdev = &dev->mt76;
1413 struct mt7915_sta *msta;
> 1414 struct mt7915_phy *phy;
1415 struct mt76_wcid *wcid;
1416 __le32 *txwi;
1417 u16 wcid_idx;
1418
1419 mt7915_txp_skb_unmap(mdev, t);
1420 if (!t->skb)
1421 goto out;
1422
1423 txwi = (__le32 *)mt76_get_txwi_ptr(mdev, t);
1424 if (sta) {
1425 wcid = (struct mt76_wcid *)sta->drv_priv;
1426 wcid_idx = wcid->idx;
1427 } else {
1428 wcid_idx = FIELD_GET(MT_TXD1_WLAN_IDX, le32_to_cpu(txwi[1]));
1429 wcid = rcu_dereference(dev->mt76.wcid[wcid_idx]);
1430
1431 if (wcid && wcid->sta) {
1432 msta = container_of(wcid, struct mt7915_sta, wcid);
1433 sta = container_of((void *)msta, struct ieee80211_sta,
1434 drv_priv);
1435 phy = msta->vif->phy;
1436 spin_lock_bh(&dev->sta_poll_lock);
1437 if (list_empty(&msta->poll_list))
1438 list_add_tail(&msta->poll_list, &dev->sta_poll_list);
1439 spin_unlock_bh(&dev->sta_poll_lock);
1440 }
1441 }
1442
1443 if (sta && likely(t->skb->protocol != cpu_to_be16(ETH_P_PAE)))
1444 mt7915_tx_check_aggr(sta, txwi);
1445
1446 __mt76_tx_complete_skb(mdev, wcid_idx, t->skb, free_list);
1447
1448 out:
1449 t->skb = NULL;
1450 mt76_put_txwi(mdev, t);
1451 }
1452
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH] random: do not take pool spinlock at boot
by kernel test robot
Hi "Jason,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20220211]
[cannot apply to char-misc/char-misc-testing linux/master linus/master v5.17-rc3 v5.17-rc2 v5.17-rc1 v5.17-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/random-do-not-...
base: 6d9bd4ad4ca08b1114e814c2c42383b8b13be631
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20220212/202202121223.7CKs3pQ3-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/cac377f6ab22a8bfe966643ebe19812e8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jason-A-Donenfeld/random-do-not-take-pool-spinlock-at-boot/20220212-083131
git checkout cac377f6ab22a8bfe966643ebe19812e8187de3b
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash drivers/char/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/char/random.c: In function 'rand_initialize':
drivers/char/random.c:162:3: error: implicit declaration of function '_mix_pool_bytes'; did you mean 'mix_pool_bytes'? [-Werror=implicit-function-declaration]
162 | _mix_pool_bytes(&rv, sizeof(rv));
| ^~~~~~~~~~~~~~~
| mix_pool_bytes
drivers/char/random.c: At top level:
>> drivers/char/random.c:822:13: warning: conflicting types for '_mix_pool_bytes'
822 | static void _mix_pool_bytes(const void *in, size_t nbytes)
| ^~~~~~~~~~~~~~~
drivers/char/random.c:822:13: error: static declaration of '_mix_pool_bytes' follows non-static declaration
drivers/char/random.c:162:3: note: previous implicit declaration of '_mix_pool_bytes' was here
162 | _mix_pool_bytes(&rv, sizeof(rv));
| ^~~~~~~~~~~~~~~
drivers/char/random.c:1109:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes]
1109 | void add_hwgenerator_randomness(const void *buffer, size_t count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/_mix_pool_bytes +822 drivers/char/random.c
b980955236922ae Theodore Ts'o 2013-03-04 821
b67959013391e48 Jason A. Donenfeld 2022-02-10 @822 static void _mix_pool_bytes(const void *in, size_t nbytes)
b67959013391e48 Jason A. Donenfeld 2022-02-10 823 {
b67959013391e48 Jason A. Donenfeld 2022-02-10 824 blake2s_update(&input_pool.hash, in, nbytes);
^1da177e4c3f415 Linus Torvalds 2005-04-16 825 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 826
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week