lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 24 Aug 2006 22:08:20 -0400
From:	"Xin Zhao" <uszhaoxin@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org
Subject: Why generic_fillattr() is not protected with a lock?

Hi,

I noticed that almost all local disk file systems use the default
vfs_getattr()->generic_fillattr() to get file attributes. However,
vfs_getattr()->generic_fillattr() is not protected by a lock. Is this
problematic?

Suppose process A is getting file attributes, after it read the
"mtime" and before it read the i_size, the process is scheduled out,
and another process B cuts in, change the file, and cause the change
on file size. After A is switched back, it goes ahead to read the rest
fields. Now it will have an old "mtime" but a new "i_size".

Is this scenario possible? If so, will this cause serious problem to
the file system?

Thanks,
Xin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