[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55E9D59E.4080103@oracle.com>
Date: Fri, 4 Sep 2015 10:32:14 -0700
From: santosh shilimkar <santosh.shilimkar@...cle.com>
To: Sasha Levin <sasha.levin@...cle.com>, chien.yen@...cle.com,
davem@...emloft.net
Cc: rds-devel@....oracle.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RDS: verify the underlying transport exists before
creating a connection
Sasha,
On 9/4/2015 9:43 AM, Sasha Levin wrote:
> There was no verification that an underlying transport exists when creating
> a connection, this would cause dereferencing a NULL ptr.
>
> Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
> ---
> net/rds/connection.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/net/rds/connection.c b/net/rds/connection.c
> index a50e652..0218d81 100644
> --- a/net/rds/connection.c
> +++ b/net/rds/connection.c
> @@ -189,6 +189,12 @@ new_conn:
> }
> }
>
> + if (trans == NULL) {
> + kmem_cache_free(rds_conn_slab, conn);
> + conn = ERR_PTR(-ENODEV);
> + goto out;
> + }
> +
Did you see the NULL oops in any tests ? The reason
am asking this because callers of '__rds_conn_create()'
are not passing the trans as null so that leaves with
only the loopback case. In that case as well,
rds_loop_transport is never going to be null.
The check is good but am curious whether we have a
case which will hit this scenario.
Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists