<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/nubus, branch v7.0-rc7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-22T01:09:51+00:00</updated>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>nubus: Call put_device() in bus initialization error path</title>
<updated>2026-01-26T11:26:01+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2025-12-13T07:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f16a9577b7d3643456c68621325eb594142a3506'/>
<id>urn:sha1:f16a9577b7d3643456c68621325eb594142a3506</id>
<content type='text'>
The error path for bus initialization is missing a call to put_device().
Add that call.  This error path will probably never actually execute,
but any kernel source code may be subject to static checking or re-use.

Cc: Haoxiang Li &lt;lihaoxiang@isrc.iscas.ac.cn&gt;
Cc: Daniel Palmer &lt;daniel@0x0f.com&gt;
Suggested-by: Haoxiang Li &lt;lihaoxiang@isrc.iscas.ac.cn&gt;
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://patch.msgid.link/478d5f080d74b6688c9e3f9132e3fe251e997ad7.1765610469.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Make nubus_bus_type static and constant</title>
<updated>2024-01-03T12:33:59+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-12-19T15:47:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a15f2d48c6f84ae0dd2000288592c79d5d1acd0e'/>
<id>urn:sha1:a15f2d48c6f84ae0dd2000288592c79d5d1acd0e</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move the nubus_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

It's also never used outside of drivers/nubus/bus.c so make it static
and don't export it as no one is using it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/2023121940-enlarged-editor-c9a8@gregkh
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Don't list slot resources by default</title>
<updated>2023-05-22T11:51:56+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2023-05-16T01:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72b44f6577f15f37fe964c8dcc42a7c5736e604c'/>
<id>urn:sha1:72b44f6577f15f37fe964c8dcc42a7c5736e604c</id>
<content type='text'>
Some Nubus card ROMs contain many slot resources. A single Radius video
card produced well over a thousand entries under /proc/bus/nubus/.
Populating /proc/bus/nubus/ on a slow machine with several such cards
installed takes long enough that the user may think that the system is
wedged. All those procfs entries also consume significant RAM though
they are not normally needed (except by developers).
Omit these resources from /proc/bus/nubus/ by default and add a kernel
parameter to enable them when needed.
On the test machine, this saved 300 kB and 10 seconds.

Cc: Brad Boyer &lt;flar@allandria.com&gt;
Reviewed-by: Brad Boyer &lt;flar@allandria.com&gt;
Tested-by: Stan Johnson &lt;userm57@yahoo.com&gt;
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/71ed7fb234a5f7381a50253b0d841a656d53e64c.1684200125.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Remove proc entries before adding them</title>
<updated>2023-05-22T11:51:48+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2023-03-22T00:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7629ce6f492eb2d48b9ee1dab5980c7278514c1'/>
<id>urn:sha1:b7629ce6f492eb2d48b9ee1dab5980c7278514c1</id>
<content type='text'>
The config ROMs on some Nubus cards contain mistakes such as resource
duplication. This results in a warning from proc_register():

    NuBus: Scanning NuBus slots.
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:376 proc_register+0xbc/0xda
    proc_dir_entry '24/5' already registered
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Not tainted 6.1.0-5-m68k #1  Debian 6.1.12-1
    Stack from 00829d18:
            00829d18 00451507 00451507 00000000 00000009 0038c57c 00451507 00386bae
            00442945 0045f062 00000178 00868580 00868f50 00386c42 0045f062 00000178
            00166fc8 00000009 00000000 00829d78 008685e4 0037f9ec 00000025 00248808
            0045f0df 00829d94 00166fc8 0045f062 00000178 00000009 0045f0df 008689e4
            008685e4 fafe3a20 00868980 00829df3 00829e32 00000024 00829dc0 00167332
            00868980 00868580 00829e40 00248d36 00829df3 00008124 00868980 00248b0c
    Call Trace: [&lt;0038c57c&gt;] dump_stack+0xc/0x10
     [&lt;00386bae&gt;] __warn+0x70/0xbc
     [&lt;00386c42&gt;] warn_slowpath_fmt+0x48/0x66
     [&lt;00166fc8&gt;] proc_register+0xbc/0xda
     [&lt;0037f9ec&gt;] memcmp+0x0/0x56
     [&lt;00248808&gt;] nubus_get_rsrc_str+0x0/0x5e
     [&lt;00166fc8&gt;] proc_register+0xbc/0xda
     [&lt;00167332&gt;] proc_create_single_data+0x40/0x48
     [&lt;00248d36&gt;] nubus_proc_add_rsrc_mem+0x68/0xa4
     [&lt;00008124&gt;] amiga_mksound+0xb8/0xc8
     [&lt;00248b0c&gt;] nubus_proc_rsrc_show+0x0/0xa4
     [&lt;00386180&gt;] memset+0x0/0x94
     [&lt;0024864a&gt;] nubus_readdir+0x0/0x66
     [&lt;00560f35&gt;] nubus_get_vendorinfo.isra.0+0x87/0x10e
     [&lt;00560fb4&gt;] nubus_get_vendorinfo.isra.0+0x106/0x10e
     [&lt;00248d72&gt;] nubus_proc_add_rsrc+0x0/0x8e
     [&lt;001f6f50&gt;] __dynamic_pr_debug+0x0/0x96
     [&lt;0038741e&gt;] _printk+0x0/0x18
     [&lt;0016fafe&gt;] kernfs_link_sibling+0x9a/0xaa
     [&lt;00561cb0&gt;] nubus_init+0x660/0x79c
     [&lt;0037f7c6&gt;] strcpy+0x0/0x1c
     [&lt;0003f58c&gt;] parse_args+0x0/0x308
     [&lt;00002104&gt;] do_one_initcall+0x0/0x184
     [&lt;00561650&gt;] nubus_init+0x0/0x79c
     [&lt;00010000&gt;] frc1_dst+0xe/0x14
     [&lt;00002172&gt;] do_one_initcall+0x6e/0x184
     [&lt;0037f7c6&gt;] strcpy+0x0/0x1c
     [&lt;0003f58c&gt;] parse_args+0x0/0x308
     [&lt;00002104&gt;] do_one_initcall+0x0/0x184
     [&lt;0054b25c&gt;] kernel_init_freeable+0x192/0x19c
     [&lt;00561650&gt;] nubus_init+0x0/0x79c
     [&lt;0038c6c4&gt;] kernel_init+0x0/0xec
     [&lt;0038c6d8&gt;] kernel_init+0x14/0xec
     [&lt;0038c6c4&gt;] kernel_init+0x0/0xec
     [&lt;0000297c&gt;] ret_from_kernel_thread+0xc/0x14

    ---[ end trace 0000000000000000 ]---

This particular card (a Radius video card) contains a duplicated resource
hence the /proc/bus/nubus/a/1/24/5 entry got registered twice.
(A date resource has ID 5, the vendor info directory has ID 24)

The solution for this is to remove a potentially pre-existing entry before
adding the procfs entry for the resource.

