public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: Akinobu Mita <akinobu.mita@gmail.com>,
	linux-kernel@vger.kernel.org,
	Kai Germaschewski <kai.germaschewski@gmx.de>,
	Hansjoerg Lipp <hjlipp@web.de>, Andrew Morton <akpm@osdl.org>,
	Karsten Keil <kkeil@suse.de>
Subject: Re: [PATCH] isdn/gigaset: avoid cs->dev null pointer dereference
Date: Fri, 03 Nov 2006 13:03:26 +0100	[thread overview]
Message-ID: <454B300E.8040607@imap.cc> (raw)
In-Reply-To: <20061028184500.GE9973@localhost>

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

[Argh. Kaum ist man mal ein paar Tage weg ...]

Am 28.10.2006 20:45 schrieb Akinobu Mita:
> --- 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;
>  	}

I'm not quite happy with that patch. (Nor, for that matter, with the
speed it was pushed into mainline, without waiting even a few days
for comments from the maintainers of the code in question.)
Not being able to allocate that skb seriously impairs functionality
of the driver. It should be reported on production systems too, not
just on debug builds.

In short: NAK. Please revert, and replace by the following:

From: Tilman Schmidt <tilman@imap.cc>

Avoid usage of uninitialized cs->dev in gigaset_initbcs().

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Kai Germaschewski <kai.germaschewski@gmx.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>
---

 drivers/isdn/gigaset/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -616,7 +616,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");
+		warn("could not allocate skb");
 		bcs->inputstate |= INS_skip_frame;
 	}


-- 
Tilman Schmidt                          E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeoeffnet mindestens haltbar bis: (siehe Rueckseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]

      reply	other threads:[~2006-11-03 12:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-28 18:45 [PATCH] isdn/gigaset: avoid cs->dev null pointer dereference Akinobu Mita
2006-11-03 12:03 ` Tilman Schmidt [this message]

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=454B300E.8040607@imap.cc \
    --to=tilman@imap.cc \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@osdl.org \
    --cc=hjlipp@web.de \
    --cc=kai.germaschewski@gmx.de \
    --cc=kkeil@suse.de \
    --cc=linux-kernel@vger.kernel.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