From: Greg Kroah-Hartman Date: Tue, 25 Mar 2014 20:26:02 +0000 (-0700) Subject: 3.13-stable patches X-Git-Tag: v3.4.85~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b5be0677fa2c6c207c994fbd8bca16a1ca09a02;p=thirdparty%2Fkernel%2Fstable-queue.git 3.13-stable patches added patches: alsa-compress-pass-through-return-value-of-open-ops-callback.patch clocksource-vf_pit_timer-use-complement-for-sched_clock-reading.patch hid-hidraw-fix-warning-destroying-hidraw-device-files-after-parent.patch --- diff --git a/queue-3.13/alsa-compress-pass-through-return-value-of-open-ops-callback.patch b/queue-3.13/alsa-compress-pass-through-return-value-of-open-ops-callback.patch new file mode 100644 index 00000000000..78f1d553195 --- /dev/null +++ b/queue-3.13/alsa-compress-pass-through-return-value-of-open-ops-callback.patch @@ -0,0 +1,38 @@ +From 749d32237bf39e6576dd95bfdf24e4378e51716c Mon Sep 17 00:00:00 2001 +From: Charles Keepax +Date: Wed, 19 Mar 2014 12:59:39 +0000 +Subject: ALSA: compress: Pass through return value of open ops callback + +From: Charles Keepax + +commit 749d32237bf39e6576dd95bfdf24e4378e51716c upstream. + +The snd_compr_open function would always return 0 even if the compressed +ops open function failed, obviously this is incorrect. Looks like this +was introduced by a small typo in: + +commit a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85 +ALSA: Add a reference counter to card instance + +This patch returns the value from the compressed op as it should. + +Signed-off-by: Charles Keepax +Acked-by: Vinod Koul +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/compress_offload.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/core/compress_offload.c ++++ b/sound/core/compress_offload.c +@@ -133,7 +133,7 @@ static int snd_compr_open(struct inode * + kfree(data); + } + snd_card_unref(compr->card); +- return 0; ++ return ret; + } + + static int snd_compr_free(struct inode *inode, struct file *f) diff --git a/queue-3.13/clocksource-vf_pit_timer-use-complement-for-sched_clock-reading.patch b/queue-3.13/clocksource-vf_pit_timer-use-complement-for-sched_clock-reading.patch new file mode 100644 index 00000000000..acdebce4bd6 --- /dev/null +++ b/queue-3.13/clocksource-vf_pit_timer-use-complement-for-sched_clock-reading.patch @@ -0,0 +1,39 @@ +From 224aa3ed45c8735ae02bb2ecca002409fa6aa772 Mon Sep 17 00:00:00 2001 +From: Stefan Agner +Date: Wed, 5 Mar 2014 23:11:08 +0100 +Subject: clocksource: vf_pit_timer: use complement for sched_clock reading + +From: Stefan Agner + +commit 224aa3ed45c8735ae02bb2ecca002409fa6aa772 upstream. + +Vybrids PIT register is monitonic decreasing. However, sched_clock +reading needs to be monitonic increasing. Use bitwise not to get +the complement of the clock register. This fixes the clock going +backward. Also, the clock now starts at 0 since we load the +register with the maximum value at start. + +Signed-off-by: Stefan Agner +Acked-by: Shawn Guo +Cc: daniel.lezcano@linaro.org +Cc: linux-arm-kernel@lists.infradead.org +Cc: linux@arm.linux.org.uk +Link: http://lkml.kernel.org/r/d25af915993aec1b486be653eb86f748ddef54fe.1394057313.git.stefan@agner.ch +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clocksource/vf_pit_timer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/clocksource/vf_pit_timer.c ++++ b/drivers/clocksource/vf_pit_timer.c +@@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(v + + static u64 pit_read_sched_clock(void) + { +- return __raw_readl(clksrc_base + PITCVAL); ++ return ~__raw_readl(clksrc_base + PITCVAL); + } + + static int __init pit_clocksource_init(unsigned long rate) diff --git a/queue-3.13/hid-hidraw-fix-warning-destroying-hidraw-device-files-after-parent.patch b/queue-3.13/hid-hidraw-fix-warning-destroying-hidraw-device-files-after-parent.patch new file mode 100644 index 00000000000..d3a2fad0e0f --- /dev/null +++ b/queue-3.13/hid-hidraw-fix-warning-destroying-hidraw-device-files-after-parent.patch @@ -0,0 +1,79 @@ +From 47587fc098451c2100dc1fb618855fc2e2d937af Mon Sep 17 00:00:00 2001 +From: Fernando Luis Vazquez Cao +Date: Wed, 26 Feb 2014 16:51:24 +0900 +Subject: HID: hidraw: fix warning destroying hidraw device files after parent + +From: Fernando Luis Vazquez Cao + +commit 47587fc098451c2100dc1fb618855fc2e2d937af upstream. + +I noticed that after hot unplugging a Logitech unifying receiver +(drivers/hid/hid-logitech-dj.c) the kernel would occasionally spew a +stack trace similar to this: + +usb 1-1.1.2: USB disconnect, device number 7 +WARNING: CPU: 0 PID: 2865 at fs/sysfs/group.c:216 device_del+0x40/0x1b0() +sysfs group ffffffff8187fa20 not found for kobject 'hidraw0' +[...] +CPU: 0 PID: 2865 Comm: upowerd Tainted: G W 3.14.0-rc4 #7 +Hardware name: LENOVO 7783PN4/ , BIOS 9HKT43AUS 07/11/2011 + 0000000000000009 ffffffff814cd684 ffff880427ccfdf8 ffffffff810616e7 + ffff88041ec61800 ffff880427ccfe48 ffff88041e444d80 ffff880426fab8e8 + ffff880429359960 ffffffff8106174c ffffffff81714b98 0000000000000028 +Call Trace: + [] ? dump_stack+0x41/0x51 + [] ? warn_slowpath_common+0x77/0x90 + [] ? warn_slowpath_fmt+0x4c/0x50 + [] ? device_del+0x40/0x1b0 + [] ? device_unregister+0x2f/0x50 + [] ? device_destroy+0x3a/0x40 + [] ? drop_ref+0x55/0x120 [hid] + [] ? hidraw_release+0x96/0xb0 [hid] + [] ? __fput+0xca/0x210 + [] ? task_work_run+0x97/0xd0 + [] ? do_notify_resume+0x69/0xa0 + [] ? int_signal+0x12/0x17 +---[ end trace 63f4a46f6566d737 ]--- + +During device removal hid_disconnect() is called via hid_hw_stop() to +stop the device and free all its resources, including the sysfs +files. The problem is that if a user space process, such as upowerd, +holds a reference to a hidraw file the corresponding sysfs files will +be kept around (drop_ref() does not call device_destroy() if the open +counter is not 0) and it will be usb_disconnect() who, by calling +device_del() for the USB device, will indirectly remove the sysfs +files of the hidraw device (sysfs_remove_dir() is recursive these +days). Because of this, by the time user space releases the last +reference to the hidraw file and drop_ref() tries to destroy the +device the sysfs files are already gone and the kernel will print +the warning above. + +Fix this by calling device_destroy() at USB disconnect time. + +Signed-off-by: Fernando Luis Vazquez Cao +Reviewed-by: David Herrmann +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hidraw.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/hid/hidraw.c ++++ b/drivers/hid/hidraw.c +@@ -313,13 +313,13 @@ static void drop_ref(struct hidraw *hidr + hid_hw_close(hidraw->hid); + wake_up_interruptible(&hidraw->wait); + } ++ device_destroy(hidraw_class, ++ MKDEV(hidraw_major, hidraw->minor)); + } else { + --hidraw->open; + } + if (!hidraw->open) { + if (!hidraw->exist) { +- device_destroy(hidraw_class, +- MKDEV(hidraw_major, hidraw->minor)); + hidraw_table[hidraw->minor] = NULL; + kfree(hidraw); + } else {