This is a note to let you know that I've just added the patch titled

    USB: g_printer: fix bug in module parameter definitions

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-g_printer-fix-bug-in-module-parameter-definitions.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From ad84e4a9efb7c8ed322bafb6ebdb9c3a49a3d3a8 Mon Sep 17 00:00:00 2001
From: Alan Stern <[email protected]>
Date: Mon, 10 Jan 2011 11:24:14 -0500
Subject: USB: g_printer: fix bug in module parameter definitions

From: Alan Stern <[email protected]>

commit ad84e4a9efb7c8ed322bafb6ebdb9c3a49a3d3a8 upstream.

This patch (as1442) fixes a bug in g_printer: Module parameters should
not be marked "__initdata" if they are accessible in sysfs (i.e., if
the mode value in the module_param() macro is nonzero).  Otherwise
attempts to access the parameters will cause addressing violations.

Character-string module parameters must not be marked "__initdata"
if the module can be unloaded, because the kernel needs to access the
parameter variable at unload time in order to free the
dynamically-allocated string.

Signed-off-by: Alan Stern <[email protected]>
CC: Roland Kletzing <[email protected]>
CC: Craig W. Nadler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/gadget/printer.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -131,31 +131,31 @@ static struct printer_dev usb_printer_ga
  * parameters are in UTF-8 (superset of ASCII's 7 bit characters).
  */
 
-static ushort __initdata idVendor;
+static ushort idVendor;
 module_param(idVendor, ushort, S_IRUGO);
 MODULE_PARM_DESC(idVendor, "USB Vendor ID");
 
-static ushort __initdata idProduct;
+static ushort idProduct;
 module_param(idProduct, ushort, S_IRUGO);
 MODULE_PARM_DESC(idProduct, "USB Product ID");
 
-static ushort __initdata bcdDevice;
+static ushort bcdDevice;
 module_param(bcdDevice, ushort, S_IRUGO);
 MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)");
 
-static char *__initdata iManufacturer;
+static char *iManufacturer;
 module_param(iManufacturer, charp, S_IRUGO);
 MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string");
 
-static char *__initdata iProduct;
+static char *iProduct;
 module_param(iProduct, charp, S_IRUGO);
 MODULE_PARM_DESC(iProduct, "USB Product string");
 
-static char *__initdata iSerialNum;
+static char *iSerialNum;
 module_param(iSerialNum, charp, S_IRUGO);
 MODULE_PARM_DESC(iSerialNum, "1");
 
-static char *__initdata iPNPstring;
+static char *iPNPstring;
 module_param(iPNPstring, charp, S_IRUGO);
 MODULE_PARM_DESC(iPNPstring, "MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;");
 


Patches currently in stable-queue which might be from [email protected] 
are

queue-2.6.37/usb-prevent-buggy-hubs-from-crashing-the-usb-stack.patch
queue-2.6.37/usb-ehci-fix-scheduling-while-atomic-during-suspend.patch
queue-2.6.37/usb-usb-storage-unusual_devs-entry-for-coby-mp3-player.patch
queue-2.6.37/usb-fix-race-between-root-hub-resume-and-wakeup-requests.patch
queue-2.6.37/usb-g_printer-fix-bug-in-unregistration.patch
queue-2.6.37/usb-usb-storage-unusual_devs-entry-for-camsport-evo.patch
queue-2.6.37/usb-ehci-fix-dma-deallocation-bug.patch
queue-2.6.37/usb-g_printer-fix-bug-in-module-parameter-definitions.patch
queue-2.6.37/usb-serial-add-missing-.usb_driver-field-in-serial-drivers.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to