From: David Sterba <dsterba@suse.cz>
To: kernel test robot <lkp@intel.com>
Cc: David Sterba <dsterba@suse.com>, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 1/2] btrfs: open code RCU for device name
Date: Fri, 27 Jun 2025 14:32:13 +0200 [thread overview]
Message-ID: <20250627123213.GG31241@suse.cz> (raw)
In-Reply-To: <202506271745.xBqbUHXo-lkp@intel.com>
On Fri, Jun 27, 2025 at 05:13:20PM +0800, kernel test robot wrote:
> Hi David,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on kdave/for-next]
> [also build test WARNING on next-20250626]
> [cannot apply to linus/master v6.16-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#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/David-Sterba/btrfs-open-code-RCU-for-device-name/20250625-214017
> base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
> patch link: https://lore.kernel.org/r/1e539dfd73debc86ddc7c1b1716f86ace14d51aa.1750858539.git.dsterba%40suse.com
> patch subject: [PATCH v2 1/2] btrfs: open code RCU for device name
> config: powerpc64-randconfig-r133-20250627 (https://download.01.org/0day-ci/archive/20250627/202506271745.xBqbUHXo-lkp@intel.com/config)
> compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project e04c938cc08a90ae60440ce22d072ebc69d67ee8)
> reproduce: (https://download.01.org/0day-ci/archive/20250627/202506271745.xBqbUHXo-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202506271745.xBqbUHXo-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> fs/btrfs/volumes.c:407:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *objp @@ got char const [noderef] __rcu *name @@
> fs/btrfs/volumes.c:407:21: sparse: expected void const *objp
> fs/btrfs/volumes.c:407:21: sparse: got char const [noderef] __rcu *name
> >> fs/btrfs/volumes.c:661:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *device_path @@ got char const [noderef] __rcu *name @@
> fs/btrfs/volumes.c:661:43: sparse: expected char const *device_path
> fs/btrfs/volumes.c:661:43: sparse: got char const [noderef] __rcu *name
> >> fs/btrfs/volumes.c:1022:34: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char const *dev_path @@ got char const [noderef] __rcu *name @@
> fs/btrfs/volumes.c:1022:34: sparse: expected char const *dev_path
> fs/btrfs/volumes.c:1022:34: sparse: got char const [noderef] __rcu *name
> >> fs/btrfs/volumes.c:1424:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const * @@ got char const [noderef] __rcu *name @@
> fs/btrfs/volumes.c:1424:42: sparse: expected char const *
> fs/btrfs/volumes.c:1424:42: sparse: got char const [noderef] __rcu *name
> fs/btrfs/volumes.c:2174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *device_path @@ got char const [noderef] __rcu *name @@
> fs/btrfs/volumes.c:2174:31: sparse: expected char const *device_path
> fs/btrfs/volumes.c:2174:31: sparse: got char const [noderef] __rcu *name
>
> vim +407 fs/btrfs/volumes.c
>
> 2208a378f35fea7 Ilya Dryomov 2013-08-12 402
> f2db4d5cb457b7d Filipe Manana 2023-04-26 403 static void btrfs_free_device(struct btrfs_device *device)
> 48dae9cf3f95acc David Sterba 2017-10-30 404 {
> bbbf7243d62d8be Nikolay Borisov 2019-03-25 405 WARN_ON(!list_empty(&device->post_commit_list));
> 9fc9a5a2dc4bd09 David Sterba 2025-06-09 406 /* No need to call kfree_rcu(), nothing is reading the device name. */
> 9fc9a5a2dc4bd09 David Sterba 2025-06-09 @407 kfree(device->name);
All the warnings are for places where raw ->name is used because we know
it's safe given the context. A rcu_dereference would work and is not
necessary but will trigger the warnings. OTOH if there isn't the __rcu
annotation we can't get any checks where it would be desired.
next prev parent reply other threads:[~2025-06-27 12:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 13:37 [PATCH v2 0/2] Device name and RCU string David Sterba
2025-06-25 13:37 ` [PATCH v2 1/2] btrfs: open code RCU for device name David Sterba
2025-06-27 9:13 ` kernel test robot
2025-06-27 12:32 ` David Sterba [this message]
2025-06-30 2:24 ` Wang Yugui
2025-06-30 16:21 ` David Sterba
2025-06-30 16:43 ` David Sterba
2025-06-30 17:07 ` Alan Huang
2025-07-01 14:47 ` David Sterba
2025-07-01 23:29 ` Wang Yugui
2025-07-04 3:14 ` David Sterba
2025-07-07 14:28 ` David Sterba
2025-06-25 13:37 ` [PATCH v2 2/2] btrfs: remove struct rcu_string David Sterba
2025-06-26 14:46 ` [PATCH v2 0/2] Device name and RCU string Daniel Vacek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250627123213.GG31241@suse.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.