From: simo.ghannam@gmail.com
To: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
santosh.shilimkar@oracle.com, davem@davemloft.net,
rds-devel@oss.oracle.com
Cc: Mohamed Ghannam <simo.ghannam@gmail.com>
Subject: [PATCH] RDS: null pointer dereference in rds_atomic_free_op
Date: Wed, 3 Jan 2018 21:06:06 +0000 [thread overview]
Message-ID: <5a4d45ce.8b8a1c0a.1d072.e5e1@mx.google.com> (raw)
From: Mohamed Ghannam <simo.ghannam@gmail.com>
set rm->atomic.op_active to 0 when rds_pin_pages() fails
or the user supplied address is invalid,
this prevents a NULL pointer usage in rds_atomic_free_op()
Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
---
net/rds/rdma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index bc2f1e0977d6..398932fbaf27 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -874,6 +874,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
err:
if (page)
put_page(page);
+ rm->atomic.op_active = 0;
kfree(rm->atomic.op_notifier);
return ret;
--
2.14.1
next reply other threads:[~2018-01-03 21:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 21:06 simo.ghannam [this message]
[not found] ` <5a4d45ce.8b8a1c0a.1d072.e5e1-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2018-01-03 21:19 ` [PATCH] RDS: null pointer dereference in rds_atomic_free_op Santosh Shilimkar
2018-01-04 19:20 ` David Miller
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=5a4d45ce.8b8a1c0a.1d072.e5e1@mx.google.com \
--to=simo.ghannam@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@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