From: Adrian Bunk <bunk@stusta.de>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: rolandd@cisco.com, mshefty@ichips.intel.com, halr@voltaire.com,
openib-general@openib.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/infiniband/core/mad.c: fix a NULL pointer dereference
Date: Wed, 23 Nov 2005 23:34:56 +0100 [thread overview]
Message-ID: <20051123223456.GD3963@stusta.de> (raw)
The Coverity checker spotted this obvious NULL pointer dereference
caused by a wrong order of the cleanups.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 21 Nov 2005
--- linux-2.6.15-rc1-mm2-full/drivers/infiniband/core/mad.c.old 2005-11-20 22:04:36.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/infiniband/core/mad.c 2005-11-20 22:05:17.000000000 +0100
@@ -355,9 +355,9 @@
spin_unlock_irqrestore(&port_priv->reg_lock, flags);
kfree(reg_req);
error3:
- kfree(mad_agent_priv);
-error2:
ib_dereg_mr(mad_agent_priv->agent.mr);
+error2:
+ kfree(mad_agent_priv);
error1:
return ret;
}
next reply other threads:[~2005-11-23 22:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-23 22:34 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-26 23:37 [2.6 patch] drivers/infiniband/core/mad.c: fix a NULL pointer dereference Adrian Bunk
2005-11-27 23:51 ` Roland Dreier
2005-11-28 0:25 ` Adrian Bunk
2005-11-28 17:59 ` Roland Dreier
2005-11-29 12:30 ` Adrian Bunk
2005-11-29 17:07 ` Roland Dreier
2005-11-20 23:14 Adrian Bunk
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=20051123223456.GD3963@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=halr@voltaire.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mshefty@ichips.intel.com \
--cc=openib-general@openib.org \
--cc=rolandd@cisco.com \
--cc=torvalds@osdl.org \
/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