lkml.org 
[lkml]   [2004]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectbaycom_par dereference before check.

--- linux-2.6.5/drivers/net/hamradio/baycom_par.c~ 2004-04-16 22:18:53.000000000 +0100
+++ linux-2.6.5/drivers/net/hamradio/baycom_par.c 2004-04-16 22:19:33.000000000 +0100
@@ -272,9 +272,13 @@
static void par96_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct baycom_state *bc = netdev_priv(dev);
+ struct baycom_state *bc;

- if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC)
+ if (!dev)
+ return;
+
+ bc = netdev_priv(dev);
+ if (!bc || bc->hdrv.magic != HDLCDRV_MAGIC)
return;

baycom_int_freq(bc);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.141 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site