diff options
author | Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> | 2007-11-22 15:26:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:39:01 -0500 |
commit | cdb32706f6948238ed6d1d85473c64c27366e9e9 (patch) | |
tree | bc8b267a0b861bbafae9c384cf80a03e14db8bbd /drivers/net/plip.c | |
parent | f6ce5cca74b8681fdf1d7307edc66a7213b43f6f (diff) |
plip: fix parport_register_device name parameter
Plip passes a string "name" that is allocated on stack to
parport_register_device. parport_register_device holds the pointer to
"name" and when the registering function exits, it points nowhere.
On some machine, this bug causes bad names to appear in /proc, such as
/proc/sys/dev/parport/parport0/devices/T^/�X^/�, on others, the plip
proc node is completely missing.
The patch also fixes documentation to note this requirement.
Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/plip.c')
-rw-r--r-- | drivers/net/plip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index baf2cbfc8863..57c98669984d 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -1269,7 +1269,7 @@ static void plip_attach (struct parport *port) | |||
1269 | 1269 | ||
1270 | nl = netdev_priv(dev); | 1270 | nl = netdev_priv(dev); |
1271 | nl->dev = dev; | 1271 | nl->dev = dev; |
1272 | nl->pardev = parport_register_device(port, name, plip_preempt, | 1272 | nl->pardev = parport_register_device(port, dev->name, plip_preempt, |
1273 | plip_wakeup, plip_interrupt, | 1273 | plip_wakeup, plip_interrupt, |
1274 | 0, dev); | 1274 | 0, dev); |
1275 | 1275 | ||