From: Greg Kroah-Hartman Date: Tue, 25 Jul 2017 18:05:47 +0000 (-0700) Subject: 4.4-stable patches X-Git-Tag: v3.18.63~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1caa2c754094a625ced9d695fb8a2dbce11532f6;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alarmtimer-don-t-rate-limit-one-shot-timers.patch spmi-include-of-based-modalias-in-device-uevent.patch tracing-fix-kmemleak-in-instance_rmdir.patch --- diff --git a/queue-4.4/alarmtimer-don-t-rate-limit-one-shot-timers.patch b/queue-4.4/alarmtimer-don-t-rate-limit-one-shot-timers.patch new file mode 100644 index 00000000000..81bfc4beb7c --- /dev/null +++ b/queue-4.4/alarmtimer-don-t-rate-limit-one-shot-timers.patch @@ -0,0 +1,38 @@ +From ghackmann@google.com Tue Jul 25 10:58:26 2017 +From: Greg Hackmann +Date: Mon, 24 Jul 2017 10:19:24 -0700 +Subject: alarmtimer: don't rate limit one-shot timers +To: John Stultz , Thomas Gleixner +Cc: Ben Fennema , linux-kernel@vger.kernel.org, Greg Hackmann , stable@vger.kernel.org +Message-ID: <20170724171924.27898-1-ghackmann@google.com> + +From: Greg Hackmann + +Commit ff86bf0c65f1 ("alarmtimer: Rate limit periodic intervals") sets a +minimum bound on the alarm timer interval. This minimum bound shouldn't +be applied if the interval is 0. Otherwise, one-shot timers will be +converted into periodic ones. + +Fixes: ff86bf0c65f1 ("alarmtimer: Rate limit periodic intervals") +Reported-by: Ben Fennema +Signed-off-by: Greg Hackmann +Cc: stable@vger.kernel.org +Cc: John Stultz +Reviewed-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman +--- + kernel/time/alarmtimer.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/time/alarmtimer.c ++++ b/kernel/time/alarmtimer.c +@@ -616,7 +616,8 @@ static int alarm_timer_set(struct k_itim + * Rate limit to the tick as a hot fix to prevent DOS. Will be + * mopped up later. + */ +- if (ktime_to_ns(timr->it.alarm.interval) < TICK_NSEC) ++ if (timr->it.alarm.interval.tv64 && ++ ktime_to_ns(timr->it.alarm.interval) < TICK_NSEC) + timr->it.alarm.interval = ktime_set(0, TICK_NSEC); + + exp = timespec_to_ktime(new_setting->it_value); diff --git a/queue-4.4/series b/queue-4.4/series index ec5becb6a92..7386524889d 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -77,3 +77,6 @@ rdma-core-initialize-port_num-in-qp_attr.patch drm-mst-fix-error-handling-during-mst-sideband-message-reception.patch drm-mst-avoid-dereferencing-a-null-mstb-in-drm_dp_mst_handle_up_req.patch drm-mst-avoid-processing-partially-received-up-down-message-transactions.patch +spmi-include-of-based-modalias-in-device-uevent.patch +tracing-fix-kmemleak-in-instance_rmdir.patch +alarmtimer-don-t-rate-limit-one-shot-timers.patch diff --git a/queue-4.4/spmi-include-of-based-modalias-in-device-uevent.patch b/queue-4.4/spmi-include-of-based-modalias-in-device-uevent.patch new file mode 100644 index 00000000000..76dd10e2e7d --- /dev/null +++ b/queue-4.4/spmi-include-of-based-modalias-in-device-uevent.patch @@ -0,0 +1,49 @@ +From d50daa2af2618dab6d21634e65a5fbcf4ae437d6 Mon Sep 17 00:00:00 2001 +From: Bjorn Andersson +Date: Thu, 29 Jun 2017 14:46:44 -0700 +Subject: spmi: Include OF based modalias in device uevent + +From: Bjorn Andersson + +commit d50daa2af2618dab6d21634e65a5fbcf4ae437d6 upstream. + +Include the OF-based modalias in the uevent sent when registering SPMI +devices, so that user space has a chance to autoload the kernel module +for the device. + +Tested-by: Rob Clark +Reported-by: Rob Clark +Reviewed-by: Stephen Boyd +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/spmi/spmi.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/spmi/spmi.c ++++ b/drivers/spmi/spmi.c +@@ -364,11 +364,23 @@ static int spmi_drv_remove(struct device + return 0; + } + ++static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env) ++{ ++ int ret; ++ ++ ret = of_device_uevent_modalias(dev, env); ++ if (ret != -ENODEV) ++ return ret; ++ ++ return 0; ++} ++ + static struct bus_type spmi_bus_type = { + .name = "spmi", + .match = spmi_device_match, + .probe = spmi_drv_probe, + .remove = spmi_drv_remove, ++ .uevent = spmi_drv_uevent, + }; + + /** diff --git a/queue-4.4/tracing-fix-kmemleak-in-instance_rmdir.patch b/queue-4.4/tracing-fix-kmemleak-in-instance_rmdir.patch new file mode 100644 index 00000000000..62c8789c034 --- /dev/null +++ b/queue-4.4/tracing-fix-kmemleak-in-instance_rmdir.patch @@ -0,0 +1,51 @@ +From db9108e054700c96322b0f0028546aa4e643cf0b Mon Sep 17 00:00:00 2001 +From: Chunyu Hu +Date: Thu, 20 Jul 2017 18:36:09 +0800 +Subject: tracing: Fix kmemleak in instance_rmdir + +From: Chunyu Hu + +commit db9108e054700c96322b0f0028546aa4e643cf0b upstream. + +Hit the kmemleak when executing instance_rmdir, it forgot releasing +mem of tracing_cpumask. With this fix, the warn does not appear any +more. + +unreferenced object 0xffff93a8dfaa7c18 (size 8): + comm "mkdir", pid 1436, jiffies 4294763622 (age 9134.308s) + hex dump (first 8 bytes): + ff ff ff ff ff ff ff ff ........ + backtrace: + [] kmemleak_alloc+0x4a/0xa0 + [] __kmalloc_node+0xf1/0x280 + [] alloc_cpumask_var_node+0x23/0x30 + [] alloc_cpumask_var+0xe/0x10 + [] instance_mkdir+0x90/0x240 + [] tracefs_syscall_mkdir+0x40/0x70 + [] vfs_mkdir+0x109/0x1b0 + [] SyS_mkdir+0xd0/0x100 + [] do_syscall_64+0x67/0x150 + [] return_from_SYSCALL_64+0x0/0x6a + [] 0xffffffffffffffff + +Link: http://lkml.kernel.org/r/1500546969-12594-1-git-send-email-chuhu@redhat.com + +Fixes: ccfe9e42e451 ("tracing: Make tracing_cpumask available for all instances") +Signed-off-by: Chunyu Hu +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/trace.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/trace/trace.c ++++ b/kernel/trace/trace.c +@@ -6737,6 +6737,7 @@ static int instance_rmdir(const char *na + } + kfree(tr->topts); + ++ free_cpumask_var(tr->tracing_cpumask); + kfree(tr->name); + kfree(tr); +