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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Sep 2013 18:23:19 -0400
From:	Milosz Tanski <milosz@...in.com>
To:	ceph-devel@...r.kernel.org
Cc:	sage@...tank.com, zheng.z.yan@...el.com, dhowells@...hat.com,
	jiayisuse@...il.com, linux-cachefs@...hat.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 8/8] ceph: Do not do invalidate if the filesystem is mounted
 nofsc

Previously we would always try to enqueue work even if the filesystem is not
mounted with fscache enabled (or the file has no cookie). In the case of the
filesystem mouned nofsc (but with fscache compiled in) this would lead to a
crash.

Signed-off-by: Milosz Tanski <milosz@...in.com>
---
 fs/ceph/cache.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/ceph/cache.c b/fs/ceph/cache.c
index c737ae9..d3b88c7 100644
--- a/fs/ceph/cache.c
+++ b/fs/ceph/cache.c
@@ -374,8 +374,12 @@ out:
 
 void ceph_queue_revalidate(struct inode *inode)
 {
+	struct ceph_fs_client *fsc = ceph_sb_to_client(inode->i_sb);
 	struct ceph_inode_info *ci = ceph_inode(inode);
 
+	if (fsc->revalidate_wq == NULL || ci->fscache == NULL)
+		return;
+
 	ihold(inode);
 
 	if (queue_work(ceph_sb_to_client(inode->i_sb)->revalidate_wq,
-- 
1.7.9.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