3.0.82-stable review
Subsystems (12)
Greg Kroah-Hartman
maintainerPATCH 1/21 USB: option: blacklist network interface on Huawei E1820
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjørn Mork <[email protected]>
commit b8a24e6281d37243c06b9497dcbfaa98c1e2ad35 upstream.
The mode used by Windows for the Huawei E1820 will use the same ff/ff/ff class codes for both serial and network functions.
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -593,6 +593,8 @@ static const struct usb_device_id option .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff), /* Huawei E1820 */ + .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
Greg Kroah-Hartman
maintainerPATCH 3/21 USB: iuu_phoenix: fix bulk-message timeout
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 6c13ff68a7ce01da7a51b44241a7aad8eaaedde7 upstream.
The bulk-message timeout is specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/iuu_phoenix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/serial/iuu_phoenix.c +2 -2
@@ -327,7 +327,7 @@ static int bulk_immediate(struct usb_serusb_bulk_msg (serial->dev,usb_sndbulkpipe (serial->dev, port->bulk_out_endpointAddress), buf, - count, &actual,HZ *1 ); + count, &actual,1000 );if (status !=IUU_OPERATION_OK )dbg ("%s - error = %2x" , __func__, status);
@@ -350,7 +350,7 @@ static int read_immediate(struct usb_serusb_bulk_msg (serial->dev,usb_rcvbulkpipe (serial->dev, port->bulk_in_endpointAddress), buf, - count, &actual,HZ *1 ); + count, &actual,1000 );if (status !=IUU_OPERATION_OK )dbg ("%s - error = %2x" , __func__, status);
Greg Kroah-Hartman
maintainerPATCH 2/21 ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 8eafc0a161123d90617c9ca2eddfe87b382b1b89 upstream.
... instead of applying to all interfaces.
Reference: http://forums.gentoo.org/viewtopic-p-6886404.html
--- sound/usb/quirks-table.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/usb/quirks-table.h +7 -1
@@ -146,7 +146,13 @@ .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL }, { - USB_DEVICE(0x046d, 0x0990), + .match_flags =USB_DEVICE_ID_MATCH_DEVICE | +USB_DEVICE_ID_MATCH_INT_CLASS | + USB_DEVICE_ID_MATCH_INT_SUBCLASS, + .idVendor = 0x046d, + .idProduct = 0x0990, + .bInterfaceClass = USB_CLASS_AUDIO, + .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { .vendor_name ="Logitech, Inc." , .product_name ="QuickCam Pro 9000" ,
Greg Kroah-Hartman
maintainercover 3.0.82-stable review
This is the start of the stable review cycle for the 3.0.82 release. There are 21 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu Jun 13 19:52:33 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.0.82-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 3.0.82-rc1
Steven Rostedt <[email protected]>
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
Namhyung Kim <[email protected]>
tracing: Fix possible NULL pointer dereferences
Ying Xue <[email protected]>
USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer
Andrew Worsley <[email protected]>
USB: serial: ftdi_sio: Handle the old_termios == 0 case e.g. uart_resume_port()
Egbert Eich <[email protected]>
drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC.
Huacai Chen <[email protected]>
drm: fix a use-after-free when GPU acceleration disabled
Guenter Roeck <[email protected]>
hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617
Ash Willis <[email protected]>
ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6
Alex Hung <[email protected]>
ACPI / video: ignore BIOS initial backlight value for HP m4
Johan Hovold <[email protected]>
USB: mos7720: fix hardware flow control
Johan Hovold <[email protected]>
USB: mos7720: fix message timeouts
Johan Hovold <[email protected]>
USB: mos7720: fix DMA to stack
Alan Stern <[email protected]>
USB: revert periodic scheduling bugfix
Johan Hovold <[email protected]>
USB: serial: fix Treo/Kyocera interrrupt-in urb context
Johan Hovold <[email protected]>
USB: whiteheat: fix broken port configuration
Robert Butora <[email protected]>
USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device
Johan Hovold <[email protected]>
USB: ark3116: fix control-message timeout
Johan Hovold <[email protected]>
USB: keyspan: fix bogus array index
Johan Hovold <[email protected]>
USB: iuu_phoenix: fix bulk-message timeout
Takashi Iwai <[email protected]>
ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
Bjørn Mork <[email protected]>
USB: option: blacklist network interface on Huawei E1820
-------------
Diffstat:
Makefile | 4 +-- drivers/acpi/video.c | 16 +++++++++++ drivers/gpu/drm/drm_irq.c | 6 +++- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- drivers/hwmon/adm1021.c | 58 +++++++++++++++++++++++++++++++++------ drivers/usb/host/ehci-sched.c | 2 +- drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/cypress_m8.c | 18 +++++++++++- drivers/usb/serial/cypress_m8.h | 4 +++ drivers/usb/serial/ftdi_sio.c | 4 +++ drivers/usb/serial/iuu_phoenix.c | 4 +-- drivers/usb/serial/keyspan.c | 2 +- drivers/usb/serial/mos7720.c | 25 ++++++++++++----- drivers/usb/serial/option.c | 2 ++ drivers/usb/serial/visor.c | 1 + drivers/usb/serial/whiteheat.c | 2 +- kernel/trace/ftrace.c | 34 +++++++++++------------ sound/usb/quirks-table.h | 8 +++++- 18 files changed, 150 insertions(+), 44 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 4/21 USB: keyspan: fix bogus array index
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit a07088098a650267b2eda689538133a324b9523f upstream.
The outcont_endpoints array was indexed using the port minor number (which can be greater than the array size) rather than the device port number.
--- drivers/usb/serial/keyspan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/keyspan.c +1 -1
@@ -1833,7 +1833,7 @@ static int keyspan_usa26_send_setup(stru d_details = s_priv->device_details; device_port = port->number - port->serial->minor; - outcont_urb = d_details->outcont_endpoints[port->number]; + outcont_urb = d_details->outcont_endpoints[device_port]; this_urb = p_priv->outcont_urb;dbg ("%s - endpoint %d" , __func__,usb_pipeendpoint (this_urb->pipe));
Greg Kroah-Hartman
maintainerPATCH 7/21 USB: whiteheat: fix broken port configuration
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 9eecf22d2b375b9064a20421c6c307b760b03d46 upstream.
When configuring the port (e.g. set_termios) the port minor number rather than the port number was used in the request (and they only coincide for minor number 0).
--- drivers/usb/serial/whiteheat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/whiteheat.c +1 -1
@@ -1209,7 +1209,7 @@ static void firm_setup_port(struct tty_sstruct whiteheat_port_settings port_settings;unsigned int cflag = tty->termios->c_cflag; - port_settings.port = port->number +1 ; + port_settings.port = port->number - port->serial->minor +1 ;/* get the byte size */ switch (cflag &CSIZE ) {
Greg Kroah-Hartman
maintainerPATCH 9/21 USB: revert periodic scheduling bugfix
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit fdc03438f53a00294ed9939eb3a1f6db6f3d8963 upstream.
This patch reverts commit 3e619d04159be54b3daa0b7036b0ce9e067f4b5d (USB: EHCI: fix bug in scheduling periodic split transfers). The commit was valid -- it fixed a real bug -- but the periodic scheduler in ehci-hcd is in such bad shape (especially the part that handles split transactions) that fixing one bug is very likely to cause another to surface. That's what happened in this case; the result was choppy and noisy playback on certain 24-bit audio devices.
The only real fix will be to rewrite this entire section of code. My next project...
This fixes https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1136110.
Thanks to Tim Richardson for extra testing and feedback, and to Joseph Salisbury and Tyson Tan for tracking down the original source of the problem.
--- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-sched.c +1 -1
@@ -236,7 +236,7 @@ static inline unsigned char tt_start_ufr }static const unsigned char -max_tt_usecs[] = {125 ,125 ,125 ,125 ,125 ,125 ,125 ,25 }; +max_tt_usecs[] = {125 ,125 ,125 ,125 ,125 ,125 ,30 ,0 };/* carryover low/fullspeed bandwidth that crosses uframe boundries */ static inline void carryover_tt_bandwidth (unsigned short tt_usecs[8 ])
Greg Kroah-Hartman
maintainerPATCH 13/21 ACPI / video: ignore BIOS initial backlight value for HP m4
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Hung <[email protected]>
commit fedbe9bc6fd3e14b1ffbb3dac407777ac4a3650c upstream.
On HP m4 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.
References: https://bugs.launchpad.net/bugs/1184501
--- drivers/acpi/video.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
@@ -448,6 +448,14 @@ static struct dmi_system_id video_dmi_ta DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"), }, }, + { + .callback = video_ignore_initial_backlight, + .ident = "HP Pavilion m4", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"), + }, + }, {} };
Greg Kroah-Hartman
maintainerPATCH 5/21 USB: ark3116: fix control-message timeout
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 634371911730a462626071065b64cd6e1fe213e0 upstream.
The control-message timeout is specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/ark3116.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/ark3116.c +1 -1
@@ -49,7 +49,7 @@ static int debug;#define DRIVER_NAME "ark3116"/* usb timeout of 1 second */ -#define ARK_TIMEOUT (1*HZ) +#define ARK_TIMEOUT 1000static const struct usb_device_id id_table[] = { {USB_DEVICE (0x6547 ,0x0232 ) },
Greg Kroah-Hartman
maintainerPATCH 6/21 USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Butora <[email protected]>
commit 6529591e3eef65f0f528a81ac169f6e294b947a7 upstream.
The patch adds a new HIDCOM device and does not affect other devices driven by the cypress_M8 module. Changes are:
- add VendorID ProductID to device tables
- skip unstable speed check because FRWD uses 115200bps
- skip reset at probe which is an issue workaround for this particular device.
--- drivers/usb/serial/cypress_m8.c | 18 +++++++++++++++++- drivers/usb/serial/cypress_m8.h | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-)
drivers/usb/serial/cypress_m8.c +17 -1
@@ -96,6 +96,7 @@ static const struct usb_device_id id_tabstatic const struct usb_device_id id_table_cyphidcomrs232[] = { {USB_DEVICE (VENDOR_ID_CYPRESS ,PRODUCT_ID_CYPHIDCOM ) }, {USB_DEVICE (VENDOR_ID_POWERCOM ,PRODUCT_ID_UPS ) }, + {USB_DEVICE (VENDOR_ID_FRWD ,PRODUCT_ID_CYPHIDCOM_FRWD ) }, { }/* Terminating entry */ };
@@ -109,6 +110,7 @@ static const struct usb_device_id id_tab { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, + { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) }, { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, { } /* Terminating entry */ };
@@ -268,6 +270,12 @@ static struct usb_serial_driver cypress_* Cypress serial helper functions *****************************************************************************/ +/* FRWD Dongle hidcom needs to skip reset and speed checks */ +static inline bool is_frwd (struct usb_device *dev) +{ +return ((le16_to_cpu (dev->descriptor.idVendor) ==VENDOR_ID_FRWD ) && + (le16_to_cpu (dev->descriptor.idProduct) ==PRODUCT_ID_CYPHIDCOM_FRWD )); +}static int analyze_baud_rate (struct usb_serial_port *port,speed_t new_rate) {
@@ -277,6 +285,10 @@ static int analyze_baud_rate(struct usb_if (unstable_bauds)return new_rate; +/* FRWD Dongle uses 115200 bps */ +if (is_frwd (port->serial->dev)) +return new_rate; +/* * The general purpose firmware for the Cypress M8 allows for * a maximum speed of 57600bps (I have no idea whether DeLorme
@@ -490,7 +502,11 @@ static int generic_startup(struct usb_se }init_waitqueue_head (&priv->delta_msr_wait); -usb_reset_configuration (serial->dev); +/* Skip reset for FRWD device. It is a workaound: +device hangs if it receives SET_CONFIGURE in Configured +state. */ +if (!is_frwd (serial->dev)) +usb_reset_configuration (serial->dev); priv->cmd_ctrl =0 ; priv->line_control =0 ;
drivers/usb/serial/cypress_m8.h +4 -0
@@ -24,6 +24,10 @@#define VENDOR_ID_CYPRESS 0x04b4#define PRODUCT_ID_CYPHIDCOM 0x5500 +/* FRWD Dongle - a GPS sports watch */ +#define VENDOR_ID_FRWD 0x6737 +#define PRODUCT_ID_CYPHIDCOM_FRWD 0x0001 +/* Powercom UPS, chip CY7C63723 */ #define VENDOR_ID_POWERCOM 0x0d9f#define PRODUCT_ID_UPS 0x0002
Greg Kroah-Hartman
maintainerPATCH 15/21 hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
commit 591bfcfc334a003ba31c0deff03b22e73349939b upstream.
On a system with both MAX1617 and JC42 sensors, JC42 sensors can be misdetected as LM84. Strengthen detection sufficiently enough to avoid this misdetection. Also improve detection for ADM1021.
Modeled after chip detection code in sensors-detect command.
--- drivers/hwmon/adm1021.c | 58 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 8 deletions(-)
drivers/hwmon/adm1021.c +50 -8
@@ -311,26 +311,68 @@ static int adm1021_detect(struct i2c_cli man_id =i2c_smbus_read_byte_data (client,ADM1021_REG_MAN_ID ); dev_id =i2c_smbus_read_byte_data (client,ADM1021_REG_DEV_ID ); +if (man_id <0 || dev_id <0 ) +return -ENODEV ; +if (man_id ==0x4d && dev_id ==0x01 ) type_name ="max1617a" ;else if (man_id ==0x41 ) {if ((dev_id &0xF0 ) ==0x30 ) type_name ="adm1023" ; -else +else if ((dev_id &0xF0 ) ==0x00 ) type_name ="adm1021" ; +else +return -ENODEV ; }else if (man_id ==0x49 ) type_name ="thmc10" ;else if (man_id ==0x23 ) type_name ="gl523sm" ;else if (man_id ==0x54 ) type_name ="mc1066" ; -/* LM84 Mfr ID in a different place, and it has more unused bits */ -else if (conv_rate ==0x00 - && (config &0x7F ) ==0x00 - && (status &0xAB ) ==0x00 ) - type_name ="lm84" ; -else - type_name ="max1617" ; +else { +int lte, rte, lhi, rhi, llo, rlo; + +/* extra checks for LM84 and MAX1617 to avoid misdetections */ + + llo =i2c_smbus_read_byte_data (client,ADM1021_REG_THYST_R (0 )); + rlo =i2c_smbus_read_byte_data (client,ADM1021_REG_THYST_R (1 )); + +/* fail if any of the additional register reads failed */ +if (llo <0 || rlo <0 ) +return -ENODEV ; + + lte =i2c_smbus_read_byte_data (client,ADM1021_REG_TEMP (0 )); + rte =i2c_smbus_read_byte_data (client,ADM1021_REG_TEMP (1 )); + lhi =i2c_smbus_read_byte_data (client,ADM1021_REG_TOS_R (0 )); + rhi =i2c_smbus_read_byte_data (client,ADM1021_REG_TOS_R (1 )); + +/* +* Fail for negative temperatures and negative high limits. +* This check also catches read errors on the tested registers. +*/ +if ((s8 )lte <0 || (s8 )rte <0 || (s8 )lhi <0 || (s8 )rhi <0 ) +return -ENODEV ; + +/* fail if all registers hold the same value */ +if (lte == rte && lte == lhi && lte == rhi && lte == llo + && lte == rlo) +return -ENODEV ; + +/* +* LM84 Mfr ID is in a different place, +* and it has more unused bits. +*/ +if (conv_rate ==0x00 + && (config &0x7F ) ==0x00 + && (status &0xAB ) ==0x00 ) { + type_name ="lm84" ; + }else { +/* fail if low limits are larger than high limits */ +if ((s8 )llo > lhi || (s8 )rlo > rhi) +return -ENODEV ; + type_name ="max1617" ; + } + }pr_debug ("adm1021: Detected chip %s at adapter %d, address 0x%02x.\n" , type_name,i2c_adapter_id (adapter), client->addr);
Greg Kroah-Hartman
maintainerPATCH 8/21 USB: serial: fix Treo/Kyocera interrrupt-in urb context
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 5f8e2c07d75967ee49a5da1d21ddf5f50d48cda0 upstream.
The first and second interrupt-in urbs are swapped for some Treo/Kyocera devices, but the urb context was never updated with the new port.
--- drivers/usb/serial/visor.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/visor.c +1 -0
@@ -600,6 +600,7 @@ static int treo_attach(struct usb_serial dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ dest->bulk_in_buffer = src->bulk_in_buffer; \ dest->interrupt_in_urb = src->interrupt_in_urb; \ + dest->interrupt_in_urb->context = dest; \ dest->interrupt_in_endpointAddress = \ src->interrupt_in_endpointAddress;\ dest->interrupt_in_buffer = src->interrupt_in_buffer; \
Greg Kroah-Hartman
maintainerPATCH 10/21 USB: mos7720: fix DMA to stack
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 72ea18a558ed7a63a50bb121ba60d73b5b38ae30 upstream.
The read_mos_reg function is called with stack-allocated buffers, which must not be used for control messages.
--- drivers/usb/serial/mos7720.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/usb/serial/mos7720.c +14 -3
@@ -234,11 +234,22 @@ static int read_mos_reg(struct usb_seria__u8 requesttype = (__u8 )0xc0 ;__u16 index =get_reg_index (reg);__u16 value =get_reg_value (reg, serial_portnum); -int status =usb_control_msg (usbdev, pipe, request, requesttype, value, - index, data,1 ,MOS_WDR_TIMEOUT ); -if (status <0 ) +u8 *buf; +int status; + + buf =kmalloc (1 ,GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + + status =usb_control_msg (usbdev, pipe, request, requesttype, value, + index, buf,1 ,MOS_WDR_TIMEOUT ); +if (status ==1 ) + *data = *buf; +else if (status <0 )dev_err (&usbdev->dev,"mos7720: usb_control_msg() failed: %d" , status); +kfree (buf); +return status; }
Greg Kroah-Hartman
maintainerPATCH 16/21 drm: fix a use-after-free when GPU acceleration disabled
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <[email protected]>
commit b7ea85a4fed37835eec78a7be3039c8dc22b8178 upstream.
When GPU acceleration is disabled, drm_vblank_cleanup() will free the vblank-related data, such as vblank_refcount, vblank_inmodeset, etc. But we found that drm_vblank_post_modeset() may be called after the cleanup, which use vblank_refcount and vblank_inmodeset. And this will cause a kernel panic.
Fix this by return immediately if dev->num_crtcs is zero. This is the same thing that drm_vblank_pre_modeset() does.
Call trace of a drm_vblank_post_modeset() after drm_vblank_cleanup():
[ 62.628906] [<ffffffff804868d0>] drm_vblank_post_modeset+0x34/0xb4 [ 62.628906] [<ffffffff804c7008>] atombios_crtc_dpms+0xb4/0x174 [ 62.628906] [<ffffffff804c70e0>] atombios_crtc_commit+0x18/0x38 [ 62.628906] [<ffffffff8047f038>] drm_crtc_helper_set_mode+0x304/0x3cc [ 62.628906] [<ffffffff8047f92c>] drm_crtc_helper_set_config+0x6d8/0x988 [ 62.628906] [<ffffffff8047dd40>] drm_fb_helper_set_par+0x94/0x104 [ 62.628906] [<ffffffff80439d14>] fbcon_init+0x424/0x57c [ 62.628906] [<ffffffff8046a638>] visual_init+0xb8/0x118 [ 62.628906] [<ffffffff8046b9f8>] take_over_console+0x238/0x384 [ 62.628906] [<ffffffff80436df8>] fbcon_takeover+0x7c/0xdc [ 62.628906] [<ffffffff8024fa20>] notifier_call_chain+0x44/0x94 [ 62.628906] [<ffffffff8024fcbc>] __blocking_notifier_call_chain+0x48/0x68 [ 62.628906] [<ffffffff8042d990>] register_framebuffer+0x228/0x260 [ 62.628906] [<ffffffff8047e010>] drm_fb_helper_single_fb_probe+0x260/0x314 [ 62.628906] [<ffffffff8047e2c4>] drm_fb_helper_initial_config+0x200/0x234 [ 62.628906] [<ffffffff804e5560>] radeon_fbdev_init+0xd4/0xf4 [ 62.628906] [<ffffffff804e0e08>] radeon_modeset_init+0x9bc/0xa18 [ 62.628906] [<ffffffff804bfc14>] radeon_driver_load_kms+0xdc/0x12c [ 62.628906] [<ffffffff8048b548>] drm_get_pci_dev+0x148/0x238 [ 62.628906] [<ffffffff80423564>] local_pci_probe+0x5c/0xd0 [ 62.628906] [<ffffffff80241ac4>] work_for_cpu_fn+0x1c/0x30 [ 62.628906] [<ffffffff802427c8>] process_one_work+0x274/0x3bc [ 62.628906] [<ffffffff80242934>] process_scheduled_works+0x24/0x44 [ 62.628906] [<ffffffff8024515c>] worker_thread+0x31c/0x3f4 [ 62.628906] [<ffffffff802497a8>] kthread+0x88/0x90 [ 62.628906] [<ffffffff80206794>] kernel_thread_helper+0x10/0x18
--- drivers/gpu/drm/drm_irq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_irq.c +5 -1
@@ -976,7 +976,7 @@ EXPORT_SYMBOL(drm_vblank_off);*/ void drm_vblank_pre_modeset (struct drm_device *dev,int crtc) { -/* vblank is not initialized (IRQ not installed ?) */ +/* vblank is not initialized (IRQ not installed ?), or has been freed */ if (!dev->num_crtcs)return ;/*
@@ -998,6 +998,10 @@ void drm_vblank_post_modeset(struct drm_ {unsigned long irqflags; +/* vblank is not initialized (IRQ not installed ?), or has been freed */ +if (!dev->num_crtcs) +return ; +if (dev->vblank_inmodeset[crtc]) {spin_lock_irqsave (&dev->vbl_lock, irqflags); dev->vblank_disable_allowed =1 ;
Greg Kroah-Hartman
maintainerPATCH 11/21 USB: mos7720: fix message timeouts
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 849513a7809175420d353625b6f651d961e99d49 upstream.
The control and bulk-message timeouts are specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/mos7720.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/serial/mos7720.c +3 -3
@@ -44,7 +44,7 @@#define DRIVER_DESC "Moschip USB Serial Driver"/* default urb timeout */ -#define MOS_WDR_TIMEOUT (HZ * 5) +#define MOS_WDR_TIMEOUT 5000#define MOS_MAX_PORT 0x02#define MOS_WRITE 0x0E
@@ -2124,7 +2124,7 @@ static int mos7720_startup(struct usb_se/* setting configuration feature to one */ usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), - (__u8 )0x03 ,0x00 ,0x01 ,0x00 ,NULL ,0x00 ,5 *HZ ); + (__u8 )0x03 ,0x00 ,0x01 ,0x00 ,NULL ,0x00 ,5000 );/* start the interrupt urb */ ret_val =usb_submit_urb (serial->port[0 ]->interrupt_in_urb,GFP_KERNEL );
@@ -2169,7 +2169,7 @@ static void mos7720_release(struct usb_s/* wait for synchronous usb calls to return */ if (mos_parport->msg_pending)wait_for_completion_timeout (&mos_parport->syncmsg_compl, -MOS_WDR_TIMEOUT ); +msecs_to_jiffies (MOS_WDR_TIMEOUT ));parport_remove_port (mos_parport->pp);usb_set_serial_data (serial,NULL );
Greg Kroah-Hartman
maintainerPATCH 12/21 USB: mos7720: fix hardware flow control
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit a26f009a070e840fadacb91013b2391ba7ab6cc2 upstream.
The register access to enable hardware flow control depends on the device port number and not the port minor number.
--- drivers/usb/serial/mos7720.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/mos7720.c +1 -1
@@ -1711,7 +1711,7 @@ static void change_port_settings(struct mos7720_port->shadowMCR |= (UART_MCR_XONANY );/* To set hardware flow control to the specified * * serial port, in SP1/2_CONTROL_REG */ -if (port->number) +if (port_number)write_mos_reg (serial, dummy,SP_CONTROL_REG ,0x01 );else write_mos_reg (serial, dummy,SP_CONTROL_REG ,0x02 );
Greg Kroah-Hartman
maintainerPATCH 14/21 ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ash Willis <[email protected]>
commit 780a6ec640a3fed671fc2c40e4dd30c03eca3ac3 upstream.
This patch addresses kernel bug 56661. BIOS reports an incorrect backlight value, causing the driver to switch off the backlight completely during startup. This patch ignores the incorrect value from BIOS.
References: https://bugzilla.kernel.org/show_bug.cgi?id=56661
--- drivers/acpi/video.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
@@ -450,6 +450,14 @@ static struct dmi_system_id video_dmi_ta }, { .callback = video_ignore_initial_backlight, + .ident = "HP Pavilion g6 Notebook PC", + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"Hewlett-Packard" ), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"), + }, + }, + { + .callback = video_ignore_initial_backlight, .ident = "HP Pavilion m4", .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
Greg Kroah-Hartman
maintainerPATCH 17/21 drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC.
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Egbert Eich <[email protected]>
commit 53d3b4d7778daf15900867336c85d3f8dd70600c upstream.
In intel_sdvo_get_lvds_modes() the wrong i2c adapter record is used for DDC. Thus the code will always have to rely on a LVDS panel mode supplied by VBT.
In most cases this succeeds, so this didn't get detected for quite a while.
This regression seems to have been introduced in
commit f899fc64cda8569d0529452aafc0da31c042df2e
Author: Chris Wilson <[email protected]> Date: Tue Jul 20 15:44:45 2010 -0700
drm/i915: use GMBUS to manage i2c links
--- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_sdvo.c +1 -1
@@ -1609,7 +1609,7 @@ static void intel_sdvo_get_lvds_modes(st* Assume that the preferred modes are * arranged in priority order. */ -intel_ddc_get_modes (connector, intel_sdvo->i2c); +intel_ddc_get_modes (connector, &intel_sdvo->ddc);if (list_empty (&connector->probed_modes) == false) goto end;
Greg Kroah-Hartman
maintainerPATCH 18/21 USB: serial: ftdi_sio: Handle the old_termios == 0 case e.g. uart_resume_port()
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Worsley <[email protected]>
commit c515598e0f5769916c31c00392cc2bfe6af74e55 upstream.
Handle null old_termios in ftdi_set_termios() calls from uart_resume_port().
--- drivers/usb/serial/ftdi_sio.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/serial/ftdi_sio.c +4 -0
@@ -2141,6 +2141,9 @@ static void ftdi_set_termios(struct tty_ cflag = termios->c_cflag; +if (old_termios ==0 ) + goto no_skip; +if (old_termios->c_cflag == termios->c_cflag && old_termios->c_ispeed == termios->c_ispeed && old_termios->c_ospeed == termios->c_ospeed)
@@ -2154,6 +2157,7 @@ static void ftdi_set_termios(struct tty_ (termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB))) goto no_data_parity_stop_changes; +no_skip:/* Set number of data bits, parity, stop bits */ urb_value =0 ;
Greg Kroah-Hartman
maintainerPATCH 19/21 USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ying Xue <[email protected]>
commit a816e3113b63753c330ca4751ea1d208e93e3015 upstream.
Pointers should not be compared to plain integers. Quiets the sparse warning:
warning: Using plain integer as NULL pointer
--- drivers/usb/serial/ftdi_sio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/ftdi_sio.c +1 -1
@@ -2141,7 +2141,7 @@ static void ftdi_set_termios(struct tty_ cflag = termios->c_cflag; -if (old_termios ==0 ) +if (!old_termios) goto no_skip; if (old_termios->c_cflag == termios->c_cflag
Greg Kroah-Hartman
maintainerPATCH 20/21 tracing: Fix possible NULL pointer dereferences
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namhyung Kim <[email protected]>
commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream.
Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic.
It can be easily reproduced with following command:
$ cd /sys/kernel/debug/tracing $ echo 1234 | sudo tee -a set_ftrace_pid
In this example, GNU coreutils' tee opens the file with fopen(, "a") and then the fopen() internally calls lseek().
Link:
http://lkml.kernel.org/r/[email protected]
--- kernel/trace/ftrace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
kernel/trace/ftrace.c +5 -5
@@ -2300,7 +2300,7 @@ ftrace_notrace_open(struct inode *inode, }static loff_t -ftrace_regex_lseek (struct file *file,loff_t offset,int origin) +ftrace_filter_lseek (struct file *file,loff_t offset,int origin) {loff_t ret;
@@ -3118,7 +3118,7 @@ static const struct file_operations ftra .open = ftrace_filter_open, .read = seq_read, .write = ftrace_filter_write, - .llseek = ftrace_regex_lseek, + .llseek = ftrace_filter_lseek, .release = ftrace_regex_release, };
@@ -3126,7 +3126,7 @@ static const struct file_operations ftra .open = ftrace_notrace_open, .read = seq_read, .write = ftrace_notrace_write, - .llseek = ftrace_regex_lseek, + .llseek = ftrace_filter_lseek, .release = ftrace_regex_release, };
@@ -3335,8 +3335,8 @@ static const struct file_operations ftra .open = ftrace_graph_open, .read = seq_read, .write = ftrace_graph_write, + .llseek = ftrace_filter_lseek, .release = ftrace_graph_release, - .llseek = seq_lseek, };#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
@@ -3822,7 +3822,7 @@ static const struct file_operations ftra .open = ftrace_pid_open, .write = ftrace_pid_write, .read = seq_read, - .llseek = seq_lseek, + .llseek = ftrace_filter_lseek, .release = ftrace_pid_release, };
Greg Kroah-Hartman
maintainerPATCH 21/21 ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
commit 7f49ef69db6bbf756c0abca7e9b65b32e999eec8 upstream.
As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.
--- kernel/trace/ftrace.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
kernel/trace/ftrace.c +13 -13
@@ -933,6 +933,19 @@ static __init void ftrace_profile_debugfstatic struct pid *const ftrace_swapper_pid = &init_struct_pid; +static loff_t +ftrace_filter_lseek (struct file *file,loff_t offset,int whence) +{ +loff_t ret; + +if (file->f_mode &FMODE_READ ) + ret =seq_lseek (file, offset, whence); +else + file->f_pos = ret =1 ; + +return ret; +} +#ifdef CONFIG_DYNAMIC_FTRACE #ifndef CONFIG_FTRACE_MCOUNT_RECORD
@@ -2299,19 +2312,6 @@ ftrace_notrace_open(struct inode *inode, inode, file); } -static loff_t -ftrace_filter_lseek (struct file *file,loff_t offset,int origin) -{ -loff_t ret; - -if (file->f_mode &FMODE_READ ) - ret =seq_lseek (file, offset, origin); -else - file->f_pos = ret =1 ; - -return ret; -} -static int ftrace_match (char *str,char *regex,int len,int type) {int matched =0 ;
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.0.82 release. There are 21 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu Jun 13 19:52:33 UTC 2013. Anything received after that time might be too late.
Quoted 8 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.0.82-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Patches applied cleanly to 3.0.81, 3.4.48, and 3.9.5
Compiled and booted on the following systems:
Samsung Series 9 900X4C Intel Corei5:
(3.4.49-rc1, and 3.9.6-rc1)
HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics:
(3.0.82-rc1, 3.4.49-rc1, and 3.9.6-rc1)dmesgs for all releases look good. No regressions compared to the previous dmesgs for each of these releases.
Reviewed patches.
Cross-compile testing:
HP Compaq dc7700 SFF desktop: x86-64 Intel Core-i2:
(3.0.82-rc1, 3.4.48-rc1, and 3.9.6-rc1)
Cross-compile tests results:
alpha: defconfig passed on all
arm: defconfig passed on all
arm64: not applicable to 3.0.y, 3.4.y. defconfig passed on 3.9.y
c6x: not applicable to 3.0.y, defconfig passed on 3.4.y and 3.9.y
mips: defconfig passed on all
mipsel: defconfig passed on all
powerpc: wii_defconfig passed on all
sh: defconfig passed on all
sparc: defconfig passed on all
tile: tilegx_defconfig passed on all
-- Shuah
Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research America (Silicon Valley) [email protected] | (970) 672-0658