- plip-fix-creation-of-garbage-names-in-proc.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     plip: fix creation of garbage names in /proc
has been removed from the -mm tree.  Its filename was
     plip-fix-creation-of-garbage-names-in-proc.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: plip: fix creation of garbage names in /proc
From: Mikulas Patocka <mikulas@xxxxxxxxxxxxxxxxxxxxxxxx>

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 <mikulas@xxxxxxxxxxxxxxxxxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 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 mikulas@xxxxxxxxxxxxxxxxxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux