Patch "usbcore: Fix wrong device in an error message in hub_port_connect()" has been added to the 3.16-stable tree

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

 



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

    usbcore: Fix wrong device in an error message in hub_port_connect()

to the 3.16-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:
     usbcore-fix-wrong-device-in-an-error-message-in-hub_port_connect.patch
and it can be found in the queue-3.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From dd5f5006d1035547559c8a90781a7e249787a7a2 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@xxxxxxx>
Date: Tue, 19 Aug 2014 17:37:55 +0200
Subject: usbcore: Fix wrong device in an error message in hub_port_connect()

From: Takashi Iwai <tiwai@xxxxxxx>

commit dd5f5006d1035547559c8a90781a7e249787a7a2 upstream.

The commit [5ee0f803cc3a: usbcore: don't log on consecutive debounce
failures of the same port] added the check of the reliable port, but
it also replaced the device argument to dev_err() wrongly, which leads
to a NULL dereference.

This patch restores the right device, port_dev->dev.  Also, since
dev_err() itself shows the port number, reduce the port number shown
in the error message, essentially reverting to the state before the
commit 5ee0f803cc3a.

[The fix suggested by Hannes, and the error message cleanup suggested
 by Alan Stern]

Fixes: 5ee0f803cc3a ('usbcore: don't log on consecutive debounce failures of the same port')
Reported-by: Hannes Reinecke <hare@xxxxxxxx>
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/usb/core/hub.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4619,9 +4619,7 @@ static void hub_port_connect(struct usb_
 			if (status != -ENODEV &&
 				port1 != unreliable_port &&
 				printk_ratelimit())
-				dev_err(&udev->dev, "connect-debounce failed, port %d disabled\n",
-					port1);
-
+				dev_err(&port_dev->dev, "connect-debounce failed\n");
 			portstatus &= ~USB_PORT_STAT_CONNECTION;
 			unreliable_port = port1;
 		} else {


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-3.16/btrfs-fix-memory-corruption-by-ulist_add_merge-on-32bit-arch.patch
queue-3.16/alsa-hda-realtek-avoid-setting-wrong-coef-on-alc269-co.patch
queue-3.16/usbcore-fix-wrong-device-in-an-error-message-in-hub_port_connect.patch
queue-3.16/alsa-usb-audio-fix-boss-me-25-midi-regression.patch
queue-3.16/alsa-hda-restore-the-gpio-led-after-resume.patch
queue-3.16/alsa-hda-fix-an-external-mic-jack-problem-on-a-hp-machine.patch
queue-3.16/alsa-virtuoso-add-xonar-essence-stx-ii-support.patch
queue-3.16/alsa-hda-add-mute-led-pin-quirk-for-hp-15-touchsmart.patch
queue-3.16/alsa-hda-ca0132-don-t-try-loading-firmware-at-resume-when-already-failed.patch
queue-3.16/alsa-usb-audio-adjust-gamecom-780-volume-level.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]