* [patch] rdma: potential ERR_PTR dereference
@ 2010-04-22 9:55 Dan Carpenter
2010-04-22 17:28 ` Andy Grover
2010-04-22 22:57 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2010-04-22 9:55 UTC (permalink / raw)
To: Andy Grover; +Cc: David S. Miller, rds-devel, netdev, kernel-janitors
In the original code, the "goto out" calls "rdma_destroy_id(cm_id);"
That isn't needed here and would cause problems because "cm_id" is an
ERR_PTR. The new code just returns directly.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c
index 9ece910..7b15508 100644
--- a/net/rds/rdma_transport.c
+++ b/net/rds/rdma_transport.c
@@ -134,7 +134,7 @@ static int __init rds_rdma_listen_init(void)
ret = PTR_ERR(cm_id);
printk(KERN_ERR "RDS/RDMA: failed to setup listener, "
"rdma_create_id() returned %d\n", ret);
- goto out;
+ return ret;
}
sin.sin_family = AF_INET,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] rdma: potential ERR_PTR dereference
2010-04-22 9:55 [patch] rdma: potential ERR_PTR dereference Dan Carpenter
@ 2010-04-22 17:28 ` Andy Grover
2010-04-22 22:57 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andy Grover @ 2010-04-22 17:28 UTC (permalink / raw)
To: Dan Carpenter; +Cc: David S. Miller, rds-devel, netdev, kernel-janitors
Dan Carpenter wrote:
> In the original code, the "goto out" calls "rdma_destroy_id(cm_id);"
> That isn't needed here and would cause problems because "cm_id" is an
> ERR_PTR. The new code just returns directly.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Thanks, Dan.
Acked-by: Andy Grover <andy.grover@oracle.com>
-- Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] rdma: potential ERR_PTR dereference
2010-04-22 9:55 [patch] rdma: potential ERR_PTR dereference Dan Carpenter
2010-04-22 17:28 ` Andy Grover
@ 2010-04-22 22:57 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-04-22 22:57 UTC (permalink / raw)
To: error27; +Cc: andy.grover, rds-devel, netdev, kernel-janitors
From: Dan Carpenter <error27@gmail.com>
Date: Thu, 22 Apr 2010 11:55:27 +0200
> In the original code, the "goto out" calls "rdma_destroy_id(cm_id);"
> That isn't needed here and would cause problems because "cm_id" is an
> ERR_PTR. The new code just returns directly.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-22 22:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 9:55 [patch] rdma: potential ERR_PTR dereference Dan Carpenter
2010-04-22 17:28 ` Andy Grover
2010-04-22 22:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).