* [PATCH] caif: fix NULL pointer check
@ 2012-07-24 12:42 Alan Cox
2012-07-24 20:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2012-07-24 12:42 UTC (permalink / raw)
To: sjur.brandeland, netdev
From: Alan Cox <alan@linux.intel.com>
Reported-by: <rucsoftsec@gmail.com>
Resolves-bug: http://bugzilla.kernel.org/show_bug?44441
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/net/caif/caif_serial.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 8a3054b..7e84175 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -325,6 +325,9 @@ static int ldisc_open(struct tty_struct *tty)
sprintf(name, "cf%s", tty->name);
dev = alloc_netdev(sizeof(*ser), name, caifdev_setup);
+ if (dev == NULL)
+ return -ENOMEM;
+
ser = netdev_priv(dev);
ser->tty = tty_kref_get(tty);
ser->dev = dev;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] caif: fix NULL pointer check
2012-07-24 12:42 [PATCH] caif: fix NULL pointer check Alan Cox
@ 2012-07-24 20:57 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-24 20:57 UTC (permalink / raw)
To: alan; +Cc: sjur.brandeland, netdev
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Tue, 24 Jul 2012 13:42:14 +0100
> From: Alan Cox <alan@linux.intel.com>
>
> Reported-by: <rucsoftsec@gmail.com>
> Resolves-bug: http://bugzilla.kernel.org/show_bug?44441
> Signed-off-by: Alan Cox <alan@linux.intel.com>
Applied and queued up for -stable.
> + if (dev == NULL)
I adjusted this to be "if (!dev)"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-24 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24 12:42 [PATCH] caif: fix NULL pointer check Alan Cox
2012-07-24 20:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).