linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.9 00/32] 4.9.113-stable review
@ 2018-07-16  7:36 Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 01/32] nvme: validate admin queue before unquiesce Greg Kroah-Hartman
                   ` (34 more replies)
  0 siblings, 35 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable

This is the start of the stable review cycle for the 4.9.113 release.
There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.113-rc1.gz
or in the git tree and branch at:
	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.9.113-rc1

Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    loop: remember whether sysfs_create_group() was done

Leon Romanovsky <leonro@mellanox.com>
    RDMA/ucm: Mark UCM interface as BROKEN

Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    PM / hibernate: Fix oops at snapshot_write()

Theodore Ts'o <tytso@mit.edu>
    loop: add recursion validation to LOOP_CHANGE_FD

Florian Westphal <fw@strlen.de>
    netfilter: x_tables: initialise match/target check parameter struct

Eric Dumazet <edumazet@google.com>
    netfilter: nf_queue: augment nfqa_cfg_policy

Oleg Nesterov <oleg@redhat.com>
    uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn()

Keith Busch <keith.busch@intel.com>
    nvme-pci: Remap CMB SQ entries on every controller reset

Steve Wise <swise@opengridcomputing.com>
    iw_cxgb4: correctly enforce the max reg_mr depth

Jon Hunter <jonathanh@nvidia.com>
    i2c: tegra: Fix NACK error handling

Paul Menzel <pmenzel@molgen.mpg.de>
    tools build: fix # escaping in .cmd files for future Make

Oscar Salvador <osalvador@suse.de>
    fs, elf: make sure to page align bss in load_elf_library

Chris Wilson <chris@chris-wilson.co.uk>
    ALSA: hda - Handle pm failure during hotplug

Linus Torvalds <torvalds@linux-foundation.org>
    Fix up non-directory creation in SGID directories

Tomasz Kramkowski <tk@the-tk.com>
    HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter

Dan Carpenter <dan.carpenter@oracle.com>
    xhci: xhci-mem: off by one in xhci_stream_id_to_ring()

Nico Sneck <snecknico@gmail.com>
    usb: quirks: add delay quirks for Corsair Strafe

Johan Hovold <johan@kernel.org>
    USB: serial: mos7840: fix status-register error handling

Jann Horn <jannh@google.com>
    USB: yurex: fix out-of-bounds uaccess in read handler

Johan Hovold <johan@kernel.org>
    USB: serial: keyspan_pda: fix modem-status error handling

Olli Salonen <olli.salonen@iki.fi>
    USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick

Dan Carpenter <dan.carpenter@oracle.com>
    USB: serial: ch341: fix type promotion bug in ch341_control_in()

Hans de Goede <hdegoede@redhat.com>
    ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS

Nadav Amit <namit@vmware.com>
    vmw_balloon: fix inflation with batching

Damien Le Moal <damien.lemoal@wdc.com>
    ata: Fix ZBC_OUT all bit handling

Damien Le Moal <damien.lemoal@wdc.com>
    ata: Fix ZBC_OUT command block check

Jann Horn <jannh@google.com>
    ibmasm: don't write out of bounds in read handler

x00270170 <xiaqing17@hisilicon.com>
    mmc: dw_mmc: fix card threshold control configuration

Paul Burton <paul.burton@mips.com>
    MIPS: Fix ioremap() RAM check

Paul Burton <paul.burton@mips.com>
    MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()

Paul Burton <paul.burton@mips.com>
    MIPS: Call dump_stack() from show_regs()

Scott Bauer <scott.bauer@intel.com>
    nvme: validate admin queue before unquiesce


-------------

Diffstat:

 Makefile                          |  4 +-
 arch/mips/kernel/process.c        | 43 ++++++++++++++-------
 arch/mips/kernel/traps.c          |  1 +
 arch/mips/mm/ioremap.c            | 37 ++++++++++++------
 arch/x86/kernel/uprobes.c         |  2 +-
 drivers/ata/ahci.c                | 59 +++++++++++++++++++++++++++++
 drivers/ata/libata-core.c         |  3 ++
 drivers/ata/libata-scsi.c         | 18 ++++++---
 drivers/block/loop.c              | 79 ++++++++++++++++++++++-----------------
 drivers/block/loop.h              |  1 +
 drivers/hid/hid-ids.h             |  3 ++
 drivers/hid/usbhid/hid-quirks.c   |  1 +
 drivers/i2c/busses/i2c-tegra.c    | 17 ++++-----
 drivers/infiniband/Kconfig        | 12 ++++++
 drivers/infiniband/core/Makefile  |  4 +-
 drivers/infiniband/hw/cxgb4/mem.c |  2 +-
 drivers/misc/ibmasm/ibmasmfs.c    | 27 ++-----------
 drivers/misc/vmw_balloon.c        |  4 +-
 drivers/mmc/host/dw_mmc.c         |  7 ++--
 drivers/nvme/host/core.c          |  3 +-
 drivers/nvme/host/pci.c           | 27 +++++++------
 drivers/usb/core/quirks.c         |  4 ++
 drivers/usb/host/xhci-mem.c       |  2 +-
 drivers/usb/misc/yurex.c          | 23 +++---------
 drivers/usb/serial/ch341.c        |  2 +-
 drivers/usb/serial/cp210x.c       |  1 +
 drivers/usb/serial/keyspan_pda.c  |  4 +-
 drivers/usb/serial/mos7840.c      |  3 ++
 fs/binfmt_elf.c                   |  5 +--
 fs/inode.c                        |  6 +++
 include/linux/libata.h            |  1 +
 kernel/power/user.c               |  5 +++
 net/bridge/netfilter/ebtables.c   |  2 +
 net/ipv4/netfilter/ip_tables.c    |  1 +
 net/ipv6/netfilter/ip6_tables.c   |  1 +
 net/netfilter/nfnetlink_queue.c   |  3 ++
 sound/pci/hda/patch_hdmi.c        | 19 +++++++---
 tools/build/Build.include         |  4 +-
 38 files changed, 287 insertions(+), 153 deletions(-)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 01/32] nvme: validate admin queue before unquiesce
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 02/32] MIPS: Call dump_stack() from show_regs() Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Scott Bauer, Christoph Hellwig,
	Simon Veith, David Woodhouse, Amit Shah

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Scott Bauer <scott.bauer@intel.com>

commit 7dd1ab163c17e11473a65b11f7e748db30618ebb upstream.

With a misbehaving controller it's possible we'll never
enter the live state and create an admin queue. When we
fail out of reset work it's possible we failed out early
enough without setting up the admin queue. We tear down
queues after a failed reset, but needed to do some more
sanitization.

Fixes 443bd90f2cca: "nvme: host: unquiesce queue in nvme_kill_queues()"

[  189.650995] nvme nvme1: pci function 0000:0b:00.0
[  317.680055] nvme nvme0: Device not ready; aborting reset
[  317.680183] nvme nvme0: Removing after probe failure status: -19
[  317.681258] kasan: GPF could be caused by NULL-ptr deref or user memory access
[  317.681397] general protection fault: 0000 [#1] SMP KASAN
[  317.682984] CPU: 3 PID: 477 Comm: kworker/3:2 Not tainted 4.13.0-rc1+ #5
[  317.683112] Hardware name: Gigabyte Technology Co., Ltd. Z170X-UD5/Z170X-UD5-CF, BIOS F5 03/07/2016
[  317.683284] Workqueue: events nvme_remove_dead_ctrl_work [nvme]
[  317.683398] task: ffff8803b0990000 task.stack: ffff8803c2ef0000
[  317.683516] RIP: 0010:blk_mq_unquiesce_queue+0x2b/0xa0
[  317.683614] RSP: 0018:ffff8803c2ef7d40 EFLAGS: 00010282
[  317.683716] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1006fbdcde3
[  317.683847] RDX: 0000000000000038 RSI: 1ffff1006f5a9245 RDI: 0000000000000000
[  317.683978] RBP: ffff8803c2ef7d58 R08: 1ffff1007bcdc974 R09: 0000000000000000
[  317.684108] R10: 1ffff1007bcdc975 R11: 0000000000000000 R12: 00000000000001c0
[  317.684239] R13: ffff88037ad49228 R14: ffff88037ad492d0 R15: ffff88037ad492e0
[  317.684371] FS:  0000000000000000(0000) GS:ffff8803de6c0000(0000) knlGS:0000000000000000
[  317.684519] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  317.684627] CR2: 0000002d1860c000 CR3: 000000045b40d000 CR4: 00000000003406e0
[  317.684758] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  317.684888] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  317.685018] Call Trace:
[  317.685084]  nvme_kill_queues+0x4d/0x170 [nvme_core]
[  317.685185]  nvme_remove_dead_ctrl_work+0x3a/0x90 [nvme]
[  317.685289]  process_one_work+0x771/0x1170
[  317.685372]  worker_thread+0xde/0x11e0
[  317.685452]  ? pci_mmcfg_check_reserved+0x110/0x110
[  317.685550]  kthread+0x2d3/0x3d0
[  317.685617]  ? process_one_work+0x1170/0x1170
[  317.685704]  ? kthread_create_on_node+0xc0/0xc0
[  317.685785]  ret_from_fork+0x25/0x30
[  317.685798] Code: 0f 1f 44 00 00 55 48 b8 00 00 00 00 00 fc ff df 48 89 e5 41 54 4c 8d a7 c0 01 00 00 53 48 89 fb 4c 89 e2 48 c1 ea 03 48 83 ec 08 <80> 3c 02 00 75 50 48 8b bb c0 01 00 00 e8 33 8a f9 00 0f ba b3
[  317.685872] RIP: blk_mq_unquiesce_queue+0x2b/0xa0 RSP: ffff8803c2ef7d40
[  317.685908] ---[ end trace a3f8704150b1e8b4 ]---

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
[ adapted for 4.9: added check around blk_mq_start_hw_queues() call
  instead of upstream blk_mq_unquiesce_queue() ]
Fixes: 4aae4388165a2611fa42 ("nvme: fix hang in remove path")
Signed-off-by: Simon Veith <sveith@amazon.de>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Amit Shah <aams@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/nvme/host/core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2042,7 +2042,8 @@ void nvme_kill_queues(struct nvme_ctrl *
 	mutex_lock(&ctrl->namespaces_mutex);
 
 	/* Forcibly start all queues to avoid having stuck requests */
-	blk_mq_start_hw_queues(ctrl->admin_q);
+	if (ctrl->admin_q)
+		blk_mq_start_hw_queues(ctrl->admin_q);
 
 	list_for_each_entry(ns, &ctrl->namespaces, list) {
 		/*



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 02/32] MIPS: Call dump_stack() from show_regs()
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 01/32] nvme: validate admin queue before unquiesce Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace() Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Burton, James Hogan,
	Ralf Baechle, Huacai Chen, linux-mips

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paul Burton <paul.burton@mips.com>

commit 5a267832c2ec47b2dad0fdb291a96bb5b8869315 upstream.

The generic nmi_cpu_backtrace() function calls show_regs() when a struct
pt_regs is available, and dump_stack() otherwise. If we were to make use
of the generic nmi_cpu_backtrace() with MIPS' current implementation of
show_regs() this would mean that we see only register data with no
accompanying stack information, in contrast with our current
implementation which calls dump_stack() regardless of whether register
state is available.

In preparation for making use of the generic nmi_cpu_backtrace() to
implement arch_trigger_cpumask_backtrace(), have our implementation of
show_regs() call dump_stack() and drop the explicit dump_stack() call in
arch_dump_stack() which is invoked by arch_trigger_cpumask_backtrace().

This will allow the output we produce to remain the same after a later
patch switches to using nmi_cpu_backtrace(). It may mean that we produce
extra stack output in other uses of show_regs(), but this:

  1) Seems harmless.
  2) Is good for consistency between arch_trigger_cpumask_backtrace()
     and other users of show_regs().
  3) Matches the behaviour of the ARM & PowerPC architectures.

Marked for stable back to v4.9 as a prerequisite of the following patch
"MIPS: Call dump_stack() from show_regs()".

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/19596/
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/process.c |    4 ++--
 arch/mips/kernel/traps.c   |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -641,8 +641,8 @@ static void arch_dump_stack(void *info)
 
 	if (regs)
 		show_regs(regs);
-
-	dump_stack();
+	else
+		dump_stack();
 }
 
 void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -351,6 +351,7 @@ static void __show_regs(const struct pt_
 void show_regs(struct pt_regs *regs)
 {
 	__show_regs((struct pt_regs *)regs);
+	dump_stack();
 }
 
 void show_registers(struct pt_regs *regs)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 01/32] nvme: validate admin queue before unquiesce Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 02/32] MIPS: Call dump_stack() from show_regs() Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  9:29   ` 陈华才
  2018-07-16  7:36 ` [PATCH 4.9 04/32] MIPS: Fix ioremap() RAM check Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  34 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Burton, James Hogan,
	Ralf Baechle, Huacai Chen, linux-mips

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paul Burton <paul.burton@mips.com>

commit b63e132b6433a41cf311e8bc382d33fd2b73b505 upstream.

The current MIPS implementation of arch_trigger_cpumask_backtrace() is
broken because it attempts to use synchronous IPIs despite the fact that
it may be run with interrupts disabled.

This means that when arch_trigger_cpumask_backtrace() is invoked, for
example by the RCU CPU stall watchdog, we may:

  - Deadlock due to use of synchronous IPIs with interrupts disabled,
    causing the CPU that's attempting to generate the backtrace output
    to hang itself.

  - Not succeed in generating the desired output from remote CPUs.

  - Produce warnings about this from smp_call_function_many(), for
    example:

    [42760.526910] INFO: rcu_sched detected stalls on CPUs/tasks:
    [42760.535755]  0-...!: (1 GPs behind) idle=ade/140000000000000/0 softirq=526944/526945 fqs=0
    [42760.547874]  1-...!: (0 ticks this GP) idle=e4a/140000000000000/0 softirq=547885/547885 fqs=0
    [42760.559869]  (detected by 2, t=2162 jiffies, g=266689, c=266688, q=33)
    [42760.568927] ------------[ cut here ]------------
    [42760.576146] WARNING: CPU: 2 PID: 1216 at kernel/smp.c:416 smp_call_function_many+0x88/0x20c
    [42760.587839] Modules linked in:
    [42760.593152] CPU: 2 PID: 1216 Comm: sh Not tainted 4.15.4-00373-gee058bb4d0c2 #2
    [42760.603767] Stack : 8e09bd20 8e09bd20 8e09bd20 fffffff0 00000007 00000006 00000000 8e09bca8
    [42760.616937]         95b2b379 95b2b379 807a0080 00000007 81944518 0000018a 00000032 00000000
    [42760.630095]         00000000 00000030 80000000 00000000 806eca74 00000009 8017e2b8 000001a0
    [42760.643169]         00000000 00000002 00000000 8e09baa4 00000008 808b8008 86d69080 8e09bca0
    [42760.656282]         8e09ad50 805e20aa 00000000 00000000 00000000 8017e2b8 00000009 801070ca
    [42760.669424]         ...
    [42760.673919] Call Trace:
    [42760.678672] [<27fde568>] show_stack+0x70/0xf0
    [42760.685417] [<84751641>] dump_stack+0xaa/0xd0
    [42760.692188] [<699d671c>] __warn+0x80/0x92
    [42760.698549] [<68915d41>] warn_slowpath_null+0x28/0x36
    [42760.705912] [<f7c76c1c>] smp_call_function_many+0x88/0x20c
    [42760.713696] [<6bbdfc2a>] arch_trigger_cpumask_backtrace+0x30/0x4a
    [42760.722216] [<f845bd33>] rcu_dump_cpu_stacks+0x6a/0x98
    [42760.729580] [<796e7629>] rcu_check_callbacks+0x672/0x6ac
    [42760.737476] [<059b3b43>] update_process_times+0x18/0x34
    [42760.744981] [<6eb94941>] tick_sched_handle.isra.5+0x26/0x38
    [42760.752793] [<478d3d70>] tick_sched_timer+0x1c/0x50
    [42760.759882] [<e56ea39f>] __hrtimer_run_queues+0xc6/0x226
    [42760.767418] [<e88bbcae>] hrtimer_interrupt+0x88/0x19a
    [42760.775031] [<6765a19e>] gic_compare_interrupt+0x2e/0x3a
    [42760.782761] [<0558bf5f>] handle_percpu_devid_irq+0x78/0x168
    [42760.790795] [<90c11ba2>] generic_handle_irq+0x1e/0x2c
    [42760.798117] [<1b6d462c>] gic_handle_local_int+0x38/0x86
    [42760.805545] [<b2ada1c7>] gic_irq_dispatch+0xa/0x14
    [42760.812534] [<90c11ba2>] generic_handle_irq+0x1e/0x2c
    [42760.820086] [<c7521934>] do_IRQ+0x16/0x20
    [42760.826274] [<9aef3ce6>] plat_irq_dispatch+0x62/0x94
    [42760.833458] [<6a94b53c>] except_vec_vi_end+0x70/0x78
    [42760.840655] [<22284043>] smp_call_function_many+0x1ba/0x20c
    [42760.848501] [<54022b58>] smp_call_function+0x1e/0x2c
    [42760.855693] [<ab9fc705>] flush_tlb_mm+0x2a/0x98
    [42760.862730] [<0844cdd0>] tlb_flush_mmu+0x1c/0x44
    [42760.869628] [<cb259b74>] arch_tlb_finish_mmu+0x26/0x3e
    [42760.877021] [<1aeaaf74>] tlb_finish_mmu+0x18/0x66
    [42760.883907] [<b3fce717>] exit_mmap+0x76/0xea
    [42760.890428] [<c4c8a2f6>] mmput+0x80/0x11a
    [42760.896632] [<a41a08f4>] do_exit+0x1f4/0x80c
    [42760.903158] [<ee01cef6>] do_group_exit+0x20/0x7e
    [42760.909990] [<13fa8d54>] __wake_up_parent+0x0/0x1e
    [42760.917045] [<46cf89d0>] smp_call_function_many+0x1a2/0x20c
    [42760.924893] [<8c21a93b>] syscall_common+0x14/0x1c
    [42760.931765] ---[ end trace 02aa09da9dc52a60 ]---
    [42760.938342] ------------[ cut here ]------------
    [42760.945311] WARNING: CPU: 2 PID: 1216 at kernel/smp.c:291 smp_call_function_single+0xee/0xf8
    ...

This patch switches MIPS' arch_trigger_cpumask_backtrace() to use async
IPIs & smp_call_function_single_async() in order to resolve this
problem. We ensure use of the pre-allocated call_single_data_t
structures is serialized by maintaining a cpumask indicating that
they're busy, and refusing to attempt to send an IPI when a CPU's bit is
set in this mask. This should only happen if a CPU hasn't responded to a
previous backtrace IPI - ie. if it's hung - and we print a warning to
the console in this case.

I've marked this for stable branches as far back as v4.9, to which it
applies cleanly. Strictly speaking the faulty MIPS implementation can be
traced further back to commit 856839b76836 ("MIPS: Add
arch_trigger_all_cpu_backtrace() function") in v3.19, but kernel
versions v3.19 through v4.8 will require further work to backport due to
the rework performed in commit 9a01c3ed5cdb ("nmi_backtrace: add more
trigger_*_cpu_backtrace() methods").

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/19597/
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.9+
Fixes: 856839b76836 ("MIPS: Add arch_trigger_all_cpu_backtrace() function")
Fixes: 9a01c3ed5cdb ("nmi_backtrace: add more trigger_*_cpu_backtrace() methods")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/process.c |   45 ++++++++++++++++++++++++++++++---------------
 1 file changed, 30 insertions(+), 15 deletions(-)

--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -26,6 +26,7 @@
 #include <linux/kallsyms.h>
 #include <linux/random.h>
 #include <linux/prctl.h>
+#include <linux/nmi.h>
 
 #include <asm/asm.h>
 #include <asm/bootinfo.h>
@@ -633,28 +634,42 @@ unsigned long arch_align_stack(unsigned
 	return sp & ALMASK;
 }
 
-static void arch_dump_stack(void *info)
-{
-	struct pt_regs *regs;
+static DEFINE_PER_CPU(call_single_data_t, backtrace_csd);
+static struct cpumask backtrace_csd_busy;
 
-	regs = get_irq_regs();
-
-	if (regs)
-		show_regs(regs);
-	else
-		dump_stack();
+static void handle_backtrace(void *info)
+{
+	nmi_cpu_backtrace(get_irq_regs());
+	cpumask_clear_cpu(smp_processor_id(), &backtrace_csd_busy);
 }
 
-void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
+static void raise_backtrace(cpumask_t *mask)
 {
-	long this_cpu = get_cpu();
+	call_single_data_t *csd;
+	int cpu;
 
-	if (cpumask_test_cpu(this_cpu, mask) && !exclude_self)
-		dump_stack();
+	for_each_cpu(cpu, mask) {
+		/*
+		 * If we previously sent an IPI to the target CPU & it hasn't
+		 * cleared its bit in the busy cpumask then it didn't handle
+		 * our previous IPI & it's not safe for us to reuse the
+		 * call_single_data_t.
+		 */
+		if (cpumask_test_and_set_cpu(cpu, &backtrace_csd_busy)) {
+			pr_warn("Unable to send backtrace IPI to CPU%u - perhaps it hung?\n",
+				cpu);
+			continue;
+		}
 
-	smp_call_function_many(mask, arch_dump_stack, NULL, 1);
+		csd = &per_cpu(backtrace_csd, cpu);
+		csd->func = handle_backtrace;
+		smp_call_function_single_async(cpu, csd);
+	}
+}
 
-	put_cpu();
+void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
+{
+	nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace);
 }
 
 int mips_get_process_fp_mode(struct task_struct *task)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 04/32] MIPS: Fix ioremap() RAM check
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace() Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 05/32] mmc: dw_mmc: fix card threshold control configuration Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Burton, Serge Semin,
	James Hogan, Ralf Baechle, linux-mips

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paul Burton <paul.burton@mips.com>

commit 523402fa9101090c91d2033b7ebdfdcf65880488 upstream.

We currently attempt to check whether a physical address range provided
to __ioremap() may be in use by the page allocator by examining the
value of PageReserved for each page in the region - lowmem pages not
marked reserved are presumed to be in use by the page allocator, and
requests to ioremap them fail.

The way we check this has been broken since commit 92923ca3aace ("mm:
meminit: only set page reserved in the memblock region"), because
memblock will typically not have any knowledge of non-RAM pages and
therefore those pages will not have the PageReserved flag set. Thus when
we attempt to ioremap a region outside of RAM we incorrectly fail
believing that the region is RAM that may be in use.

In most cases ioremap() on MIPS will take a fast-path to use the
unmapped kseg1 or xkphys virtual address spaces and never hit this path,
so the only way to hit it is for a MIPS32 system to attempt to ioremap()
an address range in lowmem with flags other than _CACHE_UNCACHED.
Perhaps the most straightforward way to do this is using
ioremap_uncached_accelerated(), which is how the problem was discovered.

Fix this by making use of walk_system_ram_range() to test the address
range provided to __ioremap() against only RAM pages, rather than all
lowmem pages. This means that if we have a lowmem I/O region, which is
very common for MIPS systems, we're free to ioremap() address ranges
within it. A nice bonus is that the test is no longer limited to lowmem.

The approach here matches the way x86 performed the same test after
commit c81c8a1eeede ("x86, ioremap: Speed up check for RAM pages") until
x86 moved towards a slightly more complicated check using walk_mem_res()
for unrelated reasons with commit 0e4c12b45aa8 ("x86/mm, resource: Use
PAGE_KERNEL protection for ioremap of memory pages").

Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Fixes: 92923ca3aace ("mm: meminit: only set page reserved in the memblock region")
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.2+
Patchwork: https://patchwork.linux-mips.org/patch/19786/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/mm/ioremap.c |   37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -9,6 +9,7 @@
 #include <linux/export.h>
 #include <asm/addrspace.h>
 #include <asm/byteorder.h>
+#include <linux/ioport.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
@@ -97,6 +98,20 @@ static int remap_area_pages(unsigned lon
 	return error;
 }
 
+static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
+			       void *arg)
+{
+	unsigned long i;
+
+	for (i = 0; i < nr_pages; i++) {
+		if (pfn_valid(start_pfn + i) &&
+		    !PageReserved(pfn_to_page(start_pfn + i)))
+			return 1;
+	}
+
+	return 0;
+}
+
 /*
  * Generic mapping function (not visible outside):
  */
@@ -115,8 +130,8 @@ static int remap_area_pages(unsigned lon
 
 void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned long flags)
 {
+	unsigned long offset, pfn, last_pfn;
 	struct vm_struct * area;
-	unsigned long offset;
 	phys_addr_t last_addr;
 	void * addr;
 
@@ -136,18 +151,16 @@ void __iomem * __ioremap(phys_addr_t phy
 		return (void __iomem *) CKSEG1ADDR(phys_addr);
 
 	/*
-	 * Don't allow anybody to remap normal RAM that we're using..
+	 * Don't allow anybody to remap RAM that may be allocated by the page
+	 * allocator, since that could lead to races & data clobbering.
 	 */
-	if (phys_addr < virt_to_phys(high_memory)) {
-		char *t_addr, *t_end;
-		struct page *page;
-
-		t_addr = __va(phys_addr);
-		t_end = t_addr + (size - 1);
-
-		for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
-			if(!PageReserved(page))
-				return NULL;
+	pfn = PFN_DOWN(phys_addr);
+	last_pfn = PFN_DOWN(last_addr);
+	if (walk_system_ram_range(pfn, last_pfn - pfn + 1, NULL,
+				  __ioremap_check_ram) == 1) {
+		WARN_ONCE(1, "ioremap on RAM at %pa - %pa\n",
+			  &phys_addr, &last_addr);
+		return NULL;
 	}
 
 	/*



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 05/32] mmc: dw_mmc: fix card threshold control configuration
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 04/32] MIPS: Fix ioremap() RAM check Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 06/32] ibmasm: dont write out of bounds in read handler Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Qing Xia, Ulf Hansson

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: x00270170 <xiaqing17@hisilicon.com>

commit 7a6b9f4d601dfce8cb68f0dcfd834270280e31e6 upstream.

Card write threshold control is supposed to be set since controller
version 2.80a for data write in HS400 mode and data read in
HS200/HS400/SDR104 mode. However the current code returns without
configuring it in the case of data writing in HS400 mode.
Meanwhile the patch fixes that the current code goes to
'disable' when doing data reading in HS400 mode.

Fixes: 7e4bf1bc9543 ("mmc: dw_mmc: add the card write threshold for HS400 mode")
Signed-off-by: Qing Xia <xiaqing17@hisilicon.com>
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mmc/host/dw_mmc.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -981,8 +981,8 @@ static void dw_mci_ctrl_thld(struct dw_m
 	 * It's used when HS400 mode is enabled.
 	 */
 	if (data->flags & MMC_DATA_WRITE &&
-		!(host->timing != MMC_TIMING_MMC_HS400))
-		return;
+		host->timing != MMC_TIMING_MMC_HS400)
+		goto disable;
 
 	if (data->flags & MMC_DATA_WRITE)
 		enable = SDMMC_CARD_WR_THR_EN;
@@ -990,7 +990,8 @@ static void dw_mci_ctrl_thld(struct dw_m
 		enable = SDMMC_CARD_RD_THR_EN;
 
 	if (host->timing != MMC_TIMING_MMC_HS200 &&
-	    host->timing != MMC_TIMING_UHS_SDR104)
+	    host->timing != MMC_TIMING_UHS_SDR104 &&
+	    host->timing != MMC_TIMING_MMC_HS400)
 		goto disable;
 
 	blksz_depth = blksz / (1 << host->data_shift);



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 06/32] ibmasm: dont write out of bounds in read handler
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 05/32] mmc: dw_mmc: fix card threshold control configuration Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 07/32] ata: Fix ZBC_OUT command block check Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jann Horn

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jann Horn <jannh@google.com>

commit a0341fc1981a950c1e902ab901e98f60e0e243f3 upstream.

This read handler had a lot of custom logic and wrote outside the bounds of
the provided buffer. This could lead to kernel and userspace memory
corruption. Just use simple_read_from_buffer() with a stack buffer.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/ibmasm/ibmasmfs.c |   27 +++------------------------
 1 file changed, 3 insertions(+), 24 deletions(-)

--- a/drivers/misc/ibmasm/ibmasmfs.c
+++ b/drivers/misc/ibmasm/ibmasmfs.c
@@ -507,35 +507,14 @@ static int remote_settings_file_close(st
 static ssize_t remote_settings_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	void __iomem *address = (void __iomem *)file->private_data;
-	unsigned char *page;
-	int retval;
 	int len = 0;
 	unsigned int value;
-
-	if (*offset < 0)
-		return -EINVAL;
-	if (count == 0 || count > 1024)
-		return 0;
-	if (*offset != 0)
-		return 0;
-
-	page = (unsigned char *)__get_free_page(GFP_KERNEL);
-	if (!page)
-		return -ENOMEM;
+	char lbuf[20];
 
 	value = readl(address);
-	len = sprintf(page, "%d\n", value);
-
-	if (copy_to_user(buf, page, len)) {
-		retval = -EFAULT;
-		goto exit;
-	}
-	*offset += len;
-	retval = len;
+	len = snprintf(lbuf, sizeof(lbuf), "%d\n", value);
 
-exit:
-	free_page((unsigned long)page);
-	return retval;
+	return simple_read_from_buffer(buf, count, offset, lbuf, len);
 }
 
 static ssize_t remote_settings_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t *offset)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 07/32] ata: Fix ZBC_OUT command block check
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 06/32] ibmasm: dont write out of bounds in read handler Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 08/32] ata: Fix ZBC_OUT all bit handling Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Butterfield, Damien Le Moal, Tejun Heo

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Damien Le Moal <damien.lemoal@wdc.com>

commit b320a0a9f23c98f21631eb27bcbbca91c79b1c6e upstream.

The block (LBA) specified must not exceed the last addressable LBA,
which is dev->nr_sectors - 1. So fix the correct check is
"if (block >= dev->n_sectors)" and not "if (block > dev->n_sectords)".

Additionally, the asc/ascq to return for an LBA that is not a zone start
LBA should be ILLEGAL REQUEST, regardless if the bad LBA is out of
range.

Reported-by: David Butterfield <david.butterfield@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-scsi.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3772,8 +3772,13 @@ static unsigned int ata_scsi_zbc_out_xla
 		 */
 		goto invalid_param_len;
 	}
-	if (block > dev->n_sectors)
-		goto out_of_range;
+	if (block >= dev->n_sectors) {
+		/*
+		 * Block must be a valid zone ID (a zone start LBA).
+		 */
+		fp = 2;
+		goto invalid_fld;
+	}
 
 	all = cdb[14] & 0x1;
 
@@ -3804,10 +3809,6 @@ static unsigned int ata_scsi_zbc_out_xla
  invalid_fld:
 	ata_scsi_set_invalid_field(qc->dev, scmd, fp, 0xff);
 	return 1;
- out_of_range:
-	/* "Logical Block Address out of range" */
-	ata_scsi_set_sense(qc->dev, scmd, ILLEGAL_REQUEST, 0x21, 0x00);
-	return 1;
 invalid_param_len:
 	/* "Parameter list length error" */
 	ata_scsi_set_sense(qc->dev, scmd, ILLEGAL_REQUEST, 0x1a, 0x0);



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 08/32] ata: Fix ZBC_OUT all bit handling
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 07/32] ata: Fix ZBC_OUT command block check Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 09/32] vmw_balloon: fix inflation with batching Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Butterfield, Damien Le Moal, Tejun Heo

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Damien Le Moal <damien.lemoal@wdc.com>

commit 6edf1d4cb0acde3a0a5dac849f33031bd7abb7b1 upstream.

If the ALL bit is set in the ZBC_OUT command, the command zone ID field
(block) should be ignored.

Reported-by: David Butterfield <david.butterfield@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-scsi.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3772,7 +3772,14 @@ static unsigned int ata_scsi_zbc_out_xla
 		 */
 		goto invalid_param_len;
 	}
-	if (block >= dev->n_sectors) {
+
+	all = cdb[14] & 0x1;
+	if (all) {
+		/*
+		 * Ignore the block address (zone ID) as defined by ZBC.
+		 */
+		block = 0;
+	} else if (block >= dev->n_sectors) {
 		/*
 		 * Block must be a valid zone ID (a zone start LBA).
 		 */
@@ -3780,8 +3787,6 @@ static unsigned int ata_scsi_zbc_out_xla
 		goto invalid_fld;
 	}
 
-	all = cdb[14] & 0x1;
-
 	if (ata_ncq_enabled(qc->dev) &&
 	    ata_fpdma_zac_mgmt_out_supported(qc->dev)) {
 		tf->protocol = ATA_PROT_NCQ_NODATA;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 09/32] vmw_balloon: fix inflation with batching
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 08/32] ata: Fix ZBC_OUT all bit handling Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 10/32] ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Xavier Deguillard, Nadav Amit

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nadav Amit <namit@vmware.com>

commit 90d72ce079791399ac255c75728f3c9e747b093d upstream.

Embarrassingly, the recent fix introduced worse problem than it solved,
causing the balloon not to inflate. The VM informed the hypervisor that
the pages for lock/unlock are sitting in the wrong address, as it used
the page that is used the uninitialized page variable.

Fixes: b23220fe054e9 ("vmw_balloon: fixing double free when batching mode is off")
Cc: stable@vger.kernel.org
Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/vmw_balloon.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -467,7 +467,7 @@ static int vmballoon_send_batched_lock(s
 		unsigned int num_pages, bool is_2m_pages, unsigned int *target)
 {
 	unsigned long status;
-	unsigned long pfn = page_to_pfn(b->page);
+	unsigned long pfn = PHYS_PFN(virt_to_phys(b->batch_page));
 
 	STATS_INC(b->stats.lock[is_2m_pages]);
 
@@ -515,7 +515,7 @@ static bool vmballoon_send_batched_unloc
 		unsigned int num_pages, bool is_2m_pages, unsigned int *target)
 {
 	unsigned long status;
-	unsigned long pfn = page_to_pfn(b->page);
+	unsigned long pfn = PHYS_PFN(virt_to_phys(b->batch_page));
 
 	STATS_INC(b->stats.unlock[is_2m_pages]);
 



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 10/32] ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 09/32] vmw_balloon: fix inflation with batching Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 11/32] USB: serial: ch341: fix type promotion bug in ch341_control_in() Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede, Tejun Heo

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hans de Goede <hdegoede@redhat.com>

commit 240630e61870e62e39a97225048f9945848fa5f5 upstream.

There have been several reports of LPM related hard freezes about once
a day on multiple Lenovo 50 series models. Strange enough these reports
where not disk model specific as LPM issues usually are and some users
with the exact same disk + laptop where seeing them while other users
where not seeing these issues.

It turns out that enabling LPM triggers a firmware bug somewhere, which
has been fixed in later BIOS versions.

This commit adds a new ahci_broken_lpm() function and a new ATA_FLAG_NO_LPM
for dealing with this.

The ahci_broken_lpm() function contains DMI match info for the 4 models
which are known to be affected by this and the DMI BIOS date field for
known good BIOS versions. If the BIOS date is older then the one in the
table LPM will be disabled and a warning will be printed.

Note the BIOS dates are for known good versions, some older versions may
work too, but we don't know for sure, the table is using dates from BIOS
versions for which users have confirmed that upgrading to that version
makes the problem go away.

Unfortunately I've been unable to get hold of the reporter who reported
that BIOS version 2.35 fixed the problems on the W541 for him. I've been
able to verify the DMI_SYS_VENDOR and DMI_PRODUCT_VERSION from an older
dmidecode, but I don't know the exact BIOS date as reported in the DMI.
Lenovo keeps a changelog with dates in their release notes, but the
dates there are the release dates not the build dates which are in DMI.
So I've chosen to set the date to which we compare to one day past the
release date of the 2.34 BIOS. I plan to fix this with a follow up
commit once I've the necessary info.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/ahci.c        |   59 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/ata/libata-core.c |    3 ++
 include/linux/libata.h    |    1 
 3 files changed, 63 insertions(+)

--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1260,6 +1260,59 @@ static bool ahci_broken_suspend(struct p
 	return strcmp(buf, dmi->driver_data) < 0;
 }
 
+static bool ahci_broken_lpm(struct pci_dev *pdev)
+{
+	static const struct dmi_system_id sysids[] = {
+		/* Various Lenovo 50 series have LPM issues with older BIOSen */
+		{
+			.matches = {
+				DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+				DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X250"),
+			},
+			.driver_data = "20180406", /* 1.31 */
+		},
+		{
+			.matches = {
+				DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+				DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L450"),
+			},
+			.driver_data = "20180420", /* 1.28 */
+		},
+		{
+			.matches = {
+				DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+				DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T450s"),
+			},
+			.driver_data = "20180315", /* 1.33 */
+		},
+		{
+			.matches = {
+				DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+				DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W541"),
+			},
+			/*
+			 * Note date based on release notes, 2.35 has been
+			 * reported to be good, but I've been unable to get
+			 * a hold of the reporter to get the DMI BIOS date.
+			 * TODO: fix this.
+			 */
+			.driver_data = "20180310", /* 2.35 */
+		},
+		{ }	/* terminate list */
+	};
+	const struct dmi_system_id *dmi = dmi_first_match(sysids);
+	int year, month, date;
+	char buf[9];
+
+	if (!dmi)
+		return false;
+
+	dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
+	snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
+
+	return strcmp(buf, dmi->driver_data) < 0;
+}
+
 static bool ahci_broken_online(struct pci_dev *pdev)
 {
 #define ENCODE_BUSDEVFN(bus, slot, func)			\
@@ -1626,6 +1679,12 @@ static int ahci_init_one(struct pci_dev
 			"quirky BIOS, skipping spindown on poweroff\n");
 	}
 
+	if (ahci_broken_lpm(pdev)) {
+		pi.flags |= ATA_FLAG_NO_LPM;
+		dev_warn(&pdev->dev,
+			 "BIOS update required for Link Power Management support\n");
+	}
+
 	if (ahci_broken_suspend(pdev)) {
 		hpriv->flags |= AHCI_HFLAG_NO_SUSPEND;
 		dev_warn(&pdev->dev,
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2385,6 +2385,9 @@ int ata_dev_configure(struct ata_device
 	    (id[ATA_ID_SATA_CAPABILITY] & 0xe) == 0x2)
 		dev->horkage |= ATA_HORKAGE_NOLPM;
 
+	if (ap->flags & ATA_FLAG_NO_LPM)
+		dev->horkage |= ATA_HORKAGE_NOLPM;
+
 	if (dev->horkage & ATA_HORKAGE_NOLPM) {
 		ata_dev_warn(dev, "LPM support broken, forcing max_power\n");
 		dev->link->ap->target_lpm_policy = ATA_LPM_MAX_POWER;
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -208,6 +208,7 @@ enum {
 	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
 					    /* (doesn't imply presence) */
 	ATA_FLAG_SATA		= (1 << 1),
+	ATA_FLAG_NO_LPM		= (1 << 2), /* host not happy with LPM */
 	ATA_FLAG_NO_LOG_PAGE	= (1 << 5), /* do not issue log page read */
 	ATA_FLAG_NO_ATAPI	= (1 << 6), /* No ATAPI support */
 	ATA_FLAG_PIO_DMA	= (1 << 7), /* PIO cmds via DMA */



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 11/32] USB: serial: ch341: fix type promotion bug in ch341_control_in()
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 10/32] ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 12/32] USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Johan Hovold

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit e33eab9ded328ccc14308afa51b5be7cbe78d30b upstream.

The "r" variable is an int and "bufsize" is an unsigned int so the
comparison is type promoted to unsigned.  If usb_control_msg() returns a
negative that is treated as a high positive value and the error handling
doesn't work.

Fixes: 2d5a9c72d0c4 ("USB: serial: ch341: fix control-message error handling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/ch341.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -118,7 +118,7 @@ static int ch341_control_in(struct usb_d
 	r = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), request,
 			    USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
 			    value, index, buf, bufsize, DEFAULT_TIMEOUT);
-	if (r < bufsize) {
+	if (r < (int)bufsize) {
 		if (r >= 0) {
 			dev_err(&dev->dev,
 				"short control message received (%d < %u)\n",



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 12/32] USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 11/32] USB: serial: ch341: fix type promotion bug in ch341_control_in() Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 13/32] USB: serial: keyspan_pda: fix modem-status error handling Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Olli Salonen, Johan Hovold

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Olli Salonen <olli.salonen@iki.fi>

commit 367b160fe4717c14a2a978b6f9ffb75a7762d3ed upstream.

There are two versions of the Qivicon Zigbee stick in circulation. This
adds the second USB ID to the cp210x driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -146,6 +146,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0x8977) },	/* CEL MeshWorks DevKit Device */
 	{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
 	{ USB_DEVICE(0x10C4, 0x89A4) }, /* CESINEL FTBC Flexible Thyristor Bridge Controller */
+	{ USB_DEVICE(0x10C4, 0x89FB) }, /* Qivicon ZigBee USB Radio Stick */
 	{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
 	{ USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */
 	{ USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 13/32] USB: serial: keyspan_pda: fix modem-status error handling
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 12/32] USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 14/32] USB: yurex: fix out-of-bounds uaccess in read handler Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@kernel.org>

commit 01b3cdfca263a17554f7b249d20a247b2a751521 upstream.

Fix broken modem-status error handling which could lead to bits of slab
data leaking to user space.

Fixes: 3b36a8fd6777 ("usb: fix uninitialized variable warning in keyspan_pda")
Cc: stable <stable@vger.kernel.org>     # 2.6.27
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/keyspan_pda.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -373,8 +373,10 @@ static int keyspan_pda_get_modem_info(st
 			     3, /* get pins */
 			     USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_IN,
 			     0, 0, data, 1, 2000);
-	if (rc >= 0)
+	if (rc == 1)
 		*value = *data;
+	else if (rc >= 0)
+		rc = -EIO;
 
 	kfree(data);
 	return rc;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 14/32] USB: yurex: fix out-of-bounds uaccess in read handler
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 13/32] USB: serial: keyspan_pda: fix modem-status error handling Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 15/32] USB: serial: mos7840: fix status-register error handling Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jann Horn

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jann Horn <jannh@google.com>

commit f1e255d60ae66a9f672ff9a207ee6cd8e33d2679 upstream.

In general, accessing userspace memory beyond the length of the supplied
buffer in VFS read/write handlers can lead to both kernel memory corruption
(via kernel_read()/kernel_write(), which can e.g. be triggered via
sys_splice()) and privilege escalation inside userspace.

Fix it by using simple_read_from_buffer() instead of custom logic.

Fixes: 6bc235a2e24a ("USB: add driver for Meywa-Denki & Kayac YUREX")
Signed-off-by: Jann Horn <jannh@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/misc/yurex.c |   23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -406,8 +406,7 @@ static ssize_t yurex_read(struct file *f
 			  loff_t *ppos)
 {
 	struct usb_yurex *dev;
-	int retval = 0;
-	int bytes_read = 0;
+	int len = 0;
 	char in_buffer[20];
 	unsigned long flags;
 
@@ -415,26 +414,16 @@ static ssize_t yurex_read(struct file *f
 
 	mutex_lock(&dev->io_mutex);
 	if (!dev->interface) {		/* already disconnected */
-		retval = -ENODEV;
-		goto exit;
+		mutex_unlock(&dev->io_mutex);
+		return -ENODEV;
 	}
 
 	spin_lock_irqsave(&dev->lock, flags);
-	bytes_read = snprintf(in_buffer, 20, "%lld\n", dev->bbu);
+	len = snprintf(in_buffer, 20, "%lld\n", dev->bbu);
 	spin_unlock_irqrestore(&dev->lock, flags);
-
-	if (*ppos < bytes_read) {
-		if (copy_to_user(buffer, in_buffer + *ppos, bytes_read - *ppos))
-			retval = -EFAULT;
-		else {
-			retval = bytes_read - *ppos;
-			*ppos += bytes_read;
-		}
-	}
-
-exit:
 	mutex_unlock(&dev->io_mutex);
-	return retval;
+
+	return simple_read_from_buffer(buffer, count, ppos, in_buffer, len);
 }
 
 static ssize_t yurex_write(struct file *file, const char __user *user_buffer,



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 15/32] USB: serial: mos7840: fix status-register error handling
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 14/32] USB: yurex: fix out-of-bounds uaccess in read handler Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 16/32] usb: quirks: add delay quirks for Corsair Strafe Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@kernel.org>

commit 794744abfffef8b1f3c0c8a4896177d6d13d653d upstream.

Add missing transfer-length sanity check to the status-register
completion handler to avoid leaking bits of uninitialised slab data to
user space.

Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver")
Cc: stable <stable@vger.kernel.org>     # 2.6.19
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/mos7840.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -482,6 +482,9 @@ static void mos7840_control_callback(str
 	}
 
 	dev_dbg(dev, "%s urb buffer size is %d\n", __func__, urb->actual_length);
+	if (urb->actual_length < 1)
+		goto out;
+
 	dev_dbg(dev, "%s mos7840_port->MsrLsr is %d port %d\n", __func__,
 		mos7840_port->MsrLsr, mos7840_port->port_num);
 	data = urb->transfer_buffer;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 16/32] usb: quirks: add delay quirks for Corsair Strafe
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 15/32] USB: serial: mos7840: fix status-register error handling Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 17/32] xhci: xhci-mem: off by one in xhci_stream_id_to_ring() Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Nico Sneck

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nico Sneck <snecknico@gmail.com>

commit bba57eddadda936c94b5dccf73787cb9e159d0a5 upstream.

Corsair Strafe appears to suffer from the same issues
as the Corsair Strafe RGB.
Apply the same quirks (control message delay and init delay)
that the RGB version has to 1b1c:1b15.

With these quirks in place the keyboard works correctly upon
booting the system, and no longer requires reattaching the device.

Signed-off-by: Nico Sneck <snecknico@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/quirks.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -231,6 +231,10 @@ static const struct usb_device_id usb_qu
 	/* Corsair K70 RGB */
 	{ USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT },
 
+	/* Corsair Strafe */
+	{ USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT |
+	  USB_QUIRK_DELAY_CTRL_MSG },
+
 	/* Corsair Strafe RGB */
 	{ USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT |
 	  USB_QUIRK_DELAY_CTRL_MSG },



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 17/32] xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 16/32] usb: quirks: add delay quirks for Corsair Strafe Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 18/32] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 313db3d6488bb03b61b99de9dbca061f1fd838e1 upstream.

The > should be >= here so that we don't read one element beyond the end
of the ep->stream_info->stream_rings[] array.

Fixes: e9df17eb1408 ("USB: xhci: Correct assumptions about number of rings per endpoint.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/xhci-mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -650,7 +650,7 @@ struct xhci_ring *xhci_stream_id_to_ring
 	if (!ep->stream_info)
 		return NULL;
 
-	if (stream_id > ep->stream_info->num_streams)
+	if (stream_id >= ep->stream_info->num_streams)
 		return NULL;
 	return ep->stream_info->stream_rings[stream_id];
 }



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 18/32] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 17/32] xhci: xhci-mem: off by one in xhci_stream_id_to_ring() Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 19/32] Fix up non-directory creation in SGID directories Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tomasz Kramkowski,
	Benjamin Tissoires, Jiri Kosina

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tomasz Kramkowski <tk@the-tk.com>

commit 9547837bdccb4af127528b36a73377150658b4ac upstream.

The (1292:4745) Innomedia INNEX GENESIS/ATARI adapter needs
HID_QUIRK_MULTI_INPUT to split the device up into two controllers
instead of inputs from both being merged into one.

Signed-off-by: Tomasz Kramkowski <tk@the-tk.com>
Acked-By: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hid/hid-ids.h           |    3 +++
 drivers/hid/usbhid/hid-quirks.c |    1 +
 2 files changed, 4 insertions(+)

--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -549,6 +549,9 @@
 #define USB_VENDOR_ID_IRTOUCHSYSTEMS	0x6615
 #define USB_DEVICE_ID_IRTOUCH_INFRARED_USB	0x0070
 
+#define USB_VENDOR_ID_INNOMEDIA			0x1292
+#define USB_DEVICE_ID_INNEX_GENESIS_ATARI	0x4745
+
 #define USB_VENDOR_ID_ITE               0x048d
 #define USB_DEVICE_ID_ITE_LENOVO_YOGA   0x8386
 #define USB_DEVICE_ID_ITE_LENOVO_YOGA2  0x8350
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -170,6 +170,7 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT },
+	{ USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI, HID_QUIRK_MULTI_INPUT },
 
 	{ 0, 0 }
 };



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 19/32] Fix up non-directory creation in SGID directories
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 18/32] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 20/32] ALSA: hda - Handle pm failure during hotplug Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jann Horn, Andy Lutomirski, Al Viro,
	Linus Torvalds

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 upstream.

sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid.  This is historically used for
group-shared directories.

But group directories writable by non-group members should not imply
that such non-group members can magically join the group, so make sure
to clear the sgid bit on non-directories for non-members (but remember
that sgid without group execute means "mandatory locking", just to
confuse things even more).

Reported-by: Jann Horn <jannh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/inode.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/inode.c
+++ b/fs/inode.c
@@ -2003,8 +2003,14 @@ void inode_init_owner(struct inode *inod
 	inode->i_uid = current_fsuid();
 	if (dir && dir->i_mode & S_ISGID) {
 		inode->i_gid = dir->i_gid;
+
+		/* Directories are special, and always inherit S_ISGID */
 		if (S_ISDIR(mode))
 			mode |= S_ISGID;
+		else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) &&
+			 !in_group_p(inode->i_gid) &&
+			 !capable_wrt_inode_uidgid(dir, CAP_FSETID))
+			mode &= ~S_ISGID;
 	} else
 		inode->i_gid = current_fsgid();
 	inode->i_mode = mode;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 20/32] ALSA: hda - Handle pm failure during hotplug
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 19/32] Fix up non-directory creation in SGID directories Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 21/32] fs, elf: make sure to page align bss in load_elf_library Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Chris Wilson, Takashi Iwai

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Chris Wilson <chris@chris-wilson.co.uk>

commit aaa23f86001bdb82d2f937c5c7bce0a1e11a6c5b upstream.

Obtaining the runtime pm wakeref can fail, especially in a hotplug
scenario where i915.ko has been unloaded. If we do not catch the
failure, we end up with an unbalanced pm.

v2 additions by tiwai:
hdmi_present_sense() checks the return value and handle only a
negative error case and bails out only if it's really still suspended.
Also, snd_hda_power_down() is called at the error path so that the
refcount is balanced.

Along with it, the spec->pcm_lock is taken outside
hdmi_present_sense() in the caller side, so that it won't cause
deadlock at reentrace via runtime resume.

v3 fix by tiwai:
Missing linux/pm_runtime.h is included.

References: 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_hdmi.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -33,6 +33,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/pm_runtime.h>
 #include <sound/core.h>
 #include <sound/jack.h>
 #include <sound/asoundef.h>
@@ -731,8 +732,10 @@ static void check_presence_and_report(st
 
 	if (pin_idx < 0)
 		return;
+	mutex_lock(&spec->pcm_lock);
 	if (hdmi_present_sense(get_pin(spec, pin_idx), 1))
 		snd_hda_jack_report_sync(codec);
+	mutex_unlock(&spec->pcm_lock);
 }
 
 static void jack_callback(struct hda_codec *codec,
@@ -1521,21 +1524,23 @@ static void sync_eld_via_acomp(struct hd
 static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
 {
 	struct hda_codec *codec = per_pin->codec;
-	struct hdmi_spec *spec = codec->spec;
 	int ret;
 
 	/* no temporary power up/down needed for component notifier */
-	if (!codec_has_acomp(codec))
-		snd_hda_power_up_pm(codec);
+	if (!codec_has_acomp(codec)) {
+		ret = snd_hda_power_up_pm(codec);
+		if (ret < 0 && pm_runtime_suspended(hda_codec_dev(codec))) {
+			snd_hda_power_down_pm(codec);
+			return false;
+		}
+	}
 
-	mutex_lock(&spec->pcm_lock);
 	if (codec_has_acomp(codec)) {
 		sync_eld_via_acomp(codec, per_pin);
 		ret = false; /* don't call snd_hda_jack_report_sync() */
 	} else {
 		ret = hdmi_present_sense_via_verbs(per_pin, repoll);
 	}
-	mutex_unlock(&spec->pcm_lock);
 
 	if (!codec_has_acomp(codec))
 		snd_hda_power_down_pm(codec);
@@ -1547,12 +1552,16 @@ static void hdmi_repoll_eld(struct work_
 {
 	struct hdmi_spec_per_pin *per_pin =
 	container_of(to_delayed_work(work), struct hdmi_spec_per_pin, work);
+	struct hda_codec *codec = per_pin->codec;
+	struct hdmi_spec *spec = codec->spec;
 
 	if (per_pin->repoll_count++ > 6)
 		per_pin->repoll_count = 0;
 
+	mutex_lock(&spec->pcm_lock);
 	if (hdmi_present_sense(per_pin, per_pin->repoll_count))
 		snd_hda_jack_report_sync(per_pin->codec);
+	mutex_unlock(&spec->pcm_lock);
 }
 
 static void intel_haswell_fixup_connect_list(struct hda_codec *codec,



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 21/32] fs, elf: make sure to page align bss in load_elf_library
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 20/32] ALSA: hda - Handle pm failure during hotplug Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 22/32] tools build: fix # escaping in .cmd files for future Make Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oscar Salvador,
	syzbot+5dcb560fe12aa5091c06, Tetsuo Handa, Kees Cook,
	Michal Hocko, Nicolas Pitre, Andrew Morton, Linus Torvalds

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oscar Salvador <osalvador@suse.de>

commit 24962af7e1041b7e50c1bc71d8d10dc678c556b5 upstream.

The current code does not make sure to page align bss before calling
vm_brk(), and this can lead to a VM_BUG_ON() in __mm_populate() due to
the requested lenght not being correctly aligned.

Let us make sure to align it properly.

Kees: only applicable to CONFIG_USELIB kernels: 32-bit and configured
for libc5.

Link: http://lkml.kernel.org/r/20180705145539.9627-1-osalvador@techadventures.net
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Reported-by: syzbot+5dcb560fe12aa5091c06@syzkaller.appspotmail.com
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/binfmt_elf.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1217,9 +1217,8 @@ static int load_elf_library(struct file
 		goto out_free_ph;
 	}
 
-	len = ELF_PAGESTART(eppnt->p_filesz + eppnt->p_vaddr +
-			    ELF_MIN_ALIGN - 1);
-	bss = eppnt->p_memsz + eppnt->p_vaddr;
+	len = ELF_PAGEALIGN(eppnt->p_filesz + eppnt->p_vaddr);
+	bss = ELF_PAGEALIGN(eppnt->p_memsz + eppnt->p_vaddr);
 	if (bss > len) {
 		error = vm_brk(len, bss - len);
 		if (error)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 22/32] tools build: fix # escaping in .cmd files for future Make
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 21/32] fs, elf: make sure to page align bss in load_elf_library Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 23/32] i2c: tegra: Fix NACK error handling Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Randy Dunlap, Rasmus Villemoes,
	Paul Menzel, Masahiro Yamada

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paul Menzel <pmenzel@molgen.mpg.de>

commit 9feeb638cde083c737e295c0547f1b4f28e99583 upstream.

In 2016 GNU Make made a backwards incompatible change to the way '#'
characters were handled in Makefiles when used inside functions or
macros:

http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57

Due to this change, when attempting to run `make prepare' I get a
spurious make syntax error:

    /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.

