From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Kai Germaschewski <kai.germaschewski@gmx.de>,
Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>,
Karsten Keil <kkeil@suse.de>
Subject: [PATCH] isdn/gigaset: avoid cs->dev null pointer dereference
Date: Sun, 29 Oct 2006 03:45:00 +0900 [thread overview]
Message-ID: <20061028184500.GE9973@localhost> (raw)
When gigaset_initbcs() is called, cs->dev is not initialized yet.
If dev_alloc_skb() failed in this function, NULL poinster
dereference will happen at dev_warn().
Cc: Kai Germaschewski <kai.germaschewski@gmx.de>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
drivers/isdn/gigaset/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: work-fault-inject/drivers/isdn/gigaset/common.c
===================================================================
--- work-fault-inject.orig/drivers/isdn/gigaset/common.c
+++ work-fault-inject/drivers/isdn/gigaset/common.c
@@ -579,7 +579,7 @@ static struct bc_state *gigaset_initbcs(
} else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL)
skb_reserve(bcs->skb, HW_HDR_LEN);
else {
- dev_warn(cs->dev, "could not allocate skb\n");
+ gig_dbg(DEBUG_INIT, "could not allocate skb\n");
bcs->inputstate |= INS_skip_frame;
}
next reply other threads:[~2006-10-28 18:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-28 18:45 Akinobu Mita [this message]
2006-11-03 12:03 ` [PATCH] isdn/gigaset: avoid cs->dev null pointer dereference Tilman Schmidt
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=20061028184500.GE9973@localhost \
--to=akinobu.mita@gmail.com \
--cc=hjlipp@web.de \
--cc=kai.germaschewski@gmx.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tilman@imap.cc \
/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