public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] isdn/gigaset: avoid cs->dev null pointer dereference
@ 2006-10-28 18:45 Akinobu Mita
  2006-11-03 12:03 ` Tilman Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2006-10-28 18:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kai Germaschewski, Hansjoerg Lipp, Tilman Schmidt, Karsten Keil

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;
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-03 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-28 18:45 [PATCH] isdn/gigaset: avoid cs->dev null pointer dereference Akinobu Mita
2006-11-03 12:03 ` Tilman Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox