All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [djwong-xfs:timestats-hoist 414/457] fs/iomap/buffered-io.c:402:15: sparse: sparse: Using plain integer as NULL pointer
Date: Sat, 13 Apr 2024 20:13:52 +0800	[thread overview]
Message-ID: <202404132008.NdtiWG9k-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git timestats-hoist
head:   ed4cedcef505729c94212031f8ed784a5fd81ac5
commit: f0eab2ef375fb100ef4441c0e275fd7cfaac65a0 [414/457] iomap: integrate fs-verity verification into iomap's read path
config: hexagon-randconfig-r113-20240413 (https://download.01.org/0day-ci/archive/20240413/202404132008.NdtiWG9k-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce: (https://download.01.org/0day-ci/archive/20240413/202404132008.NdtiWG9k-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/202404132008.NdtiWG9k-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/iomap/buffered-io.c:402:15: sparse: sparse: Using plain integer as NULL pointer

vim +402 fs/iomap/buffered-io.c

   380	
   381	static int iomap_fsverity_init_bioset(void)
   382	{
   383		struct bio_set *bs, *old;
   384		int error;
   385	
   386		bs = kzalloc(sizeof(*bs), GFP_KERNEL);
   387		if (!bs)
   388			return -ENOMEM;
   389	
   390		error = bioset_init(bs, IOMAP_POOL_SIZE,
   391				    offsetof(struct iomap_fsverity_bio, bio),
   392				    BIOSET_NEED_BVECS);
   393		if (error) {
   394			kfree(bs);
   395			return error;
   396		}
   397	
   398		/*
   399		 * This has to be atomic as readaheads can race to create the
   400		 * bioset.  If someone set the pointer before us, we drop ours.
   401		 */
 > 402		old = cmpxchg(&iomap_fsverity_bioset, NULL, bs);
   403		if (old) {
   404			bioset_exit(bs);
   405			kfree(bs);
   406		}
   407	
   408		return 0;
   409	}
   410	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-04-13 12:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202404132008.NdtiWG9k-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=darrick.wong@oracle.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.