From: Ralf Baechle <ralf@linux-mips.org>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
linux-kernel@vger.kernel.org, Frederic Rible <frible@teaser.fr>,
Jean-Paul Roubelat <jpr@f6fbb.org>,
linux-hams@vger.kernel.org
Subject: Re: [PATCH] fix potential NULL pointer dereference in yam
Date: Tue, 16 May 2006 10:57:37 +0100 [thread overview]
Message-ID: <20060516095737.GA23397@linux-mips.org> (raw)
In-Reply-To: <200605152219.37265.jesper.juhl@gmail.com>
On Mon, May 15, 2006 at 10:19:36PM +0200, Jesper Juhl wrote:
> > How can it be NULL here? The whole array of valid net_devices was
> > allocated at module init time.
> >
>
> It cannot. You are right, I'm wrong.
> I guess removing the check makes sense then ?
Yes.
Acked-by: Ralf Baechle <ralf@linux-mips.org>
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> ---
>
> --- linux-2.6.17-rc4-mm1-orig/drivers/net/hamradio/yam.c 2006-05-13 21:28:27.000000000 +0200
> +++ linux-2.6.17-rc4-mm1/drivers/net/hamradio/yam.c 2006-05-15 22:16:32.000000000 +0200
> @@ -852,7 +852,7 @@ static int yam_open(struct net_device *d
>
> printk(KERN_INFO "Trying %s at iobase 0x%lx irq %u\n", dev->name, dev->base_addr, dev->irq);
>
> - if (!dev || !yp->bitrate)
> + if (!yp->bitrate)
> return -ENXIO;
> if (!dev->base_addr || dev->base_addr > 0x1000 - YAM_EXTENT ||
> dev->irq < 2 || dev->irq > 15) {
>
73 de DL5RB op Ralf
--
Loc. JN47BS / CQ 14 / ITU 28 / DOK A21
next prev parent reply other threads:[~2006-05-16 9:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-14 13:12 [PATCH] fix potential NULL pointer dereference in yam Jesper Juhl
2006-05-14 14:09 ` Alexey Dobriyan
2006-05-15 20:19 ` Jesper Juhl
2006-05-16 9:57 ` Ralf Baechle [this message]
2006-05-14 17:08 ` Ralf Baechle
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=20060516095737.GA23397@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=adobriyan@gmail.com \
--cc=frible@teaser.fr \
--cc=jesper.juhl@gmail.com \
--cc=jpr@f6fbb.org \
--cc=linux-hams@vger.kernel.org \
--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