Re: [PATCH] xfs: take XFS_IOLOCK_EXCL if suid removal is required

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

 



On Fri, Mar 06, 2015 at 10:54:06AM -0600, Eric Sandeen wrote:
> This sequence:
> 
> # rm -f sparsefile
> # truncate --size=1m sparsefile
> # chmod ugo+rws sparsefile
> # ls -l sparsefile
> -rwSrwSrw-. 1 root root 1048576 Mar  6 10:29 sparsefile
> # su tester
> 
> $ xfs_io -d -c "pwrite 0 4096" sparsefile
> wrote 4096/4096 bytes at offset 0
> 4 KiB, 1 ops; 0.0000 sec (21.505 KiB/sec and 5.3763 ops/sec)
> $ exit
> 
> will lead to a WARN_ON() in notify change, because i_mutex is
> not held, and we get to notify_change via suid removal with
> only XFS_IOLOCK_SHARED held, i.e. no i_mutex.
> 
> Upgrade the lock to XFS_IOLOCK_EXCL in this case.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>

I believe Jan Kara has already addressed this problem in
this patchset:

http://oss.sgi.com/archives/xfs/2015-03/msg00051.html

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux