* fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b'
@ 2023-11-02 19:47 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-11-02 19:47 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Kent Overstreet <kmo@daterainc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4652b8e4f3ffa48c706ec334f048c217a7d9750d
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date: 11 days ago
:::::: branch date: 75 minutes ago
:::::: commit date: 11 days ago
config: x86_64-randconfig-161-20231102 (https://download.01.org/0day-ci/archive/20231103/202311030327.BKmUFSdb-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20231103/202311030327.BKmUFSdb-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311030327.BKmUFSdb-lkp@intel.com/
smatch warnings:
fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b'
vim +/b +34 fs/bcachefs/compress.c
1c6fdbd8f2465d Kent Overstreet 2017-03-16 25
1c6fdbd8f2465d Kent Overstreet 2017-03-16 26 static struct bbuf __bounce_alloc(struct bch_fs *c, unsigned size, int rw)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 27 {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 28 void *b;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 29
1c6fdbd8f2465d Kent Overstreet 2017-03-16 30 BUG_ON(size > c->sb.encoded_extent_max << 9);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 31
1c6fdbd8f2465d Kent Overstreet 2017-03-16 32 b = kmalloc(size, GFP_NOIO|__GFP_NOWARN);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 33 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 @34 return (struct bbuf) { .b = b, .type = BB_KMALLOC, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 35
1c6fdbd8f2465d Kent Overstreet 2017-03-16 36 b = mempool_alloc(&c->compression_bounce[rw], GFP_NOWAIT);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 37 b = b ? page_address(b) : NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 38 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 39 return (struct bbuf) { .b = b, .type = BB_MEMPOOL, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 40
1c6fdbd8f2465d Kent Overstreet 2017-03-16 41 b = vmalloc(size);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 42 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 43 return (struct bbuf) { .b = b, .type = BB_VMALLOC, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 44
1c6fdbd8f2465d Kent Overstreet 2017-03-16 45 b = mempool_alloc(&c->compression_bounce[rw], GFP_NOIO);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 46 b = b ? page_address(b) : NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 47 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 48 return (struct bbuf) { .b = b, .type = BB_MEMPOOL, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 49
1c6fdbd8f2465d Kent Overstreet 2017-03-16 50 BUG();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 51 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 52
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b'
@ 2023-11-03 20:46 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-11-03 20:46 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Kent Overstreet <kmo@daterainc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8f6f76a6a29f36d2f3e4510d0bde5046672f6924
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date: 12 days ago
:::::: branch date: 14 hours ago
:::::: commit date: 12 days ago
config: x86_64-randconfig-161-20231102 (https://download.01.org/0day-ci/archive/20231104/202311040441.HuERUoCH-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20231104/202311040441.HuERUoCH-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311040441.HuERUoCH-lkp@intel.com/
smatch warnings:
fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b'
vim +/b +34 fs/bcachefs/compress.c
1c6fdbd8f2465d Kent Overstreet 2017-03-16 25
1c6fdbd8f2465d Kent Overstreet 2017-03-16 26 static struct bbuf __bounce_alloc(struct bch_fs *c, unsigned size, int rw)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 27 {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 28 void *b;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 29
1c6fdbd8f2465d Kent Overstreet 2017-03-16 30 BUG_ON(size > c->sb.encoded_extent_max << 9);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 31
1c6fdbd8f2465d Kent Overstreet 2017-03-16 32 b = kmalloc(size, GFP_NOIO|__GFP_NOWARN);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 33 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 @34 return (struct bbuf) { .b = b, .type = BB_KMALLOC, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 35
1c6fdbd8f2465d Kent Overstreet 2017-03-16 36 b = mempool_alloc(&c->compression_bounce[rw], GFP_NOWAIT);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 37 b = b ? page_address(b) : NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 38 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 39 return (struct bbuf) { .b = b, .type = BB_MEMPOOL, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 40
1c6fdbd8f2465d Kent Overstreet 2017-03-16 41 b = vmalloc(size);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 42 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 43 return (struct bbuf) { .b = b, .type = BB_VMALLOC, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 44
1c6fdbd8f2465d Kent Overstreet 2017-03-16 45 b = mempool_alloc(&c->compression_bounce[rw], GFP_NOIO);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 46 b = b ? page_address(b) : NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 47 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 48 return (struct bbuf) { .b = b, .type = BB_MEMPOOL, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 49
1c6fdbd8f2465d Kent Overstreet 2017-03-16 50 BUG();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 51 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 52
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b'
@ 2023-11-05 3:16 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-11-05 3:16 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Kent Overstreet <kmo@daterainc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aea6bf908d730b01bd264a8821159db9463c111c
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date: 13 days ago
:::::: branch date: 8 hours ago
:::::: commit date: 13 days ago
config: x86_64-randconfig-161-20231102 (https://download.01.org/0day-ci/archive/20231105/202311051100.pqGxAaPr-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20231105/202311051100.pqGxAaPr-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311051100.pqGxAaPr-lkp@intel.com/
smatch warnings:
fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b'
vim +/b +34 fs/bcachefs/compress.c
1c6fdbd8f2465d Kent Overstreet 2017-03-16 25
1c6fdbd8f2465d Kent Overstreet 2017-03-16 26 static struct bbuf __bounce_alloc(struct bch_fs *c, unsigned size, int rw)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 27 {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 28 void *b;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 29
1c6fdbd8f2465d Kent Overstreet 2017-03-16 30 BUG_ON(size > c->sb.encoded_extent_max << 9);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 31
1c6fdbd8f2465d Kent Overstreet 2017-03-16 32 b = kmalloc(size, GFP_NOIO|__GFP_NOWARN);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 33 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 @34 return (struct bbuf) { .b = b, .type = BB_KMALLOC, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 35
1c6fdbd8f2465d Kent Overstreet 2017-03-16 36 b = mempool_alloc(&c->compression_bounce[rw], GFP_NOWAIT);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 37 b = b ? page_address(b) : NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 38 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 39 return (struct bbuf) { .b = b, .type = BB_MEMPOOL, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 40
1c6fdbd8f2465d Kent Overstreet 2017-03-16 41 b = vmalloc(size);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 42 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 43 return (struct bbuf) { .b = b, .type = BB_VMALLOC, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 44
1c6fdbd8f2465d Kent Overstreet 2017-03-16 45 b = mempool_alloc(&c->compression_bounce[rw], GFP_NOIO);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 46 b = b ? page_address(b) : NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 47 if (b)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 48 return (struct bbuf) { .b = b, .type = BB_MEMPOOL, .rw = rw };
1c6fdbd8f2465d Kent Overstreet 2017-03-16 49
1c6fdbd8f2465d Kent Overstreet 2017-03-16 50 BUG();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 51 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 52
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-05 3:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 19:47 fs/bcachefs/compress.c:34 __bounce_alloc() warn: possible memory leak of 'b' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-11-03 20:46 kernel test robot
2023-11-05 3:16 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.