From: Greg Kroah-Hartman Date: Sun, 6 Nov 2016 12:04:19 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.31~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a476afb7cdb84de81a5b0c8e7b6d963d11c8a40;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: h8300-fix-syscall-restarting.patch --- diff --git a/queue-4.4/h8300-fix-syscall-restarting.patch b/queue-4.4/h8300-fix-syscall-restarting.patch new file mode 100644 index 00000000000..a4b1be472b5 --- /dev/null +++ b/queue-4.4/h8300-fix-syscall-restarting.patch @@ -0,0 +1,65 @@ +From 21753583056d48a5fad964d6f272e28168426845 Mon Sep 17 00:00:00 2001 +From: Mark Rutland +Date: Thu, 27 Oct 2016 17:46:24 -0700 +Subject: h8300: fix syscall restarting + +From: Mark Rutland + +commit 21753583056d48a5fad964d6f272e28168426845 upstream. + +Back in commit f56141e3e2d9 ("all arches, signal: move restart_block to +struct task_struct"), all architectures and core code were changed to +use task_struct::restart_block. However, when h8300 support was +subsequently restored in v4.2, it was not updated to account for this, +and maintains thread_info::restart_block, which is not kept in sync. + +This patch drops the redundant restart_block from thread_info, and moves +h8300 to the common one in task_struct, ensuring that syscall restarting +always works as expected. + +Fixes: f56141e3e2d9 ("all arches, signal: move restart_block to struct task_struct") +Link: http://lkml.kernel.org/r/1476714934-11635-1-git-send-email-mark.rutland@arm.com +Signed-off-by: Mark Rutland +Cc: Andy Lutomirski +Cc: Yoshinori Sato +Cc: uclinux-h8-devel@lists.sourceforge.jp +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/h8300/include/asm/thread_info.h | 4 ---- + arch/h8300/kernel/signal.c | 2 +- + 2 files changed, 1 insertion(+), 5 deletions(-) + +--- a/arch/h8300/include/asm/thread_info.h ++++ b/arch/h8300/include/asm/thread_info.h +@@ -31,7 +31,6 @@ struct thread_info { + int cpu; /* cpu we're on */ + int preempt_count; /* 0 => preemptable, <0 => BUG */ + mm_segment_t addr_limit; +- struct restart_block restart_block; + }; + + /* +@@ -44,9 +43,6 @@ struct thread_info { + .cpu = 0, \ + .preempt_count = INIT_PREEMPT_COUNT, \ + .addr_limit = KERNEL_DS, \ +- .restart_block = { \ +- .fn = do_no_restart_syscall, \ +- }, \ + } + + #define init_thread_info (init_thread_union.thread_info) +--- a/arch/h8300/kernel/signal.c ++++ b/arch/h8300/kernel/signal.c +@@ -79,7 +79,7 @@ restore_sigcontext(struct sigcontext *us + unsigned int er0; + + /* Always make any pending restarted system calls return -EINTR */ +- current_thread_info()->restart_block.fn = do_no_restart_syscall; ++ current->restart_block.fn = do_no_restart_syscall; + + /* restore passed registers */ + #define COPY(r) do { err |= get_user(regs->r, &usc->sc_##r); } while (0) diff --git a/queue-4.4/i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch b/queue-4.4/i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch deleted file mode 100644 index 05e3ee27cb8..00000000000 --- a/queue-4.4/i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 399c168ab5ab5e12ed55b6c91d61c24eb84c9164 Mon Sep 17 00:00:00 2001 -From: David Wu -Date: Sat, 22 Oct 2016 16:43:42 +0800 -Subject: i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings - -From: David Wu - -commit 399c168ab5ab5e12ed55b6c91d61c24eb84c9164 upstream. - -We found a bug that i2c transfer sometimes failed on 3066a board with -stabel-4.8, the con register would be updated by uninitialized tuning -value, it made the i2c transfer failed. - -So give the tuning value to be zero during rk3x_i2c_v0_calc_timings. - -Signed-off-by: David Wu -Tested-by: Andy Yan -Reviewed-by: Douglas Anderson -Signed-off-by: Wolfram Sang -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/i2c/busses/i2c-rk3x.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/i2c/busses/i2c-rk3x.c -+++ b/drivers/i2c/busses/i2c-rk3x.c -@@ -600,6 +600,8 @@ static int rk3x_i2c_calc_divs(unsigned l - *div_low = *div_low - 1; - *div_high = *div_high - 1; - -+ /* Give the tuning value 0, that would not update con register */ -+ t_calc->tuning = 0; - /* Maximum divider supported by hw is 0xffff */ - if (*div_low > 0xffff) { - *div_low = 0xffff; diff --git a/queue-4.4/series b/queue-4.4/series index 58db32a6891..d3b964e377f 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,5 +1,5 @@ i2c-imx-defer-probe-if-bus-recovery-gpios-are-not-ready.patch -i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch i2c-xgene-avoid-dma_buffer-overrun.patch i2c-core-fix-null-pointer-dereference-under-race-condition.patch drm-dp-mst-clear-port-pdt-when-tearing-down-the-i2c-adapter.patch +h8300-fix-syscall-restarting.patch