When inspecting `.fixdep.o.cmd' it includes two lines which use
unescaped comment characters at the top:

    \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
    \# using basic dep data

This is because `tools/build/Build.include' prints these '\#'
characters:

    printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
    printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \

This completes commit 9564a8cf422d ("Kbuild: fix # escaping in .cmd files
for future Make").

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: stable@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/build/Build.include |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -63,8 +63,8 @@ dep-cmd = $(if $(wildcard $(fixdep)),
            $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;           \
            rm -f $(depfile);                                                    \
            mv -f $(dot-target).tmp $(dot-target).cmd,                           \
-           printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
-           printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
+           printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
+           printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd;           \
            cat $(depfile) >> $(dot-target).cmd;                                 \
            printf '%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
 



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 23/32] i2c: tegra: Fix NACK error handling
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 22/32] tools build: fix # escaping in .cmd files for future Make Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 24/32] iw_cxgb4: correctly enforce the max reg_mr depth Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jon Hunter, Thierry Reding, Wolfram Sang

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jon Hunter <jonathanh@nvidia.com>

commit 54836e2d03e76d80aec3399368ffaf5b7caadd1b upstream.

On Tegra30 Cardhu the PCA9546 I2C mux is not ACK'ing I2C commands on
resume from suspend (which is caused by the reset signal for the I2C
mux not being configured correctl). However, this NACK is causing the
Tegra30 to hang on resuming from suspend which is not expected as we
detect NACKs and handle them. The hang observed appears to occur when
resetting the I2C controller to recover from the NACK.

Commit 77821b4678f9 ("i2c: tegra: proper handling of error cases") added
additional error handling for some error cases including NACK, however,
it appears that this change conflicts with an early fix by commit
f70893d08338 ("i2c: tegra: Add delay before resetting the controller
after NACK"). After commit 77821b4678f9 was made we now disable 'packet
mode' before the delay from commit f70893d08338 happens. Testing shows
that moving the delay to before disabling 'packet mode' fixes the hang
observed on Tegra30. The delay was added to give the I2C controller
chance to send a stop condition and so it makes sense to move this to
before we disable packet mode. Please note that packet mode is always
enabled for Tegra.

Fixes: 77821b4678f9 ("i2c: tegra: proper handling of error cases")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-tegra.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -547,6 +547,14 @@ static int tegra_i2c_disable_packet_mode
 {
 	u32 cnfg;
 
+	/*
+	 * NACK interrupt is generated before the I2C controller generates
+	 * the STOP condition on the bus. So wait for 2 clock periods
+	 * before disabling the controller so that the STOP condition has
+	 * been delivered properly.
+	 */
+	udelay(DIV_ROUND_UP(2 * 1000000, i2c_dev->bus_clk_rate));
+
 	cnfg = i2c_readl(i2c_dev, I2C_CNFG);
 	if (cnfg & I2C_CNFG_PACKET_MODE_EN)
 		i2c_writel(i2c_dev, cnfg & ~I2C_CNFG_PACKET_MODE_EN, I2C_CNFG);
@@ -708,15 +716,6 @@ static int tegra_i2c_xfer_msg(struct teg
 	if (likely(i2c_dev->msg_err == I2C_ERR_NONE))
 		return 0;
 
-	/*
-	 * NACK interrupt is generated before the I2C controller generates
-	 * the STOP condition on the bus. So wait for 2 clock periods
-	 * before resetting the controller so that the STOP condition has
-	 * been delivered properly.
-	 */
-	if (i2c_dev->msg_err == I2C_ERR_NO_ACK)
-		udelay(DIV_ROUND_UP(2 * 1000000, i2c_dev->bus_clk_rate));
-
 	tegra_i2c_init(i2c_dev);
 	if (i2c_dev->msg_err == I2C_ERR_NO_ACK) {
 		if (msg->flags & I2C_M_IGNORE_NAK)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 24/32] iw_cxgb4: correctly enforce the max reg_mr depth
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 23/32] i2c: tegra: Fix NACK error handling Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 25/32] nvme-pci: Remap CMB SQ entries on every controller reset Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Steve Wise, Jason Gunthorpe

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Steve Wise <swise@opengridcomputing.com>

commit 7b72717a20bba8bdd01b14c0460be7d15061cd6b upstream.

The code was mistakenly using the length of the page array memory instead
of the depth of the page array.

This would cause MR creation to fail in some cases.

Fixes: 8376b86de7d3 ("iw_cxgb4: Support the new memory registration API")
Cc: stable@vger.kernel.org
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/cxgb4/mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -724,7 +724,7 @@ static int c4iw_set_page(struct ib_mr *i
 {
 	struct c4iw_mr *mhp = to_c4iw_mr(ibmr);
 
-	if (unlikely(mhp->mpl_len == mhp->max_mpl_len))
+	if (unlikely(mhp->mpl_len == mhp->attr.pbl_size))
 		return -ENOMEM;
 
 	mhp->mpl[mhp->mpl_len++] = addr;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 25/32] nvme-pci: Remap CMB SQ entries on every controller reset
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 24/32] iw_cxgb4: correctly enforce the max reg_mr depth Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 26/32] uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn() Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christian Black, Jon Derrick,
	Keith Busch, Christoph Hellwig, Scott Bauer

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Keith Busch <keith.busch@intel.com>

commit 815c6704bf9f1c59f3a6be380a4032b9c57b12f1 upstream.

The controller memory buffer is remapped into a kernel address on each
reset, but the driver was setting the submission queue base address
only on the very first queue creation. The remapped address is likely to
change after a reset, so accessing the old address will hit a kernel bug.

This patch fixes that by setting the queue's CMB base address each time
the queue is created.

Fixes: f63572dff1421 ("nvme: unmap CMB and remove sysfs file in reset path")
Reported-by: Christian Black <christian.d.black@intel.com>
Cc: Jon Derrick <jonathan.derrick@intel.com>
Cc: <stable@vger.kernel.org> # 4.9+
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/nvme/host/pci.c |   27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1034,17 +1034,15 @@ static int nvme_cmb_qdepth(struct nvme_d
 static int nvme_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq,
 				int qid, int depth)
 {
-	if (qid && dev->cmb && use_cmb_sqes && NVME_CMB_SQS(dev->cmbsz)) {
-		unsigned offset = (qid - 1) * roundup(SQ_SIZE(depth),
-						      dev->ctrl.page_size);
-		nvmeq->sq_dma_addr = dev->cmb_bus_addr + offset;
-		nvmeq->sq_cmds_io = dev->cmb + offset;
-	} else {
-		nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(depth),
-					&nvmeq->sq_dma_addr, GFP_KERNEL);
-		if (!nvmeq->sq_cmds)
-			return -ENOMEM;
-	}
+
+	/* CMB SQEs will be mapped before creation */
+	if (qid && dev->cmb && use_cmb_sqes && NVME_CMB_SQS(dev->cmbsz))
+		return 0;
+
+	nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(depth),
+					    &nvmeq->sq_dma_addr, GFP_KERNEL);
+	if (!nvmeq->sq_cmds)
+		return -ENOMEM;
 
 	return 0;
 }
@@ -1117,6 +1115,13 @@ static int nvme_create_queue(struct nvme
 	struct nvme_dev *dev = nvmeq->dev;
 	int result;
 
+	if (qid && dev->cmb && use_cmb_sqes && NVME_CMB_SQS(dev->cmbsz)) {
+		unsigned offset = (qid - 1) * roundup(SQ_SIZE(nvmeq->q_depth),
+						      dev->ctrl.page_size);
+		nvmeq->sq_dma_addr = dev->cmb_bus_addr + offset;
+		nvmeq->sq_cmds_io = dev->cmb + offset;
+	}
+
 	nvmeq->cq_vector = qid - 1;
 	result = adapter_alloc_cq(dev, qid, nvmeq);
 	if (result < 0)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 26/32] uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn()
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 25/32] nvme-pci: Remap CMB SQ entries on every controller reset Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 27/32] netfilter: nf_queue: augment nfqa_cfg_policy Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+30d675e3ca03c1c351e7,
	Oleg Nesterov, Masami Hiramatsu, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, syzkaller-bugs, Ingo Molnar

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oleg Nesterov <oleg@redhat.com>

commit 90718e32e1dcc2479acfa208ccfc6442850b594c upstream.

insn_get_length() has the side-effect of processing the entire instruction
but only if it was decoded successfully, otherwise insn_complete() can fail
and in this case we need to just return an error without warning.

Reported-by: syzbot+30d675e3ca03c1c351e7@syzkaller.appspotmail.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: syzkaller-bugs@googlegroups.com
Link: https://lkml.kernel.org/lkml/20180518162739.GA5559@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/uprobes.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -290,7 +290,7 @@ static int uprobe_init_insn(struct arch_
 	insn_init(insn, auprobe->insn, sizeof(auprobe->insn), x86_64);
 	/* has the side-effect of processing the entire instruction */
 	insn_get_length(insn);
-	if (WARN_ON_ONCE(!insn_complete(insn)))
+	if (!insn_complete(insn))
 		return -ENOEXEC;
 
 	if (is_prefix_bad(insn))



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 27/32] netfilter: nf_queue: augment nfqa_cfg_policy
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 26/32] uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn() Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 28/32] netfilter: x_tables: initialise match/target check parameter struct Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Dumazet, syzbot, Pablo Neira Ayuso

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <edumazet@google.com>

commit ba062ebb2cd561d404e0fba8ee4b3f5ebce7cbfc upstream.

Three attributes are currently not verified, thus can trigger KMSAN
warnings such as :

BUG: KMSAN: uninit-value in __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline]
BUG: KMSAN: uninit-value in __fswab32 include/uapi/linux/swab.h:59 [inline]
BUG: KMSAN: uninit-value in nfqnl_recv_config+0x939/0x17d0 net/netfilter/nfnetlink_queue.c:1268
CPU: 1 PID: 4521 Comm: syz-executor120 Not tainted 4.17.0+ #5
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x185/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x188/0x2a0 mm/kmsan/kmsan.c:1117
 __msan_warning_32+0x70/0xc0 mm/kmsan/kmsan_instr.c:620
 __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline]
 __fswab32 include/uapi/linux/swab.h:59 [inline]
 nfqnl_recv_config+0x939/0x17d0 net/netfilter/nfnetlink_queue.c:1268
 nfnetlink_rcv_msg+0xb2e/0xc80 net/netfilter/nfnetlink.c:212
 netlink_rcv_skb+0x37e/0x600 net/netlink/af_netlink.c:2448
 nfnetlink_rcv+0x2fe/0x680 net/netfilter/nfnetlink.c:513
 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
 netlink_unicast+0x1680/0x1750 net/netlink/af_netlink.c:1336
 netlink_sendmsg+0x104f/0x1350 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:629 [inline]
 sock_sendmsg net/socket.c:639 [inline]
 ___sys_sendmsg+0xec8/0x1320 net/socket.c:2117
 __sys_sendmsg net/socket.c:2155 [inline]
 __do_sys_sendmsg net/socket.c:2164 [inline]
 __se_sys_sendmsg net/socket.c:2162 [inline]
 __x64_sys_sendmsg+0x331/0x460 net/socket.c:2162
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x43fd59
RSP: 002b:00007ffde0e30d28 EFLAGS: 00000213 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fd59
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000213 R12: 0000000000401680
R13: 0000000000401710 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:279 [inline]
 kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:189
 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:315
 kmsan_slab_alloc+0x10/0x20 mm/kmsan/kmsan.c:322
 slab_post_alloc_hook mm/slab.h:446 [inline]
 slab_alloc_node mm/slub.c:2753 [inline]
 __kmalloc_node_track_caller+0xb35/0x11b0 mm/slub.c:4395
 __kmalloc_reserve net/core/skbuff.c:138 [inline]
 __alloc_skb+0x2cb/0x9e0 net/core/skbuff.c:206
 alloc_skb include/linux/skbuff.h:988 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline]
 netlink_sendmsg+0x76e/0x1350 net/netlink/af_netlink.c:1876
 sock_sendmsg_nosec net/socket.c:629 [inline]
 sock_sendmsg net/socket.c:639 [inline]
 ___sys_sendmsg+0xec8/0x1320 net/socket.c:2117
 __sys_sendmsg net/socket.c:2155 [inline]
 __do_sys_sendmsg net/socket.c:2164 [inline]
 __se_sys_sendmsg net/socket.c:2162 [inline]
 __x64_sys_sendmsg+0x331/0x460 net/socket.c:2162
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: fdb694a01f1f ("netfilter: Add fail-open support")
Fixes: 829e17a1a602 ("[NETFILTER]: nfnetlink_queue: allow changing queue length through netlink")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/netfilter/nfnetlink_queue.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -1210,6 +1210,9 @@ static int nfqnl_recv_unsupp(struct net
 static const struct nla_policy nfqa_cfg_policy[NFQA_CFG_MAX+1] = {
 	[NFQA_CFG_CMD]		= { .len = sizeof(struct nfqnl_msg_config_cmd) },
 	[NFQA_CFG_PARAMS]	= { .len = sizeof(struct nfqnl_msg_config_params) },
+	[NFQA_CFG_QUEUE_MAXLEN]	= { .type = NLA_U32 },
+	[NFQA_CFG_MASK]		= { .type = NLA_U32 },
+	[NFQA_CFG_FLAGS]	= { .type = NLA_U32 },
 };
 
 static const struct nf_queue_handler nfqh = {



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 28/32] netfilter: x_tables: initialise match/target check parameter struct
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 27/32] netfilter: nf_queue: augment nfqa_cfg_policy Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 29/32] loop: add recursion validation to LOOP_CHANGE_FD Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+da4494182233c23a5fcf,
	Florian Westphal, Pablo Neira Ayuso

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Florian Westphal <fw@strlen.de>

commit c568503ef02030f169c9e19204def610a3510918 upstream.

syzbot reports following splat:

BUG: KMSAN: uninit-value in ebt_stp_mt_check+0x24b/0x450
 net/bridge/netfilter/ebt_stp.c:162
 ebt_stp_mt_check+0x24b/0x450 net/bridge/netfilter/ebt_stp.c:162
 xt_check_match+0x1438/0x1650 net/netfilter/x_tables.c:506
 ebt_check_match net/bridge/netfilter/ebtables.c:372 [inline]
 ebt_check_entry net/bridge/netfilter/ebtables.c:702 [inline]

The uninitialised access is
   xt_mtchk_param->nft_compat

... which should be set to 0.
Fix it by zeroing the struct beforehand, same for tgchk.

ip(6)tables targetinfo uses c99-style initialiser, so no change
needed there.

Reported-by: syzbot+da4494182233c23a5fcf@syzkaller.appspotmail.com
Fixes: 55917a21d0cc0 ("netfilter: x_tables: add context to know if extension runs from nft_compat")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/bridge/netfilter/ebtables.c |    2 ++
 net/ipv4/netfilter/ip_tables.c  |    1 +
 net/ipv6/netfilter/ip6_tables.c |    1 +
 3 files changed, 4 insertions(+)

--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -704,6 +704,8 @@ ebt_check_entry(struct ebt_entry *e, str
 	}
 	i = 0;
 
+	memset(&mtpar, 0, sizeof(mtpar));
+	memset(&tgpar, 0, sizeof(tgpar));
 	mtpar.net	= tgpar.net       = net;
 	mtpar.table     = tgpar.table     = name;
 	mtpar.entryinfo = tgpar.entryinfo = e;
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -554,6 +554,7 @@ find_check_entry(struct ipt_entry *e, st
 		return -ENOMEM;
 
 	j = 0;
+	memset(&mtpar, 0, sizeof(mtpar));
 	mtpar.net	= net;
 	mtpar.table     = name;
 	mtpar.entryinfo = &e->ip;
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -584,6 +584,7 @@ find_check_entry(struct ip6t_entry *e, s
 		return -ENOMEM;
 
 	j = 0;
+	memset(&mtpar, 0, sizeof(mtpar));
 	mtpar.net	= net;
 	mtpar.table     = name;
 	mtpar.entryinfo = &e->ipv6;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 29/32] loop: add recursion validation to LOOP_CHANGE_FD
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 28/32] netfilter: x_tables: initialise match/target check parameter struct Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 30/32] PM / hibernate: Fix oops at snapshot_write() Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable,
	syzbot+4349872271ece473a7c91190b68b4bac7c5dbc87,
	syzbot+40bd32c4d9a3cc12a339, syzbot+769c54e66f994b041be7,
	syzbot+0a89a9ce473936c57065, Theodore Tso, Jens Axboe

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Theodore Ts'o <tytso@mit.edu>

commit d2ac838e4cd7e5e9891ecc094d626734b0245c99 upstream.

Refactor the validation code used in LOOP_SET_FD so it is also used in
LOOP_CHANGE_FD.  Otherwise it is possible to construct a set of loop
devices that all refer to each other.  This can lead to a infinite
loop in starting with "while (is_loop_device(f)) .." in loop_set_fd().

Fix this by refactoring out the validation code and using it for
LOOP_CHANGE_FD as well as LOOP_SET_FD.

Reported-by: syzbot+4349872271ece473a7c91190b68b4bac7c5dbc87@syzkaller.appspotmail.com
Reported-by: syzbot+40bd32c4d9a3cc12a339@syzkaller.appspotmail.com
Reported-by: syzbot+769c54e66f994b041be7@syzkaller.appspotmail.com
Reported-by: syzbot+0a89a9ce473936c57065@syzkaller.appspotmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/block/loop.c |   68 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 30 deletions(-)

--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -640,6 +640,36 @@ static void loop_reread_partitions(struc
 			__func__, lo->lo_number, lo->lo_file_name, rc);
 }
 
+static inline int is_loop_device(struct file *file)
+{
+	struct inode *i = file->f_mapping->host;
+
+	return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
+}
+
+static int loop_validate_file(struct file *file, struct block_device *bdev)
+{
+	struct inode	*inode = file->f_mapping->host;
+	struct file	*f = file;
+
+	/* Avoid recursion */
+	while (is_loop_device(f)) {
+		struct loop_device *l;
+
+		if (f->f_mapping->host->i_bdev == bdev)
+			return -EBADF;
+
+		l = f->f_mapping->host->i_bdev->bd_disk->private_data;
+		if (l->lo_state == Lo_unbound) {
+			return -EINVAL;
+		}
+		f = l->lo_backing_file;
+	}
+	if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
+		return -EINVAL;
+	return 0;
+}
+
 /*
  * loop_change_fd switched the backing store of a loopback device to
  * a new file. This is useful for operating system installers to free up
@@ -669,14 +699,15 @@ static int loop_change_fd(struct loop_de
 	if (!file)
 		goto out;
 
+	error = loop_validate_file(file, bdev);
+	if (error)
+		goto out_putf;
+
 	inode = file->f_mapping->host;
 	old_file = lo->lo_backing_file;
 
 	error = -EINVAL;
 
-	if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
-		goto out_putf;
-
 	/* size of the new backing store needs to be the same */
 	if (get_loop_size(lo, file) != get_loop_size(lo, old_file))
 		goto out_putf;
@@ -697,13 +728,6 @@ static int loop_change_fd(struct loop_de
 	return error;
 }
 
-static inline int is_loop_device(struct file *file)
-{
-	struct inode *i = file->f_mapping->host;
-
-	return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
-}
-
 /* loop sysfs attributes */
 
 static ssize_t loop_attr_show(struct device *dev, char *page,
@@ -861,7 +885,7 @@ static int loop_prepare_queue(struct loo
 static int loop_set_fd(struct loop_device *lo, fmode_t mode,
 		       struct block_device *bdev, unsigned int arg)
 {
-	struct file	*file, *f;
+	struct file	*file;
 	struct inode	*inode;
 	struct address_space *mapping;
 	unsigned lo_blocksize;
@@ -881,29 +905,13 @@ static int loop_set_fd(struct loop_devic
 	if (lo->lo_state != Lo_unbound)
 		goto out_putf;
 
-	/* Avoid recursion */
-	f = file;
-	while (is_loop_device(f)) {
-		struct loop_device *l;
-
-		if (f->f_mapping->host->i_bdev == bdev)
-			goto out_putf;
-
-		l = f->f_mapping->host->i_bdev->bd_disk->private_data;
-		if (l->lo_state == Lo_unbound) {
-			error = -EINVAL;
-			goto out_putf;
-		}
-		f = l->lo_backing_file;
-	}
+	error = loop_validate_file(file, bdev);
+	if (error)
+		goto out_putf;
 
 	mapping = file->f_mapping;
 	inode = mapping->host;
 
-	error = -EINVAL;
-	if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
-		goto out_putf;
-
 	if (!(file->f_mode & FMODE_WRITE) || !(mode & FMODE_WRITE) ||
 	    !file->f_op->write_iter)
 		lo_flags |= LO_FLAGS_READ_ONLY;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 30/32] PM / hibernate: Fix oops at snapshot_write()
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 29/32] loop: add recursion validation to LOOP_CHANGE_FD Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 31/32] RDMA/ucm: Mark UCM interface as BROKEN Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tetsuo Handa, syzbot, Rafael J. Wysocki

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

commit fc14eebfc20854a38fd9f1d93a42b1783dad4d17 upstream.

syzbot is reporting NULL pointer dereference at snapshot_write() [1].
This is because data->handle is zero-cleared by ioctl(SNAPSHOT_FREE).
Fix this by checking data_of(data->handle) != NULL before using it.

[1] https://syzkaller.appspot.com/bug?id=828a3c71bd344a6de8b6a31233d51a72099f27fd

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+ae590932da6e45d6564d@syzkaller.appspotmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/power/user.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -186,6 +186,11 @@ static ssize_t snapshot_write(struct fil
 		res = PAGE_SIZE - pg_offp;
 	}
 
+	if (!data_of(data->handle)) {
+		res = -EINVAL;
+		goto unlock;
+	}
+
 	res = simple_write_to_buffer(data_of(data->handle), res, &pg_offp,
 			buf, count);
 	if (res > 0)



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 31/32] RDMA/ucm: Mark UCM interface as BROKEN
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 30/32] PM / hibernate: Fix oops at snapshot_write() Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16  7:36 ` [PATCH 4.9 32/32] loop: remember whether sysfs_create_group() was done Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Leon Romanovsky, Jason Gunthorpe

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Leon Romanovsky <leonro@mellanox.com>

commit 7a8690ed6f5346f6738971892205e91d39b6b901 upstream.

In commit 357d23c811a7 ("Remove the obsolete libibcm library")
in rdma-core [1], we removed obsolete library which used the
/dev/infiniband/ucmX interface.

Following multiple syzkaller reports about non-sanitized
user input in the UCMA module, the short audit reveals the same
issues in UCM module too.

It is better to disable this interface in the kernel,
before syzkaller team invests time and energy to harden
this unused interface.

[1] https://github.com/linux-rdma/rdma-core/pull/279

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/Kconfig       |   12 ++++++++++++
 drivers/infiniband/core/Makefile |    4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -34,6 +34,18 @@ config INFINIBAND_USER_ACCESS
 	  libibverbs, libibcm and a hardware driver library from
 	  <http://www.openfabrics.org/git/>.
 
+config INFINIBAND_USER_ACCESS_UCM
+	bool "Userspace CM (UCM, DEPRECATED)"
+	depends on BROKEN
+	depends on INFINIBAND_USER_ACCESS
+	help
+	  The UCM module has known security flaws, which no one is
+	  interested to fix. The user-space part of this code was
+	  dropped from the upstream a long time ago.
+
+	  This option is DEPRECATED and planned to be removed.
+
+
 config INFINIBAND_USER_MEM
 	bool
 	depends on INFINIBAND_USER_ACCESS != n
--- a/drivers/infiniband/core/Makefile
+++ b/drivers/infiniband/core/Makefile
@@ -4,8 +4,8 @@ user_access-$(CONFIG_INFINIBAND_ADDR_TRA
 obj-$(CONFIG_INFINIBAND) +=		ib_core.o ib_cm.o iw_cm.o \
 					$(infiniband-y)
 obj-$(CONFIG_INFINIBAND_USER_MAD) +=	ib_umad.o
-obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=	ib_uverbs.o ib_ucm.o \
-					$(user_access-y)
+obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o $(user_access-y)
+obj-$(CONFIG_INFINIBAND_USER_ACCESS_UCM) += ib_ucm.o $(user_access-y)
 
 ib_core-y :=			packer.o ud_header.o verbs.o cq.o rw.o sysfs.o \
 				device.o fmr_pool.o cache.o netlink.o \



^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 4.9 32/32] loop: remember whether sysfs_create_group() was done
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 31/32] RDMA/ucm: Mark UCM interface as BROKEN Greg Kroah-Hartman
@ 2018-07-16  7:36 ` Greg Kroah-Hartman
  2018-07-16 13:55 ` [PATCH 4.9 00/32] 4.9.113-stable review Nathan Chancellor
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tetsuo Handa, syzbot, Jens Axboe

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

commit d3349b6b3c373ac1fbfb040b810fcee5e2adc7e0 upstream.

syzbot is hitting WARN() triggered by memory allocation fault
injection [1] because loop module is calling sysfs_remove_group()
when sysfs_create_group() failed.
Fix this by remembering whether sysfs_create_group() succeeded.

[1] https://syzkaller.appspot.com/bug?id=3f86c0edf75c86d2633aeb9dd69eccc70bc7e90b

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+9f03168400f56df89dbc6f1751f4458fe739ff29@syzkaller.appspotmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Renamed sysfs_ready -> sysfs_inited.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

---
 drivers/block/loop.c |   11 ++++++-----
 drivers/block/loop.h |    1 +
 2 files changed, 7 insertions(+), 5 deletions(-)

--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -824,16 +824,17 @@ static struct attribute_group loop_attri
 	.attrs= loop_attrs,
 };
 
-static int loop_sysfs_init(struct loop_device *lo)
+static void loop_sysfs_init(struct loop_device *lo)
 {
-	return sysfs_create_group(&disk_to_dev(lo->lo_disk)->kobj,
-				  &loop_attribute_group);
+	lo->sysfs_inited = !sysfs_create_group(&disk_to_dev(lo->lo_disk)->kobj,
+						&loop_attribute_group);
 }
 
 static void loop_sysfs_exit(struct loop_device *lo)
 {
-	sysfs_remove_group(&disk_to_dev(lo->lo_disk)->kobj,
-			   &loop_attribute_group);
+	if (lo->sysfs_inited)
+		sysfs_remove_group(&disk_to_dev(lo->lo_disk)->kobj,
+				   &loop_attribute_group);
 }
 
 static void loop_config_discard(struct loop_device *lo)
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -59,6 +59,7 @@ struct loop_device {
 	struct kthread_worker	worker;
 	struct task_struct	*worker_task;
 	bool			use_dio;
+	bool			sysfs_inited;
 
 	struct request_queue	*lo_queue;
 	struct blk_mq_tag_set	tag_set;



^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re:[PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
  2018-07-16  7:36 ` [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace() Greg Kroah-Hartman
@ 2018-07-16  9:29   ` 陈华才
  2018-07-16  9:40     ` [PATCH " Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: 陈华才 @ 2018-07-16  9:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Burton, James Hogan,
	Ralf Baechle, linux-mips

Hi, Greg,

kernel-4.9 doesn't have call_single_data_t, we should use struct call_single_data instead.

Huacai
 
------------------ Original ------------------
From:  "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>;
Date:  Mon, Jul 16, 2018 03:36 PM
To:  "linux-kernel"<linux-kernel@vger.kernel.org>;
Cc:  "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>; "stable"<stable@vger.kernel.org>; "Paul Burton"<paul.burton@mips.com>; "James Hogan"<jhogan@kernel.org>; "Ralf Baechle"<ralf@linux-mips.org>; "Huacai Chen"<chenhc@lemote.com>; "linux-mips"<linux-mips@linux-mips.org>;
Subject:  [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
 
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paul Burton <paul.burton@mips.com>

commit b63e132b6433a41cf311e8bc382d33fd2b73b505 upstream.

The current MIPS implementation of arch_trigger_cpumask_backtrace() is
broken because it attempts to use synchronous IPIs despite the fact that
it may be run with interrupts disabled.

This means that when arch_trigger_cpumask_backtrace() is invoked, for
example by the RCU CPU stall watchdog, we may:

  - Deadlock due to use of synchronous IPIs with interrupts disabled,
    causing the CPU that's attempting to generate the backtrace output
    to hang itself.

  - Not succeed in generating the desired output from remote CPUs.

  - Produce warnings about this from smp_call_function_many(), for
    example:

    [42760.526910] INFO: rcu_sched detected stalls on CPUs/tasks:
    [42760.535755]  0-...!: (1 GPs behind) idle=ade/140000000000000/0 softirq=526944/526945 fqs=0
    [42760.547874]  1-...!: (0 ticks this GP) idle=e4a/140000000000000/0 softirq=547885/547885 fqs=0
    [42760.559869]  (detected by 2, t=2162 jiffies, g=266689, c=266688, q=33)
    [42760.568927] ------------[ cut here ]------------
    [42760.576146] WARNING: CPU: 2 PID: 1216 at kernel/smp.c:416 smp_call_function_many+0x88/0x20c
    [42760.587839] Modules linked in:
    [42760.593152] CPU: 2 PID: 1216 Comm: sh Not tainted 4.15.4-00373-gee058bb4d0c2 #2
    [42760.603767] Stack : 8e09bd20 8e09bd20 8e09bd20 fffffff0 00000007 00000006 00000000 8e09bca8
    [42760.616937]         95b2b379 95b2b379 807a0080 00000007 81944518 0000018a 00000032 00000000
    [42760.630095]         00000000 00000030 80000000 00000000 806eca74 00000009 8017e2b8 000001a0
    [42760.643169]         00000000 00000002 00000000 8e09baa4 00000008 808b8008 86d69080 8e09bca0
    [42760.656282]         8e09ad50 805e20aa 00000000 00000000 00000000 8017e2b8 00000009 801070ca
    [42760.669424]         ...
    [42760.673919] Call Trace:
    [42760.678672] [<27fde568>] show_stack+0x70/0xf0
    [42760.685417] [<84751641>] dump_stack+0xaa/0xd0
    [42760.692188] [<699d671c>] __warn+0x80/0x92
    [42760.698549] [<68915d41>] warn_slowpath_null+0x28/0x36
    [42760.705912] [<f7c76c1c>] smp_call_function_many+0x88/0x20c
    [42760.713696] [<6bbdfc2a>] arch_trigger_cpumask_backtrace+0x30/0x4a
    [42760.722216] [<f845bd33>] rcu_dump_cpu_stacks+0x6a/0x98
    [42760.729580] [<796e7629>] rcu_check_callbacks+0x672/0x6ac
    [42760.737476] [<059b3b43>] update_process_times+0x18/0x34
    [42760.744981] [<6eb94941>] tick_sched_handle.isra.5+0x26/0x38
    [42760.752793] [<478d3d70>] tick_sched_timer+0x1c/0x50
    [42760.759882] [<e56ea39f>] __hrtimer_run_queues+0xc6/0x226
    [42760.767418] [<e88bbcae>] hrtimer_interrupt+0x88/0x19a
    [42760.775031] [<6765a19e>] gic_compare_interrupt+0x2e/0x3a
    [42760.782761] [<0558bf5f>] handle_percpu_devid_irq+0x78/0x168
    [42760.790795] [<90c11ba2>] generic_handle_irq+0x1e/0x2c
    [42760.798117] [<1b6d462c>] gic_handle_local_int+0x38/0x86
    [42760.805545] [<b2ada1c7>] gic_irq_dispatch+0xa/0x14
    [42760.812534] [<90c11ba2>] generic_handle_irq+0x1e/0x2c
    [42760.820086] [<c7521934>] do_IRQ+0x16/0x20
    [42760.826274] [<9aef3ce6>] plat_irq_dispatch+0x62/0x94
    [42760.833458] [<6a94b53c>] except_vec_vi_end+0x70/0x78
    [42760.840655] [<22284043>] smp_call_function_many+0x1ba/0x20c
    [42760.848501] [<54022b58>] smp_call_function+0x1e/0x2c
    [42760.855693] [<ab9fc705>] flush_tlb_mm+0x2a/0x98
    [42760.862730] [<0844cdd0>] tlb_flush_mmu+0x1c/0x44
    [42760.869628] [<cb259b74>] arch_tlb_finish_mmu+0x26/0x3e
    [42760.877021] [<1aeaaf74>] tlb_finish_mmu+0x18/0x66
    [42760.883907] [<b3fce717>] exit_mmap+0x76/0xea
    [42760.890428] [<c4c8a2f6>] mmput+0x80/0x11a
    [42760.896632] [<a41a08f4>] do_exit+0x1f4/0x80c
    [42760.903158] [<ee01cef6>] do_group_exit+0x20/0x7e
    [42760.909990] [<13fa8d54>] __wake_up_parent+0x0/0x1e
    [42760.917045] [<46cf89d0>] smp_call_function_many+0x1a2/0x20c
    [42760.924893] [<8c21a93b>] syscall_common+0x14/0x1c
    [42760.931765] ---[ end trace 02aa09da9dc52a60 ]---
    [42760.938342] ------------[ cut here ]------------
    [42760.945311] WARNING: CPU: 2 PID: 1216 at kernel/smp.c:291 smp_call_function_single+0xee/0xf8
    ...

This patch switches MIPS' arch_trigger_cpumask_backtrace() to use async
IPIs & smp_call_function_single_async() in order to resolve this
problem. We ensure use of the pre-allocated call_single_data_t
structures is serialized by maintaining a cpumask indicating that
they're busy, and refusing to attempt to send an IPI when a CPU's bit is
set in this mask. This should only happen if a CPU hasn't responded to a
previous backtrace IPI - ie. if it's hung - and we print a warning to
the console in this case.

I've marked this for stable branches as far back as v4.9, to which it
applies cleanly. Strictly speaking the faulty MIPS implementation can be
traced further back to commit 856839b76836 ("MIPS: Add
arch_trigger_all_cpu_backtrace() function") in v3.19, but kernel
versions v3.19 through v4.8 will require further work to backport due to
the rework performed in commit 9a01c3ed5cdb ("nmi_backtrace: add more
trigger_*_cpu_backtrace() methods").

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/19597/
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.9+
Fixes: 856839b76836 ("MIPS: Add arch_trigger_all_cpu_backtrace() function")
Fixes: 9a01c3ed5cdb ("nmi_backtrace: add more trigger_*_cpu_backtrace() methods")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/process.c |   45 ++++++++++++++++++++++++++++++---------------
 1 file changed, 30 insertions(+), 15 deletions(-)

--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -26,6 +26,7 @@
 #include <linux/kallsyms.h>
 #include <linux/random.h>
 #include <linux/prctl.h>
+#include <linux/nmi.h>
 
 #include <asm/asm.h>
 #include <asm/bootinfo.h>
@@ -633,28 +634,42 @@ unsigned long arch_align_stack(unsigned
 	return sp & ALMASK;
 }
 
-static void arch_dump_stack(void *info)
-{
-	struct pt_regs *regs;
+static DEFINE_PER_CPU(call_single_data_t, backtrace_csd);
+static struct cpumask backtrace_csd_busy;
 
-	regs = get_irq_regs();
-
-	if (regs)
-	show_regs(regs);
-	else
-	dump_stack();
+static void handle_backtrace(void *info)
+{
+	nmi_cpu_backtrace(get_irq_regs());
+	cpumask_clear_cpu(smp_processor_id(), &backtrace_csd_busy);
 }
 
-void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
+static void raise_backtrace(cpumask_t *mask)
 {
-	long this_cpu = get_cpu();
+	call_single_data_t *csd;
+	int cpu;
 
-	if (cpumask_test_cpu(this_cpu, mask) && !exclude_self)
-	dump_stack();
+	for_each_cpu(cpu, mask) {
+	/*
+	* If we previously sent an IPI to the target CPU & it hasn't
+	* cleared its bit in the busy cpumask then it didn't handle
+	* our previous IPI & it's not safe for us to reuse the
+	* call_single_data_t.
+	*/
+	if (cpumask_test_and_set_cpu(cpu, &backtrace_csd_busy)) {
+	pr_warn("Unable to send backtrace IPI to CPU%u - perhaps it hung?\n",
+	cpu);
+	continue;
+	}
 
-	smp_call_function_many(mask, arch_dump_stack, NULL, 1);
+	csd = &per_cpu(backtrace_csd, cpu);
+	csd->func = handle_backtrace;
+	smp_call_function_single_async(cpu, csd);
+	}
+}
 
-	put_cpu();
+void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
+{
+	nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace);
 }
 
 int mips_get_process_fp_mode(struct task_struct *task)

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
  2018-07-16  9:29   ` 陈华才
@ 2018-07-16  9:40     ` Greg Kroah-Hartman
  2018-07-16  9:46       ` [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace() 陈华才
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16  9:40 UTC (permalink / raw)
  To: 陈华才
  Cc: linux-kernel, stable, Paul Burton, James Hogan, Ralf Baechle, linux-mips

On Mon, Jul 16, 2018 at 05:29:05PM +0800, 陈华才 wrote:
> Hi, Greg,
> 
> kernel-4.9 doesn't have call_single_data_t, we should use struct call_single_data instead.

Can you send me a patch to merge with this one with that change so that
I know I get it right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace()
  2018-07-16  9:40     ` [PATCH " Greg Kroah-Hartman
@ 2018-07-16  9:46       ` 陈华才
  2018-07-16 10:46         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: 陈华才 @ 2018-07-16  9:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, stable, Paul Burton, James Hogan

Just change "call_single_data_t" to "struct call_single_data" and everything is OK.

Huacai

------------------ Original ------------------
From:  "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>;
Date:  Mon, Jul 16, 2018 05:40 PM
To:  "陈华才"<chenhc@lemote.com>;
Cc:  "linux-kernel"<linux-kernel@vger.kernel.org>; "stable"<stable@vger.kernel.org>; "Paul Burton"<paul.burton@mips.com>; "James Hogan"<jhogan@kernel.org>; "Ralf Baechle"<ralf@linux-mips.org>; "linux-mips"<linux-mips@linux-mips.org>;
Subject:  Re: [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace()
 
On Mon, Jul 16, 2018 at 05:29:05PM +0800, 陈华才 wrote:
> Hi, Greg,
> 
> kernel-4.9 doesn't have call_single_data_t, we should use struct call_single_data instead.

Can you send me a patch to merge with this one with that change so that
I know I get it right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace()
  2018-07-16  9:46       ` [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace() 陈华才
@ 2018-07-16 10:46         ` Greg Kroah-Hartman
  2018-07-16 18:34           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 10:46 UTC (permalink / raw)
  To: 陈华才; +Cc: linux-kernel, stable, Paul Burton, James Hogan

On Mon, Jul 16, 2018 at 05:46:12PM +0800, 陈华才 wrote:
> Just change "call_single_data_t" to "struct call_single_data" and everything is OK.

Ok, I've done that now, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2018-07-16  7:36 ` [PATCH 4.9 32/32] loop: remember whether sysfs_create_group() was done Greg Kroah-Hartman
@ 2018-07-16 13:55 ` Nathan Chancellor
  2018-07-17  7:00   ` Greg Kroah-Hartman
  2018-07-16 16:25 ` Guenter Roeck
  2018-07-17  8:05 ` Naresh Kamboju
  34 siblings, 1 reply; 53+ messages in thread
From: Nathan Chancellor @ 2018-07-16 13:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable

On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.113 release.
> There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.113-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Merged, compiled with -Werror, and installed onto my OnePlus 6.

No issues noticed in dmesg or general usage.

Thanks!
Nathan

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2018-07-16 13:55 ` [PATCH 4.9 00/32] 4.9.113-stable review Nathan Chancellor
@ 2018-07-16 16:25 ` Guenter Roeck
  2018-07-16 16:31   ` Greg Kroah-Hartman
  2018-07-17  8:05 ` Naresh Kamboju
  34 siblings, 1 reply; 53+ messages in thread
From: Guenter Roeck @ 2018-07-16 16:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.113 release.
> There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> Anything received after that time might be too late.
>

Build results:
	total: 148 pass: 133 fail: 15
Failed builds: 
	mips:defconfig 
	mips:allnoconfig 
	mips:defconfig 
	mips:allmodconfig 
	mips:allnoconfig 
	mips:bcm47xx_defconfig 
	mips:bcm63xx_defconfig 
	mips:nlm_xlp_defconfig 
	mips:ath79_defconfig 
	mips:ar7_defconfig 
	mips:e55_defconfig 
	mips:cavium_octeon_defconfig 
	mips:malta_defconfig 
	mips:rt305x_defconfig 
	mips:defconfig 
Qemu test results:
	total: 166 pass: 154 fail: 12
Failed tests: 
	mips:malta_defconfig:nosmp 
	mips:malta_defconfig:smp 
	mips64:malta_defconfig:nosmp 
	mips64:malta_defconfig:smp 
	mipsel:24Kf:malta_defconfig:nosmp:initrd 
	mipsel:24Kf:malta_defconfig:smp:initrd 
	mipsel:24Kf:malta_defconfig:smp:rootfs 
	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
	mipsel64:malta_defconfig:nosmp:rootfs 
	mipsel64:malta_defconfig:smp:initrd 
	mipsel64:malta_defconfig:smp:rootfs 
	mipsel64:fuloong2e_defconfig:fulong2e:rootfs

Error is always the same.

arch/mips/kernel/process.c:637:8:
	error: 'call_single_data_t' undeclared here (not in a function)
arch/mips/kernel/process.c: In function 'raise_backtrace':
/opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
	error: 'csd' undeclared (first use in this function)

Details are available at http://kerneltests.org/builders.

Guenter

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 16:25 ` Guenter Roeck
@ 2018-07-16 16:31   ` Greg Kroah-Hartman
  2018-07-16 16:41     ` Guenter Roeck
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 16:31 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.9.113 release.
> > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > Anything received after that time might be too late.
> >
> 
> Build results:
> 	total: 148 pass: 133 fail: 15
> Failed builds: 
> 	mips:defconfig 
> 	mips:allnoconfig 
> 	mips:defconfig 
> 	mips:allmodconfig 
> 	mips:allnoconfig 
> 	mips:bcm47xx_defconfig 
> 	mips:bcm63xx_defconfig 
> 	mips:nlm_xlp_defconfig 
> 	mips:ath79_defconfig 
> 	mips:ar7_defconfig 
> 	mips:e55_defconfig 
> 	mips:cavium_octeon_defconfig 
> 	mips:malta_defconfig 
> 	mips:rt305x_defconfig 
> 	mips:defconfig 
> Qemu test results:
> 	total: 166 pass: 154 fail: 12
> Failed tests: 
> 	mips:malta_defconfig:nosmp 
> 	mips:malta_defconfig:smp 
> 	mips64:malta_defconfig:nosmp 
> 	mips64:malta_defconfig:smp 
> 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> 	mipsel:24Kf:malta_defconfig:smp:initrd 
> 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> 	mipsel64:malta_defconfig:nosmp:rootfs 
> 	mipsel64:malta_defconfig:smp:initrd 
> 	mipsel64:malta_defconfig:smp:rootfs 
> 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> 
> Error is always the same.
> 
> arch/mips/kernel/process.c:637:8:
> 	error: 'call_single_data_t' undeclared here (not in a function)
> arch/mips/kernel/process.c: In function 'raise_backtrace':
> /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> 	error: 'csd' undeclared (first use in this function)

mips should now be fixed with the updated tree I have pushed out.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 16:31   ` Greg Kroah-Hartman
@ 2018-07-16 16:41     ` Guenter Roeck
  2018-07-16 17:43       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: Guenter Roeck @ 2018-07-16 16:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > This is the start of the stable review cycle for the 4.9.113 release.
> > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > Anything received after that time might be too late.
> > >
> > 
> > Build results:
> > 	total: 148 pass: 133 fail: 15
> > Failed builds: 
> > 	mips:defconfig 
> > 	mips:allnoconfig 
> > 	mips:defconfig 
> > 	mips:allmodconfig 
> > 	mips:allnoconfig 
> > 	mips:bcm47xx_defconfig 
> > 	mips:bcm63xx_defconfig 
> > 	mips:nlm_xlp_defconfig 
> > 	mips:ath79_defconfig 
> > 	mips:ar7_defconfig 
> > 	mips:e55_defconfig 
> > 	mips:cavium_octeon_defconfig 
> > 	mips:malta_defconfig 
> > 	mips:rt305x_defconfig 
> > 	mips:defconfig 
> > Qemu test results:
> > 	total: 166 pass: 154 fail: 12
> > Failed tests: 
> > 	mips:malta_defconfig:nosmp 
> > 	mips:malta_defconfig:smp 
> > 	mips64:malta_defconfig:nosmp 
> > 	mips64:malta_defconfig:smp 
> > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > 	mipsel64:malta_defconfig:smp:initrd 
> > 	mipsel64:malta_defconfig:smp:rootfs 
> > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > 
> > Error is always the same.
> > 
> > arch/mips/kernel/process.c:637:8:
> > 	error: 'call_single_data_t' undeclared here (not in a function)
> > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > 	error: 'csd' undeclared (first use in this function)
> 
> mips should now be fixed with the updated tree I have pushed out.
> 

The above is with v4.9.112-33-g7fb1f5e, which is the latest version
available from the git repository (as of right now). My builders
pulled it at 4:07am this morning, and there was no subsequent update.

Guenter

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 16:41     ` Guenter Roeck
@ 2018-07-16 17:43       ` Greg Kroah-Hartman
  2018-07-16 18:02         ` Guenter Roeck
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 17:43 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 09:41:23AM -0700, Guenter Roeck wrote:
> On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > > This is the start of the stable review cycle for the 4.9.113 release.
> > > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > > Anything received after that time might be too late.
> > > >
> > > 
> > > Build results:
> > > 	total: 148 pass: 133 fail: 15
> > > Failed builds: 
> > > 	mips:defconfig 
> > > 	mips:allnoconfig 
> > > 	mips:defconfig 
> > > 	mips:allmodconfig 
> > > 	mips:allnoconfig 
> > > 	mips:bcm47xx_defconfig 
> > > 	mips:bcm63xx_defconfig 
> > > 	mips:nlm_xlp_defconfig 
> > > 	mips:ath79_defconfig 
> > > 	mips:ar7_defconfig 
> > > 	mips:e55_defconfig 
> > > 	mips:cavium_octeon_defconfig 
> > > 	mips:malta_defconfig 
> > > 	mips:rt305x_defconfig 
> > > 	mips:defconfig 
> > > Qemu test results:
> > > 	total: 166 pass: 154 fail: 12
> > > Failed tests: 
> > > 	mips:malta_defconfig:nosmp 
> > > 	mips:malta_defconfig:smp 
> > > 	mips64:malta_defconfig:nosmp 
> > > 	mips64:malta_defconfig:smp 
> > > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > > 	mipsel64:malta_defconfig:smp:initrd 
> > > 	mipsel64:malta_defconfig:smp:rootfs 
> > > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > > 
> > > Error is always the same.
> > > 
> > > arch/mips/kernel/process.c:637:8:
> > > 	error: 'call_single_data_t' undeclared here (not in a function)
> > > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > > 	error: 'csd' undeclared (first use in this function)
> > 
> > mips should now be fixed with the updated tree I have pushed out.
> > 
> 
> The above is with v4.9.112-33-g7fb1f5e, which is the latest version
> available from the git repository (as of right now). My builders
> pulled it at 4:07am this morning, and there was no subsequent update.

Odd.  Ok, I've bumped the -rc number to -rc2 now, and pushed it all out
again.  Let me know if you don't see it show up within an hour or so.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 17:43       ` Greg Kroah-Hartman
@ 2018-07-16 18:02         ` Guenter Roeck
  2018-07-16 18:31           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: Guenter Roeck @ 2018-07-16 18:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 07:43:32PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 09:41:23AM -0700, Guenter Roeck wrote:
> > On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> > > On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > > > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > > > This is the start of the stable review cycle for the 4.9.113 release.
> > > > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > > > Anything received after that time might be too late.
> > > > >
> > > > 
> > > > Build results:
> > > > 	total: 148 pass: 133 fail: 15
> > > > Failed builds: 
> > > > 	mips:defconfig 
> > > > 	mips:allnoconfig 
> > > > 	mips:defconfig 
> > > > 	mips:allmodconfig 
> > > > 	mips:allnoconfig 
> > > > 	mips:bcm47xx_defconfig 
> > > > 	mips:bcm63xx_defconfig 
> > > > 	mips:nlm_xlp_defconfig 
> > > > 	mips:ath79_defconfig 
> > > > 	mips:ar7_defconfig 
> > > > 	mips:e55_defconfig 
> > > > 	mips:cavium_octeon_defconfig 
> > > > 	mips:malta_defconfig 
> > > > 	mips:rt305x_defconfig 
> > > > 	mips:defconfig 
> > > > Qemu test results:
> > > > 	total: 166 pass: 154 fail: 12
> > > > Failed tests: 
> > > > 	mips:malta_defconfig:nosmp 
> > > > 	mips:malta_defconfig:smp 
> > > > 	mips64:malta_defconfig:nosmp 
> > > > 	mips64:malta_defconfig:smp 
> > > > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > > > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > > > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > > > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > > > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > > > 	mipsel64:malta_defconfig:smp:initrd 
> > > > 	mipsel64:malta_defconfig:smp:rootfs 
> > > > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > > > 
> > > > Error is always the same.
> > > > 
> > > > arch/mips/kernel/process.c:637:8:
> > > > 	error: 'call_single_data_t' undeclared here (not in a function)
> > > > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > > > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > > > 	error: 'csd' undeclared (first use in this function)
> > > 
> > > mips should now be fixed with the updated tree I have pushed out.
> > > 
> > 
> > The above is with v4.9.112-33-g7fb1f5e, which is the latest version
> > available from the git repository (as of right now). My builders
> > pulled it at 4:07am this morning, and there was no subsequent update.
> 
> Odd.  Ok, I've bumped the -rc number to -rc2 now, and pushed it all out
> again.  Let me know if you don't see it show up within an hour or so.
> 
Version is now v4.9.112-33-gb44db2b, so something changed, but I still get
the same build error.

Comparing the old and the new version, the only difference is the updated rc.

diff --git a/Makefile b/Makefile
index 57f315d00a94..986470ef6f6e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 4
 PATCHLEVEL = 9
 SUBLEVEL = 113
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME = Roaring Lionus

The error itself is that single_data_t was replaced in the backport with
call_single_data. It should have been "struct call_single_data".

Guenter

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 18:02         ` Guenter Roeck
@ 2018-07-16 18:31           ` Greg Kroah-Hartman
  2018-07-16 18:33             ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 18:31 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 11:02:19AM -0700, Guenter Roeck wrote:
> On Mon, Jul 16, 2018 at 07:43:32PM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Jul 16, 2018 at 09:41:23AM -0700, Guenter Roeck wrote:
> > > On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> > > > On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > > > > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > > > > This is the start of the stable review cycle for the 4.9.113 release.
> > > > > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > > > > Anything received after that time might be too late.
> > > > > >
> > > > > 
> > > > > Build results:
> > > > > 	total: 148 pass: 133 fail: 15
> > > > > Failed builds: 
> > > > > 	mips:defconfig 
> > > > > 	mips:allnoconfig 
> > > > > 	mips:defconfig 
> > > > > 	mips:allmodconfig 
> > > > > 	mips:allnoconfig 
> > > > > 	mips:bcm47xx_defconfig 
> > > > > 	mips:bcm63xx_defconfig 
> > > > > 	mips:nlm_xlp_defconfig 
> > > > > 	mips:ath79_defconfig 
> > > > > 	mips:ar7_defconfig 
> > > > > 	mips:e55_defconfig 
> > > > > 	mips:cavium_octeon_defconfig 
> > > > > 	mips:malta_defconfig 
> > > > > 	mips:rt305x_defconfig 
> > > > > 	mips:defconfig 
> > > > > Qemu test results:
> > > > > 	total: 166 pass: 154 fail: 12
> > > > > Failed tests: 
> > > > > 	mips:malta_defconfig:nosmp 
> > > > > 	mips:malta_defconfig:smp 
> > > > > 	mips64:malta_defconfig:nosmp 
> > > > > 	mips64:malta_defconfig:smp 
> > > > > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > > > > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > > > > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > > > > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > > > > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > > > > 	mipsel64:malta_defconfig:smp:initrd 
> > > > > 	mipsel64:malta_defconfig:smp:rootfs 
> > > > > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > > > > 
> > > > > Error is always the same.
> > > > > 
> > > > > arch/mips/kernel/process.c:637:8:
> > > > > 	error: 'call_single_data_t' undeclared here (not in a function)
> > > > > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > > > > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > > > > 	error: 'csd' undeclared (first use in this function)
> > > > 
> > > > mips should now be fixed with the updated tree I have pushed out.
> > > > 
> > > 
> > > The above is with v4.9.112-33-g7fb1f5e, which is the latest version
> > > available from the git repository (as of right now). My builders
> > > pulled it at 4:07am this morning, and there was no subsequent update.
> > 
> > Odd.  Ok, I've bumped the -rc number to -rc2 now, and pushed it all out
> > again.  Let me know if you don't see it show up within an hour or so.
> > 
> Version is now v4.9.112-33-gb44db2b, so something changed, but I still get
> the same build error.
> 
> Comparing the old and the new version, the only difference is the updated rc.
> 
> diff --git a/Makefile b/Makefile
> index 57f315d00a94..986470ef6f6e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,7 +1,7 @@
>  VERSION = 4
>  PATCHLEVEL = 9
>  SUBLEVEL = 113
> -EXTRAVERSION = -rc1
> +EXTRAVERSION = -rc2
>  NAME = Roaring Lionus
> 
> The error itself is that single_data_t was replaced in the backport with
> call_single_data. It should have been "struct call_single_data".

{sigh}  This is why I asked for a fixup patch.  Let me just go rip that
thing out now...

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 18:31           ` Greg Kroah-Hartman
@ 2018-07-16 18:33             ` Greg Kroah-Hartman
  2018-07-16 19:37               ` Guenter Roeck
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 18:33 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 08:31:20PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 11:02:19AM -0700, Guenter Roeck wrote:
> > On Mon, Jul 16, 2018 at 07:43:32PM +0200, Greg Kroah-Hartman wrote:
> > > On Mon, Jul 16, 2018 at 09:41:23AM -0700, Guenter Roeck wrote:
> > > > On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> > > > > On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > > > > > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > This is the start of the stable review cycle for the 4.9.113 release.
> > > > > > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > > > > > Anything received after that time might be too late.
> > > > > > >
> > > > > > 
> > > > > > Build results:
> > > > > > 	total: 148 pass: 133 fail: 15
> > > > > > Failed builds: 
> > > > > > 	mips:defconfig 
> > > > > > 	mips:allnoconfig 
> > > > > > 	mips:defconfig 
> > > > > > 	mips:allmodconfig 
> > > > > > 	mips:allnoconfig 
> > > > > > 	mips:bcm47xx_defconfig 
> > > > > > 	mips:bcm63xx_defconfig 
> > > > > > 	mips:nlm_xlp_defconfig 
> > > > > > 	mips:ath79_defconfig 
> > > > > > 	mips:ar7_defconfig 
> > > > > > 	mips:e55_defconfig 
> > > > > > 	mips:cavium_octeon_defconfig 
> > > > > > 	mips:malta_defconfig 
> > > > > > 	mips:rt305x_defconfig 
> > > > > > 	mips:defconfig 
> > > > > > Qemu test results:
> > > > > > 	total: 166 pass: 154 fail: 12
> > > > > > Failed tests: 
> > > > > > 	mips:malta_defconfig:nosmp 
> > > > > > 	mips:malta_defconfig:smp 
> > > > > > 	mips64:malta_defconfig:nosmp 
> > > > > > 	mips64:malta_defconfig:smp 
> > > > > > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > > > > > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > > > > > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > > > > > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > > > > > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > > > > > 	mipsel64:malta_defconfig:smp:initrd 
> > > > > > 	mipsel64:malta_defconfig:smp:rootfs 
> > > > > > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > > > > > 
> > > > > > Error is always the same.
> > > > > > 
> > > > > > arch/mips/kernel/process.c:637:8:
> > > > > > 	error: 'call_single_data_t' undeclared here (not in a function)
> > > > > > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > > > > > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > > > > > 	error: 'csd' undeclared (first use in this function)
> > > > > 
> > > > > mips should now be fixed with the updated tree I have pushed out.
> > > > > 
> > > > 
> > > > The above is with v4.9.112-33-g7fb1f5e, which is the latest version
> > > > available from the git repository (as of right now). My builders
> > > > pulled it at 4:07am this morning, and there was no subsequent update.
> > > 
> > > Odd.  Ok, I've bumped the -rc number to -rc2 now, and pushed it all out
> > > again.  Let me know if you don't see it show up within an hour or so.
> > > 
> > Version is now v4.9.112-33-gb44db2b, so something changed, but I still get
> > the same build error.
> > 
> > Comparing the old and the new version, the only difference is the updated rc.
> > 
> > diff --git a/Makefile b/Makefile
> > index 57f315d00a94..986470ef6f6e 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1,7 +1,7 @@
> >  VERSION = 4
> >  PATCHLEVEL = 9
> >  SUBLEVEL = 113
> > -EXTRAVERSION = -rc1
> > +EXTRAVERSION = -rc2
> >  NAME = Roaring Lionus
> > 
> > The error itself is that single_data_t was replaced in the backport with
> > call_single_data. It should have been "struct call_single_data".
> 
> {sigh}  This is why I asked for a fixup patch.  Let me just go rip that
> thing out now...

Ok, -rc3 is out now to hopefully resolve this.  Sorry for the noise.

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace()
  2018-07-16 10:46         ` Greg Kroah-Hartman
@ 2018-07-16 18:34           ` Greg Kroah-Hartman
  2018-07-17  6:53             ` [PATCH 4.9 03/32] MIPS: Use async IPIsforarch_trigger_cpumask_backtrace() 陈华才
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 18:34 UTC (permalink / raw)
  To: 陈华才; +Cc: linux-kernel, stable, Paul Burton, James Hogan

On Mon, Jul 16, 2018 at 12:46:21PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 05:46:12PM +0800, 陈华才 wrote:
> > Just change "call_single_data_t" to "struct call_single_data" and everything is OK.
> 
> Ok, I've done that now, thanks.

And I messed it up.  So I've just dropped it entirely.  Can someone send
me a properly backported patch please?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 18:33             ` Greg Kroah-Hartman
@ 2018-07-16 19:37               ` Guenter Roeck
  2018-07-17  7:00                 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: Guenter Roeck @ 2018-07-16 19:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 08:33:37PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 08:31:20PM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Jul 16, 2018 at 11:02:19AM -0700, Guenter Roeck wrote:
> > > On Mon, Jul 16, 2018 at 07:43:32PM +0200, Greg Kroah-Hartman wrote:
> > > > On Mon, Jul 16, 2018 at 09:41:23AM -0700, Guenter Roeck wrote:
> > > > > On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> > > > > > On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > > > > > > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > This is the start of the stable review cycle for the 4.9.113 release.
> > > > > > > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > > > > > > Anything received after that time might be too late.
> > > > > > > >
> > > > > > > 
> > > > > > > Build results:
> > > > > > > 	total: 148 pass: 133 fail: 15
> > > > > > > Failed builds: 
> > > > > > > 	mips:defconfig 
> > > > > > > 	mips:allnoconfig 
> > > > > > > 	mips:defconfig 
> > > > > > > 	mips:allmodconfig 
> > > > > > > 	mips:allnoconfig 
> > > > > > > 	mips:bcm47xx_defconfig 
> > > > > > > 	mips:bcm63xx_defconfig 
> > > > > > > 	mips:nlm_xlp_defconfig 
> > > > > > > 	mips:ath79_defconfig 
> > > > > > > 	mips:ar7_defconfig 
> > > > > > > 	mips:e55_defconfig 
> > > > > > > 	mips:cavium_octeon_defconfig 
> > > > > > > 	mips:malta_defconfig 
> > > > > > > 	mips:rt305x_defconfig 
> > > > > > > 	mips:defconfig 
> > > > > > > Qemu test results:
> > > > > > > 	total: 166 pass: 154 fail: 12
> > > > > > > Failed tests: 
> > > > > > > 	mips:malta_defconfig:nosmp 
> > > > > > > 	mips:malta_defconfig:smp 
> > > > > > > 	mips64:malta_defconfig:nosmp 
> > > > > > > 	mips64:malta_defconfig:smp 
> > > > > > > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > > > > > > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > > > > > > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > > > > > > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > > > > > > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > > > > > > 	mipsel64:malta_defconfig:smp:initrd 
> > > > > > > 	mipsel64:malta_defconfig:smp:rootfs 
> > > > > > > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > > > > > > 
> > > > > > > Error is always the same.
> > > > > > > 
> > > > > > > arch/mips/kernel/process.c:637:8:
> > > > > > > 	error: 'call_single_data_t' undeclared here (not in a function)
> > > > > > > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > > > > > > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > > > > > > 	error: 'csd' undeclared (first use in this function)
> > > > > > 
> > > > > > mips should now be fixed with the updated tree I have pushed out.
> > > > > > 
> > > > > 
> > > > > The above is with v4.9.112-33-g7fb1f5e, which is the latest version
> > > > > available from the git repository (as of right now). My builders
> > > > > pulled it at 4:07am this morning, and there was no subsequent update.
> > > > 
> > > > Odd.  Ok, I've bumped the -rc number to -rc2 now, and pushed it all out
> > > > again.  Let me know if you don't see it show up within an hour or so.
> > > > 
> > > Version is now v4.9.112-33-gb44db2b, so something changed, but I still get
> > > the same build error.
> > > 
> > > Comparing the old and the new version, the only difference is the updated rc.
> > > 
> > > diff --git a/Makefile b/Makefile
> > > index 57f315d00a94..986470ef6f6e 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -1,7 +1,7 @@
> > >  VERSION = 4
> > >  PATCHLEVEL = 9
> > >  SUBLEVEL = 113
> > > -EXTRAVERSION = -rc1
> > > +EXTRAVERSION = -rc2
> > >  NAME = Roaring Lionus
> > > 
> > > The error itself is that single_data_t was replaced in the backport with
> > > call_single_data. It should have been "struct call_single_data".
> > 
> > {sigh}  This is why I asked for a fixup patch.  Let me just go rip that
> > thing out now...
> 
> Ok, -rc3 is out now to hopefully resolve this.  Sorry for the noise.
> 
No worries. Mips images build and boot fine with v4.9.112-32-g30ce843.
I didn't rebuild the other images.

Guenter

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use async IPIsforarch_trigger_cpumask_backtrace()
  2018-07-16 18:34           ` Greg Kroah-Hartman
@ 2018-07-17  6:53             ` 陈华才
  2018-07-17  7:20               ` Greg Kroah-Hartman
  0 siblings, 1 reply; 53+ messages in thread
From: 陈华才 @ 2018-07-17  6:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, stable, Paul Burton, James Hogan

Hi, Greg,

I have backported and tested it to 4.9 and 4.4:
https://patchwork.linux-mips.org/patch/19862/
https://patchwork.linux-mips.org/patch/19863/

Huacai
 
------------------ Original ------------------
From:  "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>;
Date:  Tue, Jul 17, 2018 02:34 AM
To:  "陈华才"<chenhc@lemote.com>;
Cc:  "linux-kernel"<linux-kernel@vger.kernel.org>; "stable"<stable@vger.kernel.org>; "Paul Burton"<paul.burton@mips.com>; "James Hogan"<jhogan@kernel.org>;
Subject:  Re: [PATCH 4.9 03/32] MIPS: Use async IPIsforarch_trigger_cpumask_backtrace()
 
On Mon, Jul 16, 2018 at 12:46:21PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 05:46:12PM +0800, 陈华才 wrote:
> > Just change "call_single_data_t" to "struct call_single_data" and everything is OK.
> 
> Ok, I've done that now, thanks.

And I messed it up.  So I've just dropped it entirely.  Can someone send
me a properly backported patch please?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 13:55 ` [PATCH 4.9 00/32] 4.9.113-stable review Nathan Chancellor
@ 2018-07-17  7:00   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-17  7:00 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable

On Mon, Jul 16, 2018 at 06:55:14AM -0700, Nathan Chancellor wrote:
> On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.9.113 release.
> > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.113-rc1.gz
> > or in the git tree and branch at:
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Merged, compiled with -Werror, and installed onto my OnePlus 6.
> 
> No issues noticed in dmesg or general usage.

Thanks for testing two of these and letting me know.

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16 19:37               ` Guenter Roeck
@ 2018-07-17  7:00                 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-17  7:00 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Mon, Jul 16, 2018 at 12:37:23PM -0700, Guenter Roeck wrote:
> On Mon, Jul 16, 2018 at 08:33:37PM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Jul 16, 2018 at 08:31:20PM +0200, Greg Kroah-Hartman wrote:
> > > On Mon, Jul 16, 2018 at 11:02:19AM -0700, Guenter Roeck wrote:
> > > > On Mon, Jul 16, 2018 at 07:43:32PM +0200, Greg Kroah-Hartman wrote:
> > > > > On Mon, Jul 16, 2018 at 09:41:23AM -0700, Guenter Roeck wrote:
> > > > > > On Mon, Jul 16, 2018 at 06:31:36PM +0200, Greg Kroah-Hartman wrote:
> > > > > > > On Mon, Jul 16, 2018 at 09:25:38AM -0700, Guenter Roeck wrote:
> > > > > > > > On Mon, Jul 16, 2018 at 09:36:08AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > This is the start of the stable review cycle for the 4.9.113 release.
> > > > > > > > > There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> > > > > > > > > Anything received after that time might be too late.
> > > > > > > > >
> > > > > > > > 
> > > > > > > > Build results:
> > > > > > > > 	total: 148 pass: 133 fail: 15
> > > > > > > > Failed builds: 
> > > > > > > > 	mips:defconfig 
> > > > > > > > 	mips:allnoconfig 
> > > > > > > > 	mips:defconfig 
> > > > > > > > 	mips:allmodconfig 
> > > > > > > > 	mips:allnoconfig 
> > > > > > > > 	mips:bcm47xx_defconfig 
> > > > > > > > 	mips:bcm63xx_defconfig 
> > > > > > > > 	mips:nlm_xlp_defconfig 
> > > > > > > > 	mips:ath79_defconfig 
> > > > > > > > 	mips:ar7_defconfig 
> > > > > > > > 	mips:e55_defconfig 
> > > > > > > > 	mips:cavium_octeon_defconfig 
> > > > > > > > 	mips:malta_defconfig 
> > > > > > > > 	mips:rt305x_defconfig 
> > > > > > > > 	mips:defconfig 
> > > > > > > > Qemu test results:
> > > > > > > > 	total: 166 pass: 154 fail: 12
> > > > > > > > Failed tests: 
> > > > > > > > 	mips:malta_defconfig:nosmp 
> > > > > > > > 	mips:malta_defconfig:smp 
> > > > > > > > 	mips64:malta_defconfig:nosmp 
> > > > > > > > 	mips64:malta_defconfig:smp 
> > > > > > > > 	mipsel:24Kf:malta_defconfig:nosmp:initrd 
> > > > > > > > 	mipsel:24Kf:malta_defconfig:smp:initrd 
> > > > > > > > 	mipsel:24Kf:malta_defconfig:smp:rootfs 
> > > > > > > > 	mipsel:mips32r6-generic:malta_32r6_defconfig:smp:rootfs 
> > > > > > > > 	mipsel64:malta_defconfig:nosmp:rootfs 
> > > > > > > > 	mipsel64:malta_defconfig:smp:initrd 
> > > > > > > > 	mipsel64:malta_defconfig:smp:rootfs 
> > > > > > > > 	mipsel64:fuloong2e_defconfig:fulong2e:rootfs
> > > > > > > > 
> > > > > > > > Error is always the same.
> > > > > > > > 
> > > > > > > > arch/mips/kernel/process.c:637:8:
> > > > > > > > 	error: 'call_single_data_t' undeclared here (not in a function)
> > > > > > > > arch/mips/kernel/process.c: In function 'raise_backtrace':
> > > > > > > > /opt/buildbot/slave/stable-queue-4.9/build/arch/mips/kernel/process.c:648:22:
> > > > > > > > 	error: 'csd' undeclared (first use in this function)
> > > > > > > 
> > > > > > > mips should now be fixed with the updated tree I have pushed out.
> > > > > > > 
> > > > > > 
> > > > > > The above is with v4.9.112-33-g7fb1f5e, which is the latest version
> > > > > > available from the git repository (as of right now). My builders
> > > > > > pulled it at 4:07am this morning, and there was no subsequent update.
> > > > > 
> > > > > Odd.  Ok, I've bumped the -rc number to -rc2 now, and pushed it all out
> > > > > again.  Let me know if you don't see it show up within an hour or so.
> > > > > 
> > > > Version is now v4.9.112-33-gb44db2b, so something changed, but I still get
> > > > the same build error.
> > > > 
> > > > Comparing the old and the new version, the only difference is the updated rc.
> > > > 
> > > > diff --git a/Makefile b/Makefile
> > > > index 57f315d00a94..986470ef6f6e 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -1,7 +1,7 @@
> > > >  VERSION = 4
> > > >  PATCHLEVEL = 9
> > > >  SUBLEVEL = 113
> > > > -EXTRAVERSION = -rc1
> > > > +EXTRAVERSION = -rc2
> > > >  NAME = Roaring Lionus
> > > > 
> > > > The error itself is that single_data_t was replaced in the backport with
> > > > call_single_data. It should have been "struct call_single_data".
> > > 
> > > {sigh}  This is why I asked for a fixup patch.  Let me just go rip that
> > > thing out now...
> > 
> > Ok, -rc3 is out now to hopefully resolve this.  Sorry for the noise.
> > 
> No worries. Mips images build and boot fine with v4.9.112-32-g30ce843.
> I didn't rebuild the other images.

Wonderful, thanks for testing all of these and letting me know.

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use async IPIsforarch_trigger_cpumask_backtrace()
  2018-07-17  6:53             ` [PATCH 4.9 03/32] MIPS: Use async IPIsforarch_trigger_cpumask_backtrace() 陈华才
@ 2018-07-17  7:20               ` Greg Kroah-Hartman
  2018-07-17  8:14                 ` [PATCH 4.9 03/32] MIPS: Use asyncIPIsforarch_trigger_cpumask_backtrace() 陈华才
  0 siblings, 1 reply; 53+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-17  7:20 UTC (permalink / raw)
  To: 陈华才; +Cc: linux-kernel, stable, Paul Burton, James Hogan

On Tue, Jul 17, 2018 at 02:53:38PM +0800, 陈华才 wrote:
> Hi, Greg,
> 
> I have backported and tested it to 4.9 and 4.4:
> https://patchwork.linux-mips.org/patch/19862/
> https://patchwork.linux-mips.org/patch/19863/

I can't do anything with random web links.  Please properly cc: the
stable list with the backports and I can take them from there.

And are you sure they are needed for 4.4.y?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 00/32] 4.9.113-stable review
  2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2018-07-16 16:25 ` Guenter Roeck
@ 2018-07-17  8:05 ` Naresh Kamboju
  34 siblings, 0 replies; 53+ messages in thread
From: Naresh Kamboju @ 2018-07-17  8:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: open list, Linus Torvalds, Andrew Morton, Guenter Roeck,
	Shuah Khan, patches, Ben Hutchings, lkft-triage, linux- stable

On 16 July 2018 at 13:06, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 4.9.113 release.
> There are 32 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 Wed Jul 18 07:34:43 UTC 2018.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.113-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

> Linus Torvalds <torvalds@linux-foundation.org>
>    Fix up non-directory creation in SGID directories

( For the record, sharing the report again on 4.9 )

Results from Linaro’s test farm.
Regressions detected.

LTP syscalls failed test cases on all devices arm64, arm32 and x86_64,
 - creat08
 - open10

Reported this bug internally on upstream Linux mainline week back.
Now this bug happening on 4.17, 4.14, 4.9 and 4.4

creat08 and open10 failed with this error,
TFAIL  : testdir.B.3132/setgid: Incorrect modes, setgid bit should be set

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4.9 03/32] MIPS: Use asyncIPIsforarch_trigger_cpumask_backtrace()
  2018-07-17  7:20               ` Greg Kroah-Hartman
@ 2018-07-17  8:14                 ` 陈华才
  0 siblings, 0 replies; 53+ messages in thread
From: 陈华才 @ 2018-07-17  8:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, stable, Paul Burton, James Hogan

Hi, Greg,

I have resend patches and cc stable list.

This patch is needed for 4.4.y but need restruction, as Paul said:
Strictly speaking the faulty MIPS implementation can be
traced further back to commit 856839b76836 ("MIPS: Add
arch_trigger_all_cpu_backtrace() function") in v3.19

Huacai
 
------------------ Original ------------------
From:  "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>;
Date:  Tue, Jul 17, 2018 03:20 PM
To:  "陈华才"<chenhc@lemote.com>;
Cc:  "linux-kernel"<linux-kernel@vger.kernel.org>; "stable"<stable@vger.kernel.org>; "Paul Burton"<paul.burton@mips.com>; "James Hogan"<jhogan@kernel.org>;
Subject:  Re: [PATCH 4.9 03/32] MIPS: Use asyncIPIsforarch_trigger_cpumask_backtrace()
 
On Tue, Jul 17, 2018 at 02:53:38PM +0800, 陈华才 wrote:
> Hi, Greg,
> 
> I have backported and tested it to 4.9 and 4.4:
> https://patchwork.linux-mips.org/patch/19862/
> https://patchwork.linux-mips.org/patch/19863/

I can't do anything with random web links.  Please properly cc: the
stable list with the backports and I can take them from there.

And are you sure they are needed for 4.4.y?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2018-07-17  8:15 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16  7:36 [PATCH 4.9 00/32] 4.9.113-stable review Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 01/32] nvme: validate admin queue before unquiesce Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 02/32] MIPS: Call dump_stack() from show_regs() Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 03/32] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace() Greg Kroah-Hartman
2018-07-16  9:29   ` 陈华才
2018-07-16  9:40     ` [PATCH " Greg Kroah-Hartman
2018-07-16  9:46       ` [PATCH 4.9 03/32] MIPS: Use async IPIs forarch_trigger_cpumask_backtrace() 陈华才
2018-07-16 10:46         ` Greg Kroah-Hartman
2018-07-16 18:34           ` Greg Kroah-Hartman
2018-07-17  6:53             ` [PATCH 4.9 03/32] MIPS: Use async IPIsforarch_trigger_cpumask_backtrace() 陈华才
2018-07-17  7:20               ` Greg Kroah-Hartman
2018-07-17  8:14                 ` [PATCH 4.9 03/32] MIPS: Use asyncIPIsforarch_trigger_cpumask_backtrace() 陈华才
2018-07-16  7:36 ` [PATCH 4.9 04/32] MIPS: Fix ioremap() RAM check Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 05/32] mmc: dw_mmc: fix card threshold control configuration Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 06/32] ibmasm: dont write out of bounds in read handler Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 07/32] ata: Fix ZBC_OUT command block check Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 08/32] ata: Fix ZBC_OUT all bit handling Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 09/32] vmw_balloon: fix inflation with batching Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 10/32] ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 11/32] USB: serial: ch341: fix type promotion bug in ch341_control_in() Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 12/32] USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 13/32] USB: serial: keyspan_pda: fix modem-status error handling Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 14/32] USB: yurex: fix out-of-bounds uaccess in read handler Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 15/32] USB: serial: mos7840: fix status-register error handling Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 16/32] usb: quirks: add delay quirks for Corsair Strafe Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 17/32] xhci: xhci-mem: off by one in xhci_stream_id_to_ring() Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 18/32] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 19/32] Fix up non-directory creation in SGID directories Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 20/32] ALSA: hda - Handle pm failure during hotplug Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 21/32] fs, elf: make sure to page align bss in load_elf_library Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 22/32] tools build: fix # escaping in .cmd files for future Make Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 23/32] i2c: tegra: Fix NACK error handling Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 24/32] iw_cxgb4: correctly enforce the max reg_mr depth Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 25/32] nvme-pci: Remap CMB SQ entries on every controller reset Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 26/32] uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn() Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 27/32] netfilter: nf_queue: augment nfqa_cfg_policy Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 28/32] netfilter: x_tables: initialise match/target check parameter struct Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 29/32] loop: add recursion validation to LOOP_CHANGE_FD Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 30/32] PM / hibernate: Fix oops at snapshot_write() Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 31/32] RDMA/ucm: Mark UCM interface as BROKEN Greg Kroah-Hartman
2018-07-16  7:36 ` [PATCH 4.9 32/32] loop: remember whether sysfs_create_group() was done Greg Kroah-Hartman
2018-07-16 13:55 ` [PATCH 4.9 00/32] 4.9.113-stable review Nathan Chancellor
2018-07-17  7:00   ` Greg Kroah-Hartman
2018-07-16 16:25 ` Guenter Roeck
2018-07-16 16:31   ` Greg Kroah-Hartman
2018-07-16 16:41     ` Guenter Roeck
2018-07-16 17:43       ` Greg Kroah-Hartman
2018-07-16 18:02         ` Guenter Roeck
2018-07-16 18:31           ` Greg Kroah-Hartman
2018-07-16 18:33             ` Greg Kroah-Hartman
2018-07-16 19:37               ` Guenter Roeck
2018-07-17  7:00                 ` Greg Kroah-Hartman
2018-07-17  8:05 ` Naresh Kamboju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).