Re: m68k boot failure in -next bisected to 'xarray: Replace exceptional entries'

From: Guenter Roeck
Date: Sat Jun 23 2018 - 22:52:45 EST


On 06/23/2018 06:17 PM, Matthew Wilcox wrote:
On Fri, Jun 22, 2018 at 03:33:35PM -0700, Guenter Roeck wrote:
It may be odd that fs/quota/netlink.c:quota_genl_family is not word
aligned, but on the other side I don't think there is a rule that
the function parameter to genl_register_family() - or the second
parameter of idr_alloc() - must be word aligned. Am I missing
something ? After all, it could be a pointer to the nth element
of a string, or the caller could on purpose allocate IDRs for
(ptr), (ptr + 1), and so on.

This is probably going to cure the problem for you (apply on top
of the existing radix tree / IDR changes).

I realised when I was reviewing the patch that it's no good; if you
call idr_replace() with a radix_tree_is_internal_node(), then you'll
still get a crash. I'm going to have to disable the optimisation of
shrinking the tree all the way into the head for the IDR. But this
will probably get m68k working again.


It doesn't crash anymore, but there is still a backtrace.

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at lib/idr.c:250 idr_get_next+0x62/0x82
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.18.0-rc1-next-20180622-mac-00001-g6731a81057be-dirty #1
Stack from 07c19e28:
07c19e28 0036d5b2 000180d6 00000000 0036e0d6 0055a040 00000000 000020e8
07c19eb0 002b5326 0001816a 0036d5b5 000000fa 002b5388 00000009 00000000
00000000 00340b1d 002b5388 0036d5b5 000000fa 00000401 0036e0d6 80000000
00000000 00036fa0 0036ddc0 07c19eb0 00246164 003abf1c 07c19eb0 00036fa0
0036e0ce 07c19f8c 00000011 00246f04 0036e0d6 003abf34 00000400 00000006
0055a040 00000000 000020e8 00000000 00036fa0 003ff8e0 003f751c 07c19f8c
Call Trace: [<000180d6>] __warn+0xc0/0xc2
[<000020e8>] do_one_initcall+0x0/0x140
[<002b5326>] idr_get_next+0x0/0x82
[<0001816a>] warn_slowpath_null+0x26/0x2c
[<002b5388>] idr_get_next+0x62/0x82
[<002b5388>] idr_get_next+0x62/0x82
[<00036fa0>] printk+0x0/0x18
[<00246164>] genl_family_find_byname+0x1c/0x4c
[<00036fa0>] printk+0x0/0x18
[<00246f04>] genl_register_family+0x74/0x55c
[<000020e8>] do_one_initcall+0x0/0x140

Guenter