Re: ksmbd: v6.13-rc1 WARNING at fs/attr.c:300 setattr_copy+0x1ee/0x200

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

 



On Fri, Dec 6, 2024 at 9:37 PM David Disseldorp <ddiss@xxxxxxx> wrote:
>
> On Fri, 6 Dec 2024 16:35:18 +0900, Namjae Jeon wrote:
> ...
> > > 300                 WARN_ON_ONCE(ia_valid & ATTR_MTIME);
> > >                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--- here.
>
> I should mention, fstests generic/215 atop a 6.13.0-rc1 cifs.ko SMB3
> mount was the trigger for this ksmbd warning.
Okay, I have reproduced it. Thanks. I will take a look.
>
> > > Looking at smb2pdu.c:set_file_basic_info() it's easy enough to see how
> > > we can get here with !ATTR_CTIME alongside ATTR_MTIME.
> > >
> > > The following patch avoids the warning, but I'm not familiar with this
> > > code-path, so please let me know whether or not it makes sense:
> > mtime and atime will probably not be updated.
>
> Unless I'm missing something, this patched ksmbd still triggers mtime
> update via the setattr_copy_mgtime()->(ia_valid & ATTR_MTIME_SET) path.
If FS_MGTIME flag is not set in the fstype of local filesystem, mtime
is not updated with only ATTR_MTIME_SET.

Thanks.
>
> > I will change it so that ATTR_CTIME is also set when changing mtime.
>
> That should also work. I was turned off that path due to the
> 64e7875560270 ("ksmbd: fix oops from fuse driver") ATTR_CTIME changes.
>
> Thanks, David





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux