From: Oleg Drokin <green@linuxhacker.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
James Simmons <jsimmons@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>,
Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH 6/8] staging/lustre/llite: changes to avoid cache corruption
Date: Tue, 23 Aug 2016 17:11:40 -0400 [thread overview]
Message-ID: <1471986702-682922-7-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1471986702-682922-1-git-send-email-green@linuxhacker.ru>
From: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
ll_find_alias is responsible for getting alias for inode
which can be reused. Directories are assumed to have unique
alias, where in case of non-directories there can be multiple
aliases. In case of lustre there can be two type of aliases
i.e. discon_alias and invalid_alias. Usage of discon_alias in
case of non-directories may corrupt dcache and leads to kernel
crash. Changes made to avoid use of discon_alias in case of
non-directories.
Seagate-bug-id: MRP-2739, MRP-3601
Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Tested-by: Parinay Vijayprakash Kondekar <parinay.kondekar@seagate.com>
Reviewed-on: http://review.whamcloud.com/17732
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7613
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
drivers/staging/lustre/lustre/llite/namei.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 788a3f0..b7d448f 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -363,7 +363,8 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry)
LASSERT(alias != dentry);
spin_lock(&alias->d_lock);
- if (alias->d_flags & DCACHE_DISCONNECTED)
+ if ((alias->d_flags & DCACHE_DISCONNECTED) &&
+ S_ISDIR(inode->i_mode))
/* LASSERT(last_discon == NULL); LU-405, bz 20055 */
discon_alias = alias;
else if (alias->d_parent == dentry->d_parent &&
--
2.7.4
next prev parent reply other threads:[~2016-08-23 21:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 21:11 [PATCH 0/8] Lustre fixes Oleg Drokin
2016-08-23 21:11 ` [PATCH 1/8] staging/lustre: const correct set_lock_data() Oleg Drokin
2016-08-23 21:11 ` [PATCH 2/8] staging/lustre/mdc: fix panic at mdc_free_open() Oleg Drokin
2016-08-24 5:08 ` Oleg Drokin
2016-08-23 21:11 ` [PATCH 3/8] staging/lustre: avoid clearing i_nlink for inodes in use Oleg Drokin
2016-08-23 21:11 ` [PATCH 4/8] staging/lustre/llite: check return value for obd_set_info_async Oleg Drokin
2016-08-23 21:11 ` [PATCH 5/8] staging/lustre/llite: Fix suspicious dereference of pointer 'vma->vm_file' Oleg Drokin
2016-08-23 21:11 ` Oleg Drokin [this message]
2016-08-23 21:11 ` [PATCH 7/8] staging/lustre: release MGC device if connect fails Oleg Drokin
2016-08-23 21:11 ` [PATCH 8/8] staging/lustre/o2iblnd: handle mixed page size configurations Oleg Drokin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471986702-682922-7-git-send-email-green@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lokesh.jaliminche@seagate.com \
--cc=lustre-devel@lists.lustre.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome