All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check
@ 2016-03-02 13:25 ` green at linuxhacker.ru
  0 siblings, 0 replies; 4+ messages in thread
From: green @ 2016-03-02 13:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin,
	Amitoj Kaur Chawla

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [lustre-devel] [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check
@ 2016-03-02 13:25 ` green at linuxhacker.ru
  0 siblings, 0 replies; 4+ messages in thread
From: green at linuxhacker.ru @ 2016-03-02 13:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin,
	Amitoj Kaur Chawla

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check
  2016-03-02 13:25 ` [lustre-devel] " green at linuxhacker.ru
@ 2016-03-02 23:21   ` Greg KH
  -1 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2016-03-02 23:21 UTC (permalink / raw)
  To: green
  Cc: devel, Andreas Dilger, Linux Kernel Mailing List,
	Lustre Development List

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lustre-devel] [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check
@ 2016-03-02 23:21   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2016-03-02 23:21 UTC (permalink / raw)
  To: green
  Cc: devel, Andreas Dilger, Linux Kernel Mailing List,
	Lustre Development List

On Wed, Mar 02, 2016 at 08:25:39AM -0500, green at 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-02 23:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02 13:25 [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check green
2016-03-02 13:25 ` [lustre-devel] " green at linuxhacker.ru
2016-03-02 23:21 ` Greg KH
2016-03-02 23:21   ` [lustre-devel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.