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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421187358-32600-1-git-send-email-richard@nod.at>
Date:	Tue, 13 Jan 2015 23:15:58 +0100
From:	Richard Weinberger <richard@....at>
To:	user-mode-linux-devel@...ts.sourceforge.net
Cc:	dxld@...kboxed.org, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, Richard Weinberger <richard@....at>,
	stable@...r.kernel.org
Subject: [PATCH] hostfs: Use noop_fsync for directories

Daniel reported that dpkg(1) dies if the root filesystem is a hostfs
because it does not expect fsync(2) to fail with EINVAL on directories.
While fsync(2) is allowed to fail with EINVAL if the filesystem does not
support it we can do better and use noop_fsync() to not confuse userspace
further.

Cc: stable@...r.kernel.org
Reported-and-tested-by: Daniel Gröber <dxld@...kboxed.org>
Signed-off-by: Richard Weinberger <richard@....at>
---
 fs/hostfs/hostfs_kern.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index fd62cae..a7ac856 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -393,6 +393,7 @@ static const struct file_operations hostfs_dir_fops = {
 	.llseek		= generic_file_llseek,
 	.iterate	= hostfs_readdir,
 	.read		= generic_read_dir,
+	.fsync		= noop_fsync,
 };
 
 static int hostfs_writepage(struct page *page, struct writeback_control *wbc)
-- 
1.8.4.5

--
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