All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 2552/7575] fs/bcachefs/journal_reclaim.c:57:33: sparse: sparse: invalid access past the end of 'new' (4 8)
@ 2023-09-26  1:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-26  1:01 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check first_new_problem: fs/bcachefs/journal_reclaim.c:57:33: sparse: sparse: invalid access past the end of 'new' (4 8)"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Kent Overstreet <kmo@daterainc.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   8fff9184d1b5810dca5dd1a02726d4f844af88fc
commit: 38e616ec358d67e922b7f82d55d2f5b64dd3124d [2552/7575] bcachefs: Eliminate memory barrier from fast path of journal_preres_put()
:::::: branch date: 20 hours ago
:::::: commit date: 2 weeks ago
config: i386-randconfig-062-20230924 (https://download.01.org/0day-ci/archive/20230926/202309260856.Hj9UGI77-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309260856.Hj9UGI77-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/r/202309260856.Hj9UGI77-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   fs/bcachefs/journal_reclaim.c: note: in included file:
   fs/bcachefs/bcachefs.h:771:9: sparse: sparse: array of flexible structures
   fs/bcachefs/journal_reclaim.c:623:26: sparse: sparse: incompatible types in comparison expression (different type sizes):
   fs/bcachefs/journal_reclaim.c:623:26: sparse:    unsigned int *
   fs/bcachefs/journal_reclaim.c:623:26: sparse:    unsigned long *
>> fs/bcachefs/journal_reclaim.c:57:33: sparse: sparse: invalid access past the end of 'new' (4 8)
   fs/bcachefs/journal_reclaim.c: note: in included file:
   fs/bcachefs/journal.h:388:34: sparse: sparse: invalid access past the end of 's' (4 8)

vim +/new +57 fs/bcachefs/journal_reclaim.c

cd44c469c719de Kent Overstreet 2019-02-21  49  
e65c9500a745e5 Kent Overstreet 2019-02-19  50  static void journal_set_remaining(struct journal *j, unsigned u64s_remaining)
e65c9500a745e5 Kent Overstreet 2019-02-19  51  {
e65c9500a745e5 Kent Overstreet 2019-02-19  52  	union journal_preres_state old, new;
e65c9500a745e5 Kent Overstreet 2019-02-19  53  	u64 v = atomic64_read(&j->prereserved.counter);
e65c9500a745e5 Kent Overstreet 2019-02-19  54  
e65c9500a745e5 Kent Overstreet 2019-02-19  55  	do {
e65c9500a745e5 Kent Overstreet 2019-02-19  56  		old.v = new.v = v;
e65c9500a745e5 Kent Overstreet 2019-02-19 @57  		new.remaining = u64s_remaining;
e65c9500a745e5 Kent Overstreet 2019-02-19  58  	} while ((v = atomic64_cmpxchg(&j->prereserved.counter,
e65c9500a745e5 Kent Overstreet 2019-02-19  59  				       old.v, new.v)) != old.v);
e65c9500a745e5 Kent Overstreet 2019-02-19  60  }
e65c9500a745e5 Kent Overstreet 2019-02-19  61  

:::::: The code at line 57 was first introduced by commit
:::::: e65c9500a745e5e75c3f01d6e5246a135ec7c019 bcachefs: Add a pre-reserve mechanism for the journal

:::::: TO: Kent Overstreet <kent.overstreet@gmail.com>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-26  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-26  1:01 [linux-next:master 2552/7575] fs/bcachefs/journal_reclaim.c:57:33: sparse: sparse: invalid access past the end of 'new' (4 8) kernel test robot

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.