The patch titled
plip: fix creation of garbage names in /proc
has been added to the -mm tree. Its filename is
plip-fix-creation-of-garbage-names-in-proc.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: plip: fix creation of garbage names in /proc
From: Mikulas Patocka <[EMAIL PROTECTED]>
Plip passes 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 machines, this bug causes bad names to appear in /proc filesystem,
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 <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Cc: "David S. Miller" <[EMAIL PROTECTED]>
Cc: Herbert Xu <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
Documentation/parport-lowlevel.txt | 4 ++++
drivers/net/plip.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff -puN
Documentation/parport-lowlevel.txt~plip-fix-creation-of-garbage-names-in-proc
Documentation/parport-lowlevel.txt
---
a/Documentation/parport-lowlevel.txt~plip-fix-creation-of-garbage-names-in-proc
+++ a/Documentation/parport-lowlevel.txt
@@ -339,6 +339,10 @@ Use this function to register your devic
('port'). Once you have done that, you will be able to use
parport_claim and parport_release in order to use the port.
+The ('name') argument is the name of the device that appears in /proc
+filesystem. The string must be valid for the whole lifetime of the
+device (until parport_unregister_device is called).
+
This function will register three callbacks into your driver:
'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to
indicate that you do not want a callback.
diff -puN drivers/net/plip.c~plip-fix-creation-of-garbage-names-in-proc
drivers/net/plip.c
--- a/drivers/net/plip.c~plip-fix-creation-of-garbage-names-in-proc
+++ a/drivers/net/plip.c
@@ -1269,7 +1269,7 @@ static void plip_attach (struct parport
nl = netdev_priv(dev);
nl->dev = dev;
- nl->pardev = parport_register_device(port, name, plip_preempt,
+ nl->pardev = parport_register_device(port, dev->name,
plip_preempt,
plip_wakeup, plip_interrupt,
0, dev);
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
plip-use-netif_rx_ni.patch
plip-fix-creation-of-garbage-names-in-proc.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html