Re: [PATCH 4.14 00/14] 4.14.230-rc1 review

From: Guenter Roeck
Date: Sat Apr 10 2021 - 00:53:18 EST


On Fri, Apr 09, 2021 at 01:13:06PM -0700, Guenter Roeck wrote:
> On Fri, Apr 09, 2021 at 11:53:25AM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.14.230 release.
> > There are 14 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 Sun, 11 Apr 2021 09:52:52 +0000.
> > Anything received after that time might be too late.
> >
>
> Build results:
> total: 168 pass: 168 fail: 0
> Qemu test results:
> total: 408 pass: 408 fail: 0
>
> Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
>
> Having said this, I did see a spurious crash, and I see an unusual warning.
> I have seen the crash only once, but the warning happens with every boot.
> These are likely not new but exposed because I added network interface
> tests. This is all v4.14.y specific; I did not see it in other branches.
> See below for the tracebacks. Maybe someone has seen it before.
>
> Thanks,
> Guenter
>
> ---
> ftgmac100 1e660000.ethernet eth0: NCSI interface down
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 477 at drivers/base/dma-mapping.c:325 remap_allocator_free+0x54/0x5c
> trying to free invalid coherent area: 909a1000
> Modules linked in:
> CPU: 0 PID: 477 Comm: ip Not tainted 4.14.230-rc1-00015-gbbc0ac1df344 #1
> Hardware name: Generic DT based system
> [<8000f8dc>] (unwind_backtrace) from [<8000d194>] (show_stack+0x10/0x14)
> [<8000d194>] (show_stack) from [<805a5a80>] (__warn+0xc0/0xf4)
> [<805a5a80>] (__warn) from [<800177b4>] (warn_slowpath_fmt+0x38/0x48)
> [<800177b4>] (warn_slowpath_fmt) from [<80010554>] (remap_allocator_free+0x54/0x5c)
> [<80010554>] (remap_allocator_free) from [<80010e4c>] (__arm_dma_free.constprop.0+0xec/0x13c)
> [<80010e4c>] (__arm_dma_free.constprop.0) from [<80429924>] (ftgmac100_free_rings+0x17c/0x1f8)
> [<80429924>] (ftgmac100_free_rings) from [<80429a24>] (ftgmac100_stop+0x84/0xa4)
> [<80429a24>] (ftgmac100_stop) from [<804e8a70>] (__dev_close_many+0xac/0x100)
> [<804e8a70>] (__dev_close_many) from [<804f0dc0>] (__dev_change_flags+0xb4/0x1a0)
> [<804f0dc0>] (__dev_change_flags) from [<804f0ec4>] (dev_change_flags+0x18/0x48)
> [<804f0ec4>] (dev_change_flags) from [<80561644>] (devinet_ioctl+0x6cc/0x808)
> [<80561644>] (devinet_ioctl) from [<804d1548>] (sock_ioctl+0x188/0x2e4)
> [<804d1548>] (sock_ioctl) from [<800eac80>] (do_vfs_ioctl+0x3a0/0x82c)
> [<800eac80>] (do_vfs_ioctl) from [<800eb140>] (SyS_ioctl+0x34/0x60)
> [<800eb140>] (SyS_ioctl) from [<8000a600>] (ret_fast_syscall+0x0/0x28)
> ---[ end trace c13f2f82f69274ad ]---
>
> =====
>
> ftgmac100 1e660000.ethernet eth0: NCSI interface up
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> pgd = 9ec84000
> [00000000] *pgd=9f7f6831, *pte=00000000, *ppte=00000000
> Internal error: Oops: 17 [#1] ARM
> Modules linked in:
> CPU: 0 PID: 397 Comm: default.script Not tainted 4.14.230-rc1-00015-gbbc0ac1df344 #1
> Hardware name: Generic DT based system
> task: 9f5cc260 task.stack: 9ecee000
> PC is at anon_vma_clone+0x64/0x19c
> LR is at fs_reclaim_release+0x8/0x18
> pc : [<800c1ccc>] lr : [<80098b5c>] psr: a0000153
> sp : 9ecefe78 ip : 00000000 fp : ffffffff
> r10: 01000200 r9 : 9f7e6d10 r8 : 80cb9a44
> r7 : 9f7e0da0 r6 : 9f7e6d10 r5 : 9ed0f600 r4 : 9f5a562c
> r3 : 00000030 r2 : 9fbdf618 r1 : 00000034 r0 : 9ed0f600
> Flags: NzCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment user
> Control: 00c5387d Table: 9ec84008 DAC: 00000055
> Process default.script (pid: 397, stack limit = 0x9ecee188)
> Stack: (0x9ecefe78 to 0x9ecf0000)
> fe60: 9f5a303c 9f5a3000
> fe80: 00000002 9f7e0da0 9f7e0ab4 9f5a3000 9f77e600 9f7e0da0 9f5a3000 9f77e400
> fea0: 9f72dc64 800c1e28 9f7e0ab0 9f7e0ab4 00000002 9f77e600 9f7e0da0 800161f8
> fec0: 9f5cc640 cacd966c 9f5cc260 cd397f94 80cb0afc 00000000 80016870 00000000
> fee0: 00000000 9f69f2f8 9f7e0aa8 807ca224 9f7e0aa0 9f72dc70 9f69f100 00000011
> ff00: 9f77e658 9f77e458 9eceff08 9eceff08 9f5cc650 00000011 7eb26888 00000000
> ff20: 00000000 00000000 9ecee000 00000000 76eff3a0 80016870 00000000 00000000
> ff40: ffffffff 7eb26888 9eceff78 00000000 9ecee000 76ec4a28 7eb26888 9eceff78
> ff60: 00000000 7eb26888 00000008 00000000 00000008 800245e4 76efdcd0 7eb26888
> ff80: 00000000 00000002 8000a704 9ecee000 00000000 80016cd4 00000000 00000000
> ffa0: 9ecee000 8000a520 76efdcd0 7eb26888 76efffcc 00000001 76efe7ac 00000000
> ffc0: 76efdcd0 7eb26888 00000000 00000002 7eb26918 76efe000 76f00c60 76eff3a0
> ffe0: 000e0350 7eb26888 76e96b94 76e96b98 60000150 76efffcc 00000000 00000000
> [<800c1ccc>] (anon_vma_clone) from [<800c1e28>] (anon_vma_fork+0x24/0x138)
> [<800c1e28>] (anon_vma_fork) from [<800161f8>] (copy_process.part.0+0x12a4/0x17dc)
> [<800161f8>] (copy_process.part.0) from [<80016870>] (_do_fork+0xa0/0x488)
> [<80016870>] (_do_fork) from [<80016cd4>] (sys_fork+0x24/0x2c)
> [<80016cd4>] (sys_fork) from [<8000a520>] (ret_fast_syscall+0x0/0x4c)
> Code: eb001f58 e2505000 0a000017 e594b004 (e59b9000)
> ---[ end trace 6680cdd56c4514b7 ]---
>

Hmm, turns out those are a bit more severe than I thought. The fix for both
the crash and the warning is commit 062b3e1b6d4f ("net/ncsi: Refactor MAC,
VLAN filters"). Unfortunately, that commit does not apply on its own.
The following sequence of commits on top of v4.14.y fixes the problem
for me.

5a6d80034471 net/ncsi: Make local function ncsi_get_filter() static
9ef8690be13d net/ncsi: Improve general state logging
04bad8bda9e2 net/ncsi: Don't return error on normal response
955dc68cb9b2 net/ncsi: Add generic netlink family
062b3e1b6d4f net/ncsi: Refactor MAC, VLAN filters

Guenter