From: santosh shilimkar <santosh.shilimkar@oracle.com>
To: Sasha Levin <sasha.levin@oracle.com>,
chien.yen@oracle.com, davem@davemloft.net
Cc: rds-devel@oss.oracle.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDS: verify the underlying transport exists before creating a connection
Date: Fri, 4 Sep 2015 10:32:14 -0700 [thread overview]
Message-ID: <55E9D59E.4080103@oracle.com> (raw)
In-Reply-To: <1441385019-27019-1-git-send-email-sasha.levin@oracle.com>
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@oracle.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
next prev parent reply other threads:[~2015-09-04 17:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 16:43 [PATCH] RDS: verify the underlying transport exists before creating a connection Sasha Levin
2015-09-04 17:32 ` santosh shilimkar [this message]
2015-09-04 19:44 ` Sasha Levin
2015-09-04 21:12 ` santosh.shilimkar
2015-09-04 20:24 ` Sergei Shtylyov
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=55E9D59E.4080103@oracle.com \
--to=santosh.shilimkar@oracle.com \
--cc=chien.yen@oracle.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=sasha.levin@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).