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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Dec 2012 10:02:28 -0500
From:	Theodore Ts'o <>
To:	Tao Ma <>
Subject: Re: [PATCH V7 00/23] ext4: Add inline data support

On Fri, Dec 07, 2012 at 09:34:24AM +0800, Tao Ma wrote:
> I think ext4_inode->xattr_sem should protect us? When we do xattr
> corresponding operation, we just do
> down_write/read(&EXT4_I(inode)->xattr_sem), so we should be fine with
> this type of operation. Am I missing something here?

We're not taking the xattr_sem in ext4_find_inline_data() before we
call ext4_xattr_ibody_find().  So I think we need something like this:

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 6b600b4..e96268d 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -143,7 +143,9 @@ int ext4_find_inline_data(struct inode *inode)
 	if (error)
 		return error;
+	down_read(&EXT4_I(inode)->xattr_sem);
 	error = ext4_xattr_ibody_find(inode, &i, &is);
+	up_read(&EXT4_I(inode)->xattr_sem);
 	if (error)
 		goto out;

					- Ted
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists