All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
@ 2024-09-04 16:51 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2024-09-04 16:51 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Baokun Li <libaokun1@huawei.com>
CC: "Theodore Ts'o" <tytso@mit.edu>
CC: Jan Kara <jack@suse.cz>
CC: Ojaswin Mujoo <ojaswin@linux.ibm.com>

Hi Baokun,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   fdadd93817f124fd0ea6ef251d4a1068b7feceba
commit: 92bbb922166cd7a829bf60d168372ffa1c54e81d [8348/9291] ext4: make some fast commit functions reuse extents path
:::::: branch date: 10 hours ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20240904 (https://download.01.org/0day-ci/archive/20240905/202409050044.EGobujzB-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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/202409050044.EGobujzB-lkp@intel.com/

smatch warnings:
fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'

vim +/path +6155 fs/ext4/extents.c

8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6107  
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6108  int ext4_ext_clear_bb(struct inode *inode)
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6109  {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6110  	struct ext4_ext_path *path = NULL;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6111  	struct ext4_extent *ex;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6112  	ext4_lblk_t cur = 0, end;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6113  	int j, ret = 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6114  	struct ext4_map_blocks map;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6115  
1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6116  	if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA))
1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6117  		return 0;
1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6118  
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6119  	/* Determin the size of the file first */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6120  	path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6121  					EXT4_EX_NOCACHE);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6122  	if (IS_ERR(path))
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6123  		return PTR_ERR(path);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6124  	ex = path[path->p_depth].p_ext;
92bbb922166cd7 Baokun Li          2024-08-22  6125  	if (!ex)
92bbb922166cd7 Baokun Li          2024-08-22  6126  		goto out;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6127  	end = le32_to_cpu(ex->ee_block) + ext4_ext_get_actual_len(ex);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6128  
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6129  	cur = 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6130  	while (cur < end) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6131  		map.m_lblk = cur;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6132  		map.m_len = end - cur;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6133  		ret = ext4_map_blocks(NULL, inode, &map, 0);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6134  		if (ret < 0)
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6135  			break;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6136  		if (ret > 0) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6137  			path = ext4_find_extent(inode, map.m_lblk, NULL, 0);
b2e662cb86ca9f Li Zetao           2024-08-20  6138  			if (!IS_ERR(path)) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6139  				for (j = 0; j < path->p_depth; j++) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6140  					ext4_mb_mark_bb(inode->i_sb,
d2f7cf40ea89b4 Kemeng Shi         2023-09-29  6141  							path[j].p_block, 1, false);
599ea31d13617c Xin Yin            2022-01-10  6142  					ext4_fc_record_regions(inode->i_sb, inode->i_ino,
599ea31d13617c Xin Yin            2022-01-10  6143  							0, path[j].p_block, 1, 1);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6144  				}
7ff5fddaddf2cc Ye Bin             2022-09-24  6145  				ext4_free_ext_path(path);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6146  			}
d2f7cf40ea89b4 Kemeng Shi         2023-09-29  6147  			ext4_mb_mark_bb(inode->i_sb, map.m_pblk, map.m_len, false);
599ea31d13617c Xin Yin            2022-01-10  6148  			ext4_fc_record_regions(inode->i_sb, inode->i_ino,
599ea31d13617c Xin Yin            2022-01-10  6149  					map.m_lblk, map.m_pblk, map.m_len, 1);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6150  		}
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6151  		cur = cur + map.m_len;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6152  	}
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6153  
92bbb922166cd7 Baokun Li          2024-08-22  6154  out:
92bbb922166cd7 Baokun Li          2024-08-22 @6155  	ext4_free_ext_path(path);

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
@ 2024-09-04 17:39 Dan Carpenter
  2024-09-05  1:30 ` Baokun Li
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2024-09-04 17:39 UTC (permalink / raw)
  To: oe-kbuild, Baokun Li
  Cc: lkp, oe-kbuild-all, Theodore Ts'o, Jan Kara, Ojaswin Mujoo

Hi Baokun,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   fdadd93817f124fd0ea6ef251d4a1068b7feceba
commit: 92bbb922166cd7a829bf60d168372ffa1c54e81d [8348/9291] ext4: make some fast commit functions reuse extents path
config: x86_64-randconfig-161-20240904 (https://download.01.org/0day-ci/archive/20240905/202409050044.EGobujzB-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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 <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202409050044.EGobujzB-lkp@intel.com/

smatch warnings:
fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'

vim +/path +6155 fs/ext4/extents.c

8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6108  int ext4_ext_clear_bb(struct inode *inode)
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6109  {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6110  	struct ext4_ext_path *path = NULL;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6111  	struct ext4_extent *ex;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6112  	ext4_lblk_t cur = 0, end;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6113  	int j, ret = 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6114  	struct ext4_map_blocks map;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6115  
1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6116  	if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA))
1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6117  		return 0;
1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6118  
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6119  	/* Determin the size of the file first */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6120  	path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6121  					EXT4_EX_NOCACHE);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6122  	if (IS_ERR(path))
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6123  		return PTR_ERR(path);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6124  	ex = path[path->p_depth].p_ext;
92bbb922166cd7 Baokun Li          2024-08-22  6125  	if (!ex)
92bbb922166cd7 Baokun Li          2024-08-22  6126  		goto out;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6127  	end = le32_to_cpu(ex->ee_block) + ext4_ext_get_actual_len(ex);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6128  
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6129  	cur = 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6130  	while (cur < end) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6131  		map.m_lblk = cur;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6132  		map.m_len = end - cur;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6133  		ret = ext4_map_blocks(NULL, inode, &map, 0);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6134  		if (ret < 0)
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6135  			break;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6136  		if (ret > 0) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6137  			path = ext4_find_extent(inode, map.m_lblk, NULL, 0);
b2e662cb86ca9f Li Zetao           2024-08-20  6138  			if (!IS_ERR(path)) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6139  				for (j = 0; j < path->p_depth; j++) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6140  					ext4_mb_mark_bb(inode->i_sb,
d2f7cf40ea89b4 Kemeng Shi         2023-09-29  6141  							path[j].p_block, 1, false);
599ea31d13617c Xin Yin            2022-01-10  6142  					ext4_fc_record_regions(inode->i_sb, inode->i_ino,
599ea31d13617c Xin Yin            2022-01-10  6143  							0, path[j].p_block, 1, 1);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6144  				}
7ff5fddaddf2cc Ye Bin             2022-09-24  6145  				ext4_free_ext_path(path);
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^
Freed

8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6146  			}
d2f7cf40ea89b4 Kemeng Shi         2023-09-29  6147  			ext4_mb_mark_bb(inode->i_sb, map.m_pblk, map.m_len, false);
599ea31d13617c Xin Yin            2022-01-10  6148  			ext4_fc_record_regions(inode->i_sb, inode->i_ino,
599ea31d13617c Xin Yin            2022-01-10  6149  					map.m_lblk, map.m_pblk, map.m_len, 1);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6150  		}
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6151  		cur = cur + map.m_len;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6152  	}
8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6153  
92bbb922166cd7 Baokun Li          2024-08-22  6154  out:
92bbb922166cd7 Baokun Li          2024-08-22 @6155  	ext4_free_ext_path(path);
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^
Double free


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
  2024-09-04 17:39 [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path' Dan Carpenter
@ 2024-09-05  1:30 ` Baokun Li
  2024-09-05 13:23   ` Theodore Ts'o
  0 siblings, 1 reply; 7+ messages in thread
From: Baokun Li @ 2024-09-05  1:30 UTC (permalink / raw)
  To: Dan Carpenter, Theodore Ts'o
  Cc: lkp, oe-kbuild-all, Jan Kara, oe-kbuild, Ojaswin Mujoo,
	Yang Erkun

On 2024/9/5 1:39, Dan Carpenter wrote:
> Hi Baokun,
>
> FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   fdadd93817f124fd0ea6ef251d4a1068b7feceba
> commit: 92bbb922166cd7a829bf60d168372ffa1c54e81d [8348/9291] ext4: make some fast commit functions reuse extents path
> config: x86_64-randconfig-161-20240904 (https://download.01.org/0day-ci/archive/20240905/202409050044.EGobujzB-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>
> 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 <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202409050044.EGobujzB-lkp@intel.com/

Thanks for the report!

We've identified this issue before, and this is a regression introduced
by Ted when resolving patch conflicts.
For more details, please see:
https://lore.kernel.org/all/7480a81b-4b95-45cc-bf4e-da34ff148790@huawei.com/

Now Ted has fixed this problem in his branch:
https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?h=dev&id=2352e3e461926b59f01c1e39fbb0494891cff997

Ted, could you please help push the corrected commit to the next branch?

Thanks,
Baokun
> smatch warnings:
> fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
>
> vim +/path +6155 fs/ext4/extents.c
>
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6108  int ext4_ext_clear_bb(struct inode *inode)
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6109  {
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6110  	struct ext4_ext_path *path = NULL;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6111  	struct ext4_extent *ex;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6112  	ext4_lblk_t cur = 0, end;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6113  	int j, ret = 0;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6114  	struct ext4_map_blocks map;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6115
> 1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6116  	if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA))
> 1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6117  		return 0;
> 1ebf21784b19d5 Harshad Shirwadkar 2021-10-15  6118
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6119  	/* Determin the size of the file first */
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6120  	path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL,
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6121  					EXT4_EX_NOCACHE);
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6122  	if (IS_ERR(path))
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6123  		return PTR_ERR(path);
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6124  	ex = path[path->p_depth].p_ext;
> 92bbb922166cd7 Baokun Li          2024-08-22  6125  	if (!ex)
> 92bbb922166cd7 Baokun Li          2024-08-22  6126  		goto out;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6127  	end = le32_to_cpu(ex->ee_block) + ext4_ext_get_actual_len(ex);
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6128
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6129  	cur = 0;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6130  	while (cur < end) {
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6131  		map.m_lblk = cur;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6132  		map.m_len = end - cur;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6133  		ret = ext4_map_blocks(NULL, inode, &map, 0);
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6134  		if (ret < 0)
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6135  			break;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6136  		if (ret > 0) {
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6137  			path = ext4_find_extent(inode, map.m_lblk, NULL, 0);
> b2e662cb86ca9f Li Zetao           2024-08-20  6138  			if (!IS_ERR(path)) {
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6139  				for (j = 0; j < path->p_depth; j++) {
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6140  					ext4_mb_mark_bb(inode->i_sb,
> d2f7cf40ea89b4 Kemeng Shi         2023-09-29  6141  							path[j].p_block, 1, false);
> 599ea31d13617c Xin Yin            2022-01-10  6142  					ext4_fc_record_regions(inode->i_sb, inode->i_ino,
> 599ea31d13617c Xin Yin            2022-01-10  6143  							0, path[j].p_block, 1, 1);
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6144  				}
> 7ff5fddaddf2cc Ye Bin             2022-09-24  6145  				ext4_free_ext_path(path);
>                                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^
> Freed
>
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6146  			}
> d2f7cf40ea89b4 Kemeng Shi         2023-09-29  6147  			ext4_mb_mark_bb(inode->i_sb, map.m_pblk, map.m_len, false);
> 599ea31d13617c Xin Yin            2022-01-10  6148  			ext4_fc_record_regions(inode->i_sb, inode->i_ino,
> 599ea31d13617c Xin Yin            2022-01-10  6149  					map.m_lblk, map.m_pblk, map.m_len, 1);
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6150  		}
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6151  		cur = cur + map.m_len;
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6152  	}
> 8016e29f4362e2 Harshad Shirwadkar 2020-10-15  6153
> 92bbb922166cd7 Baokun Li          2024-08-22  6154  out:
> 92bbb922166cd7 Baokun Li          2024-08-22 @6155  	ext4_free_ext_path(path);
>                                                          ^^^^^^^^^^^^^^^^^^^^^^^^
> Double free
>
>
-- 
With Best Regards,
Baokun Li


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
  2024-09-05  1:30 ` Baokun Li
@ 2024-09-05 13:23   ` Theodore Ts'o
  2024-09-05 13:31     ` Baokun Li
  0 siblings, 1 reply; 7+ messages in thread
From: Theodore Ts'o @ 2024-09-05 13:23 UTC (permalink / raw)
  To: Baokun Li
  Cc: Dan Carpenter, lkp, oe-kbuild-all, Jan Kara, oe-kbuild,
	Ojaswin Mujoo, Yang Erkun

On Thu, Sep 05, 2024 at 09:30:37AM +0800, Baokun Li wrote:
> Now Ted has fixed this problem in his branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?h=dev&id=2352e3e461926b59f01c1e39fbb0494891cff997
> 
> Ted, could you please help push the corrected commit to the next branch?

The next branch gets automatically refreshed every day (Mondays
through Friday).  In the case of the ext4 tree, it gets picked up from
the dev branch.  So it should be fixed in the upcoming fs-next and
linux-next branch.

Cheers,

					- Ted

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
  2024-09-05 13:23   ` Theodore Ts'o
@ 2024-09-05 13:31     ` Baokun Li
  2024-09-05 14:07       ` Theodore Ts'o
  0 siblings, 1 reply; 7+ messages in thread
From: Baokun Li @ 2024-09-05 13:31 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Dan Carpenter, lkp, oe-kbuild-all, Jan Kara, oe-kbuild,
	Ojaswin Mujoo, Yang Erkun, Baokun Li

On 2024/9/5 21:23, Theodore Ts'o wrote:
> On Thu, Sep 05, 2024 at 09:30:37AM +0800, Baokun Li wrote:
>> Now Ted has fixed this problem in his branch:
>> https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?h=dev&id=2352e3e461926b59f01c1e39fbb0494891cff997
>>
>> Ted, could you please help push the corrected commit to the next branch?
> The next branch gets automatically refreshed every day (Mondays
> through Friday).  In the case of the ext4 tree, it gets picked up from
> the dev branch.  So it should be fixed in the upcoming fs-next and
> linux-next branch.
>
> Cheers,
>
> 					- Ted
>
OK, I didn't know it was pulling automatically, thanks for the explanation!


Cheers,
Baokun



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
  2024-09-05 13:31     ` Baokun Li
@ 2024-09-05 14:07       ` Theodore Ts'o
  2024-09-06  1:26         ` Baokun Li
  0 siblings, 1 reply; 7+ messages in thread
From: Theodore Ts'o @ 2024-09-05 14:07 UTC (permalink / raw)
  To: Baokun Li
  Cc: Dan Carpenter, lkp, oe-kbuild-all, Jan Kara, oe-kbuild,
	Ojaswin Mujoo, Yang Erkun

On Thu, Sep 05, 2024 at 09:31:35PM +0800, Baokun Li wrote:
> > > Ted, could you please help push the corrected commit to the next branch?
> > The next branch gets automatically refreshed every day (Mondays
> > through Friday).  In the case of the ext4 tree, it gets picked up from
> > the dev branch.  So it should be fixed in the upcoming fs-next and
> > linux-next branch.
> > 
> > Cheers,
> > 
> > 					- Ted
> > 
> OK, I didn't know it was pulling automatically, thanks for the explanation!

Yep, and some of us have automated test systems that run whenever
fs-next is updated.  :-)

For example, see attached.  (I have been planning to get this
published someplace, such as a linux.linux.dev list, but I've been too
busy finish up making it be fully robust and not subject to rare
failures that require manual interventions, and I need to complete
some negotiations with Konstantin.  Probably after the Linux Plumbers
Conference and I have a bit more free time...)

						- Ted

TESTRUNID: ltm-20240729133952-0028
KERNEL:    kernel 6.11.0-rc6-xfstests-00781-g8d32ae66515d #1 SMP PREEMPT_DYNAMIC Wed Sep  4 21:56:52 EDT 2024 x86_64
CMDLINE:   -c ext4/all,xfs/all,btrfs/all,f2fs/all -g auto --repo https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next --watch fs-next
CPUS:      2
MEM:       7680

ext4/4k: 570 tests, 2 failures, 51 skipped, 5668 seconds
  Flaky: generic/234: 20% (1/5)   generic/277: 20% (1/5)
ext4/1k: 564 tests, 2 failures, 54 skipped, 6139 seconds
  Failures: generic/627 generic/750
ext4/ext3: 562 tests, 144 skipped, 4388 seconds
ext4/encrypt: 545 tests, 167 skipped, 3169 seconds
ext4/nojournal: 562 tests, 122 skipped, 4013 seconds
ext4/ext3conv: 567 tests, 53 skipped, 5500 seconds
ext4/adv: 563 tests, 2 failures, 59 skipped, 5186 seconds
  Flaky: generic/047: 20% (1/5)   generic/547: 20% (1/5)
ext4/dioread_nolock: 568 tests, 51 skipped, 5108 seconds
ext4/data_journal: 563 tests, 127 skipped, 4489 seconds
ext4/bigalloc_4k: 541 tests, 1 failures, 55 skipped, 4766 seconds
  Flaky: generic/320: 60% (3/5)
ext4/bigalloc_1k: 542 tests, 64 skipped, 4814 seconds
ext4/dax: 556 tests, 157 skipped, 3022 seconds
xfs/4k: 1142 tests, 2 failures, 180 skipped, 10178 seconds
  Failures: generic/754 xfs/432
xfs/1k: 1142 tests, 3 failures, 167 skipped, 14218 seconds
  Failures: generic/627 generic/754 xfs/432
xfs/v4: 1141 tests, 2 failures, 474 skipped, 8851 seconds
  Failures: generic/754 xfs/432
xfs/adv: 1142 tests, 2 failures, 166 skipped, 10238 seconds
  Failures: generic/754 xfs/432
xfs/quota: 1142 tests, 2 failures, 165 skipped, 11276 seconds
  Failures: generic/754 xfs/432
xfs/quota_1k: 1142 tests, 3 failures, 167 skipped, 13616 seconds
  Failures: generic/627 generic/754 xfs/432
xfs/dirblock_8k: 1142 tests, 2 failures, 165 skipped, 11244 seconds
  Failures: generic/754 xfs/432
xfs/realtime: 1141 tests, 4 failures, 518 skipped, 8342 seconds
  Failures: generic/260 generic/455 generic/754 xfs/432
xfs/realtime_28k_logdev: 1141 tests, 4 failures, 600 skipped, 12882 seconds
  Failures: generic/260 generic/754 xfs/432 xfs/598
xfs/realtime_logdev: 1141 tests, 4 failures, 572 skipped, 13036 seconds
  Failures: generic/260 generic/754 xfs/432 xfs/598
xfs/logdev: 1142 tests, 3 failures, 235 skipped, 17787 seconds
  Failures: generic/754 xfs/432 xfs/598
xfs/dax: 1152 tests, 1 failures, 551 skipped, 5930 seconds
  Failures: generic/754
btrfs/default: 1038 tests, 4 failures, 278 skipped, 9576 seconds
  Failures: btrfs/012 btrfs/277
  Flaky: generic/418: 20% (1/5)   generic/746: 40% (2/5)
f2fs/default: 720 tests, 7 failures, 245 skipped, 5432 seconds
  Failures: generic/050 generic/064 generic/252 generic/563 generic/735
  Flaky: f2fs/004: 20% (1/5)   generic/475: 40% (2/5)
f2fs/encrypt: 702 tests, 4 failures, 352 skipped, 3064 seconds
  Failures: generic/050 generic/563 generic/635
  Flaky: generic/475: 20% (1/5)
Totals: 23089 tests, 5942 skipped, 234 failures, 0 errors, 197866s

FSTESTIMG: gce-xfstests/xfstests-amd64-202408121130
FSTESTPRJ: gce-xfstests
FSTESTVER: blktests f043065 (Thu, 20 Jun 2024 16:26:22 +0900)
FSTESTVER: fio  fio-3.36 (Fri, 20 Oct 2023 04:30:43 -0600)
FSTESTVER: fsverity v1.6 (Wed, 20 Mar 2024 21:21:46 -0700)
FSTESTVER: ima-evm-utils v1.5 (Mon, 6 Mar 2023 07:40:07 -0500)
FSTESTVER: libaio   libaio-0.3.108-82-gb8eadc9 (Thu, 2 Jun 2022 13:33:11 +0200)
FSTESTVER: ltp  20240524-131-gdfb293ee0 (Mon, 29 Jul 2024 09:57:32 +0200)
FSTESTVER: nvme-cli v1.16 (Thu, 11 Nov 2021 13:09:06 -0800)
FSTESTVER: quota  v4.05-67-g8254bec (Mon, 29 Jul 2024 12:24:36 -0400)
FSTESTVER: util-linux v2.40 (Wed, 27 Mar 2024 12:46:59 +0100)
FSTESTVER: xfsprogs v6.9.0 (Mon, 22 Jul 2024 11:05:03 +0200)
FSTESTVER: xfstests-bld 8456529b (Wed, 31 Jul 2024 22:17:54 -0400)
FSTESTVER: xfstests v2024.08.11-7-gc3fc1ccce-dirty (Mon, 12 Aug 2024 11:25:51 -0400)
FSTESTVER: zz_build-distro bookworm
FSTESTSET: -g auto
FSTESTOPT: aex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path'
  2024-09-05 14:07       ` Theodore Ts'o
@ 2024-09-06  1:26         ` Baokun Li
  0 siblings, 0 replies; 7+ messages in thread
From: Baokun Li @ 2024-09-06  1:26 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Dan Carpenter, lkp, oe-kbuild-all, Jan Kara, oe-kbuild,
	Ojaswin Mujoo, Yang Erkun, Baokun Li

On 2024/9/5 22:07, Theodore Ts'o wrote:
> On Thu, Sep 05, 2024 at 09:31:35PM +0800, Baokun Li wrote:
>>>> Ted, could you please help push the corrected commit to the next branch?
>>> The next branch gets automatically refreshed every day (Mondays
>>> through Friday).  In the case of the ext4 tree, it gets picked up from
>>> the dev branch.  So it should be fixed in the upcoming fs-next and
>>> linux-next branch.
>>>
>>> Cheers,
>>>
>>> 					- Ted
>>>
>> OK, I didn't know it was pulling automatically, thanks for the explanation!
> Yep, and some of us have automated test systems that run whenever
> fs-next is updated.  :-)
>
> For example, see attached.  (I have been planning to get this
> published someplace, such as a linux.linux.dev list, but I've been too
> busy finish up making it be fully robust and not subject to rare
> failures that require manual interventions, and I need to complete
> some negotiations with Konstantin.  Probably after the Linux Plumbers
> Conference and I have a bit more free time...)
>
> 						- Ted

This one looks awesome! Looking forward to it going live officially.


Cheers,
Baokun
>
> TESTRUNID: ltm-20240729133952-0028
> KERNEL:    kernel 6.11.0-rc6-xfstests-00781-g8d32ae66515d #1 SMP PREEMPT_DYNAMIC Wed Sep  4 21:56:52 EDT 2024 x86_64
> CMDLINE:   -c ext4/all,xfs/all,btrfs/all,f2fs/all -g auto --repo https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next --watch fs-next
> CPUS:      2
> MEM:       7680
>
> ext4/4k: 570 tests, 2 failures, 51 skipped, 5668 seconds
>    Flaky: generic/234: 20% (1/5)   generic/277: 20% (1/5)
> ext4/1k: 564 tests, 2 failures, 54 skipped, 6139 seconds
>    Failures: generic/627 generic/750
> ext4/ext3: 562 tests, 144 skipped, 4388 seconds
> ext4/encrypt: 545 tests, 167 skipped, 3169 seconds
> ext4/nojournal: 562 tests, 122 skipped, 4013 seconds
> ext4/ext3conv: 567 tests, 53 skipped, 5500 seconds
> ext4/adv: 563 tests, 2 failures, 59 skipped, 5186 seconds
>    Flaky: generic/047: 20% (1/5)   generic/547: 20% (1/5)
> ext4/dioread_nolock: 568 tests, 51 skipped, 5108 seconds
> ext4/data_journal: 563 tests, 127 skipped, 4489 seconds
> ext4/bigalloc_4k: 541 tests, 1 failures, 55 skipped, 4766 seconds
>    Flaky: generic/320: 60% (3/5)
> ext4/bigalloc_1k: 542 tests, 64 skipped, 4814 seconds
> ext4/dax: 556 tests, 157 skipped, 3022 seconds
> xfs/4k: 1142 tests, 2 failures, 180 skipped, 10178 seconds
>    Failures: generic/754 xfs/432
> xfs/1k: 1142 tests, 3 failures, 167 skipped, 14218 seconds
>    Failures: generic/627 generic/754 xfs/432
> xfs/v4: 1141 tests, 2 failures, 474 skipped, 8851 seconds
>    Failures: generic/754 xfs/432
> xfs/adv: 1142 tests, 2 failures, 166 skipped, 10238 seconds
>    Failures: generic/754 xfs/432
> xfs/quota: 1142 tests, 2 failures, 165 skipped, 11276 seconds
>    Failures: generic/754 xfs/432
> xfs/quota_1k: 1142 tests, 3 failures, 167 skipped, 13616 seconds
>    Failures: generic/627 generic/754 xfs/432
> xfs/dirblock_8k: 1142 tests, 2 failures, 165 skipped, 11244 seconds
>    Failures: generic/754 xfs/432
> xfs/realtime: 1141 tests, 4 failures, 518 skipped, 8342 seconds
>    Failures: generic/260 generic/455 generic/754 xfs/432
> xfs/realtime_28k_logdev: 1141 tests, 4 failures, 600 skipped, 12882 seconds
>    Failures: generic/260 generic/754 xfs/432 xfs/598
> xfs/realtime_logdev: 1141 tests, 4 failures, 572 skipped, 13036 seconds
>    Failures: generic/260 generic/754 xfs/432 xfs/598
> xfs/logdev: 1142 tests, 3 failures, 235 skipped, 17787 seconds
>    Failures: generic/754 xfs/432 xfs/598
> xfs/dax: 1152 tests, 1 failures, 551 skipped, 5930 seconds
>    Failures: generic/754
> btrfs/default: 1038 tests, 4 failures, 278 skipped, 9576 seconds
>    Failures: btrfs/012 btrfs/277
>    Flaky: generic/418: 20% (1/5)   generic/746: 40% (2/5)
> f2fs/default: 720 tests, 7 failures, 245 skipped, 5432 seconds
>    Failures: generic/050 generic/064 generic/252 generic/563 generic/735
>    Flaky: f2fs/004: 20% (1/5)   generic/475: 40% (2/5)
> f2fs/encrypt: 702 tests, 4 failures, 352 skipped, 3064 seconds
>    Failures: generic/050 generic/563 generic/635
>    Flaky: generic/475: 20% (1/5)
> Totals: 23089 tests, 5942 skipped, 234 failures, 0 errors, 197866s
>
> FSTESTIMG: gce-xfstests/xfstests-amd64-202408121130
> FSTESTPRJ: gce-xfstests
> FSTESTVER: blktests f043065 (Thu, 20 Jun 2024 16:26:22 +0900)
> FSTESTVER: fio  fio-3.36 (Fri, 20 Oct 2023 04:30:43 -0600)
> FSTESTVER: fsverity v1.6 (Wed, 20 Mar 2024 21:21:46 -0700)
> FSTESTVER: ima-evm-utils v1.5 (Mon, 6 Mar 2023 07:40:07 -0500)
> FSTESTVER: libaio   libaio-0.3.108-82-gb8eadc9 (Thu, 2 Jun 2022 13:33:11 +0200)
> FSTESTVER: ltp  20240524-131-gdfb293ee0 (Mon, 29 Jul 2024 09:57:32 +0200)
> FSTESTVER: nvme-cli v1.16 (Thu, 11 Nov 2021 13:09:06 -0800)
> FSTESTVER: quota  v4.05-67-g8254bec (Mon, 29 Jul 2024 12:24:36 -0400)
> FSTESTVER: util-linux v2.40 (Wed, 27 Mar 2024 12:46:59 +0100)
> FSTESTVER: xfsprogs v6.9.0 (Mon, 22 Jul 2024 11:05:03 +0200)
> FSTESTVER: xfstests-bld 8456529b (Wed, 31 Jul 2024 22:17:54 -0400)
> FSTESTVER: xfstests v2024.08.11-7-gc3fc1ccce-dirty (Mon, 12 Aug 2024 11:25:51 -0400)
> FSTESTVER: zz_build-distro bookworm
> FSTESTSET: -g auto
> FSTESTOPT: aex
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-06  1:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 17:39 [linux-next:master 8348/9291] fs/ext4/extents.c:6155 ext4_ext_clear_bb() error: double free of 'path' Dan Carpenter
2024-09-05  1:30 ` Baokun Li
2024-09-05 13:23   ` Theodore Ts'o
2024-09-05 13:31     ` Baokun Li
2024-09-05 14:07       ` Theodore Ts'o
2024-09-06  1:26         ` Baokun Li
  -- strict thread matches above, loose matches on Subject: below --
2024-09-04 16:51 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.