Reported-and-tested-by: Stan Johnson &lt;userm57@yahoo.com&gt;
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/dd1b560bbe426b351cdbb3bbf89414753c3d0117.1679446472.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Partially revert proc_create_single_data() conversion</title>
<updated>2023-05-22T11:51:47+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2023-03-14T08:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e96647cff9224db564a1cee6efccb13dbe11ee2'/>
<id>urn:sha1:0e96647cff9224db564a1cee6efccb13dbe11ee2</id>
<content type='text'>
The conversion to proc_create_single_data() introduced a regression
whereby reading a file in /proc/bus/nubus results in a seg fault:

    # grep -r . /proc/bus/nubus/e/
    Data read fault at 0x00000020 in Super Data (pc=0x1074c2)
    BAD KERNEL BUSERR
    Oops: 00000000
    Modules linked in:
    PC: [&lt;001074c2&gt;] PDE_DATA+0xc/0x16
    SR: 2010  SP: 38284958  a2: 01152370
    d0: 00000001    d1: 01013000    d2: 01002790    d3: 00000000
    d4: 00000001    d5: 0008ce2e    a0: 00000000    a1: 00222a40
    Process grep (pid: 45, task=142f8727)
    Frame format=B ssw=074d isc=2008 isb=4e5e daddr=00000020 dobuf=01199e70
    baddr=001074c8 dibuf=ffffffff ver=f
    Stack from 01199e48:
	    01199e70 00222a58 01002790 00000000 011a3000 01199eb0 015000c0 00000000
	    00000000 01199ec0 01199ec0 000d551a 011a3000 00000001 00000000 00018000
	    d003f000 00000003 00000001 0002800d 01052840 01199fa8 c01f8000 00000000
	    00000029 0b532b80 00000000 00000000 00000029 0b532b80 01199ee4 00103640
	    011198c0 d003f000 00018000 01199fa8 00000000 011198c0 00000000 01199f4c
	    000b3344 011198c0 d003f000 00018000 01199fa8 00000000 00018000 011198c0
    Call Trace: [&lt;00222a58&gt;] nubus_proc_rsrc_show+0x18/0xa0
     [&lt;000d551a&gt;] seq_read+0xc4/0x510
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;0002800d&gt;] __sys_setreuid+0x115/0x1c6
     [&lt;00103640&gt;] proc_reg_read+0x5c/0xb0
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b3344&gt;] __vfs_read+0x2c/0x13c
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b8aa2&gt;] sys_statx+0x60/0x7e
     [&lt;000b34b6&gt;] vfs_read+0x62/0x12a
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b39c2&gt;] ksys_read+0x48/0xbe
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b3a4e&gt;] sys_read+0x16/0x1a
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;00002b84&gt;] syscall+0x8/0xc
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;0000c016&gt;] not_ext+0xa/0x18
    Code: 4e5e 4e75 4e56 0000 206e 0008 2068 ffe8 &lt;2068&gt; 0020 2008 4e5e 4e75 4e56 0000 2f0b 206e 0008 2068 0004 2668 0020 206b ffe8
    Disabling lock debugging due to kernel taint

    Segmentation fault

The proc_create_single_data() conversion does not work because
single_open(file, nubus_proc_rsrc_show, PDE_DATA(inode)) is not
equivalent to the original code.

Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}")
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org # 5.6+
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/d4e2a586e793cc8d9442595684ab8a077c0fe726.1678783919.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Drop noop match function</title>
<updated>2023-03-20T14:39:14+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-13T18:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f400a1dc29f3ed6cb0fe0e58f706b6933f72625'/>
<id>urn:sha1:7f400a1dc29f3ed6cb0fe0e58f706b6933f72625</id>
<content type='text'>
nubus_bus_match() returned 1 unconditionally. This is equivalent to
no match function at all. (See driver_match_device() which does:

	return drv-&gt;bus-&gt;match ? drv-&gt;bus-&gt;match(dev, drv) : 1;

.)

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230313180848.2770504-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>proc: remove PDE_DATA() completely</title>
<updated>2022-01-22T06:33:37+00:00</updated>
<author>
<name>Muchun Song</name>
<email>songmuchun@bytedance.com</email>
</author>
<published>2022-01-22T06:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa'/>
<id>urn:sha1:359745d78351c6f5442435f81549f0207ece28aa</id>
<content type='text'>
Remove PDE_DATA() completely and replace it with pde_data().

[akpm@linux-foundation.org: fix naming clash in drivers/nubus/proc.c]
[akpm@linux-foundation.org: now fix it properly]

Link: https://lkml.kernel.org/r/20211124081956.87711-2-songmuchun@bytedance.com
Signed-off-by: Muchun Song &lt;songmuchun@bytedance.com&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Alexey Gladkov &lt;gladkov.alexey@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nubus: Simplify check in remove callback</title>
<updated>2021-08-05T12:37:03+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-07-30T19:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67'/>
<id>urn:sha1:f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67</id>
<content type='text'>
The driver core only calls a remove callback when the device was
successfully bound (aka probed) before. So dev-&gt;driver is never NULL and
the respective check can just be dropped.

Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210730191035.1455248-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
