Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1348032 > unrolled thread

[PATCH] staging/lustre: Unbreak ll_prep_inode iget result check

Started bygreen@linuxhacker.ru
First post2016-03-02 14:30 +0100
Last post2016-03-03 00:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check green@linuxhacker.ru - 2016-03-02 14:30 +0100
    Re: [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check Greg KH <gregkh@linuxfoundation.org> - 2016-03-03 00:30 +0100

#1348032 — [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check

Fromgreen@linuxhacker.ru
Date2016-03-02 14:30 +0100
Subject[PATCH] staging/lustre: Unbreak ll_prep_inode iget result check
Message-ID<r8f0K-89o-23@gated-at.bofh.it>
From: Oleg Drokin <green@linuxhacker.ru>

commit 020ecc6f3229 ("staging: lustre: llite: Remove IS_ERR tests")
managed to break one of the converted checks by losing a dereference
causing the condition to be wrong and hence leading
to a crash later on in case of actual error.
IS_ERR_OR_NULL(*inode) got converted into !inode.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
CC: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
I am not sure where did that patch came from as I cannot see
it in either my inbox or in any public mailinglists via google.

 drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index b2e8475..acdae25 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -1972,7 +1972,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
 		*inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1,
 					     sbi->ll_flags & LL_SBI_32BIT_API),
 				 &md);
-		if (!inode) {
+		if (!*inode) {
 #ifdef CONFIG_FS_POSIX_ACL
 			if (md.posix_acl) {
 				posix_acl_release(md.posix_acl);
-- 
2.1.0

[toc] | [next] | [standalone]


#1348606

FromGreg KH <gregkh@linuxfoundation.org>
Date2016-03-03 00:30 +0100
Message-ID<r8ono-6Fv-17@gated-at.bofh.it>
In reply to#1348032
On Wed, Mar 02, 2016 at 08:25:39AM -0500, green@linuxhacker.ru wrote:
> From: Oleg Drokin <green@linuxhacker.ru>
> 
> commit 020ecc6f3229 ("staging: lustre: llite: Remove IS_ERR tests")
> managed to break one of the converted checks by losing a dereference
> causing the condition to be wrong and hence leading
> to a crash later on in case of actual error.
> IS_ERR_OR_NULL(*inode) got converted into !inode.
> 
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> CC: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> I am not sure where did that patch came from as I cannot see
> it in either my inbox or in any public mailinglists via google.

My fault, it is part of the Outreachy application process, I missed that
bug, sorry about this.

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web