Re: [kbuild] [linux-next:master 11491/13209] fs/f2fs/file.c:2057 f2fs_ioc_start_atomic_write() warn: inconsistent returns '&inode->i_rwsem'.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks. I merged the fixed one, and expect to get fixed in -next soon.

On 03/17, Chao Yu wrote:
> On 2022/3/17 16:44, Dan Carpenter wrote:
> > [ I never understand these emails which are about patch 11491/13209...
> >    - dan ]
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
> > head:   8a11187eb62b8b910d2c5484e1f5d160e8b11eb4
> > commit: a6f748c35eca6eedf2dda8b2a30abd640f1249dc [11491/13209] f2fs: fix compressed file start atomic write may cause data corruption
> > config: parisc-randconfig-m031-20220317 (https://download.01.org/0day-ci/archive/20220317/202203171137.0LDg0sYz-lkp@xxxxxxxxx/config )
> > compiler: hppa-linux-gcc (GCC) 11.2.0
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > 
> > New smatch warnings:
> > fs/f2fs/file.c:2057 f2fs_ioc_start_atomic_write() warn: inconsistent returns '&inode->i_rwsem'.
> > 
> > vim +2057 fs/f2fs/file.c
> > 
> > 88b88a667971599 Jaegeuk Kim     2014-10-06  1989  static int f2fs_ioc_start_atomic_write(struct file *filp)
> > 88b88a667971599 Jaegeuk Kim     2014-10-06  1990  {
> > 88b88a667971599 Jaegeuk Kim     2014-10-06  1991  	struct inode *inode = file_inode(filp);
> > 984fc4e76d63345 Chao Yu         2022-02-04  1992  	struct user_namespace *mnt_userns = file_mnt_user_ns(filp);
> > 743b620cb0516f6 Jaegeuk Kim     2019-09-09  1993  	struct f2fs_inode_info *fi = F2FS_I(inode);
> > 743b620cb0516f6 Jaegeuk Kim     2019-09-09  1994  	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
> > f4c9c743acedc2f Chao Yu         2015-07-17  1995  	int ret;
> > 88b88a667971599 Jaegeuk Kim     2014-10-06  1996
> > 984fc4e76d63345 Chao Yu         2022-02-04  1997  	if (!inode_owner_or_capable(mnt_userns, inode))
> > 88b88a667971599 Jaegeuk Kim     2014-10-06  1998  		return -EACCES;
> > 88b88a667971599 Jaegeuk Kim     2014-10-06  1999
> > e811898c97f83ae Jaegeuk Kim     2017-03-17  2000  	if (!S_ISREG(inode->i_mode))
> > e811898c97f83ae Jaegeuk Kim     2017-03-17  2001  		return -EINVAL;
> > e811898c97f83ae Jaegeuk Kim     2017-03-17  2002
> > 038d06984f5c50a Chao Yu         2019-07-25  2003  	if (filp->f_flags & O_DIRECT)
> > 038d06984f5c50a Chao Yu         2019-07-25  2004  		return -EINVAL;
> > 038d06984f5c50a Chao Yu         2019-07-25  2005
> > 7fb17fe44b70c85 Chao Yu         2016-05-09  2006  	ret = mnt_want_write_file(filp);
> > 7fb17fe44b70c85 Chao Yu         2016-05-09  2007  	if (ret)
> > 7fb17fe44b70c85 Chao Yu         2016-05-09  2008  		return ret;
> > 7fb17fe44b70c85 Chao Yu         2016-05-09  2009
> > 0fac558b9658479 Chao Yu         2016-05-09  2010  	inode_lock(inode);
> >                                                          ^^^^^^^^^^^^^^^^^^
> > 
> > 0fac558b9658479 Chao Yu         2016-05-09  2011
> > a6f748c35eca6ee Fengnan Chang   2022-03-10  2012  	if (!f2fs_disable_compressed_file(inode))
> > a6f748c35eca6ee Fengnan Chang   2022-03-10  2013  		return -EINVAL;
> >                                                                  ^^^^^^^^^^^^^^^
> > goto out?
> 
> Agreed, thanks for the report, Dan.
> 
> Thanks,




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux