<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/drivers/char/ipmi, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-07-02T11:46:53+00:00</updated>
<entry>
<title>ipmi: si: Fix NULL pointer dereference after failed registration</title>
<updated>2026-07-02T11:46:53+00:00</updated>
<author>
<name>Seiji Nishikawa</name>
<email>snishika@redhat.com</email>
</author>
<published>2026-06-30T17:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6d920a75df9a83ab096b3cde7a643b656e4fdfeb'/>
<id>urn:sha1:6d920a75df9a83ab096b3cde7a643b656e4fdfeb</id>
<content type='text'>
try_smi_init() allocates new_smi-&gt;si_sm and later calls
ipmi_register_smi_mod(), which maps to ipmi_add_smi().

During ipmi_add_smi(), the upper IPMI message handler obtains the
initial BMC device information through __bmc_get_device_id(). This can
fail if the BMC does not return a successful response to the Get Device
ID command.

When the BMC returns a nonzero completion code, the device-id helper
retries the command and eventually returns -EIO if the device ID still
cannot be fetched.

On this failure path, ipmi_add_smi() logs "Unable to get the device id"
and goes to out_err_started, where it invokes the lower driver's
shutdown callback. try_smi_init() then logs the returned registration
failure:

 ipmi_si IPI0001:00: IPMI message handler: Unable to get the device id: -5
 ipmi_si IPI0001:00: Unable to register device: error -5

For ipmi_si, the shutdown callback is shutdown_smi(), which cleans up
the SI state machine data, frees smi_info-&gt;si_sm, and sets
smi_info-&gt;si_sm and smi_info-&gt;intf to NULL.

However, intf-&gt;in_shutdown is not set on this failed-registration
rollback path. Therefore, the asynchronous redo_bmc_reg work item can
still retry BMC device-id probing after the lower driver has already
cleared its SI state machine data. In the observed case, that retry path
reached start_next_msg(), which passed the NULL smi_info-&gt;si_sm pointer
to the selected KCS state machine handler:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
Workqueue: events redo_bmc_reg [ipmi_msghandler]
RIP: start_kcs_transaction+0x2c/0x190 [ipmi_si]
Call Trace:
 start_next_msg+0x50/0x80 [ipmi_si]
 check_start_timer_thread.part.9+0x3b/0x50 [ipmi_si]
 sender+0x69/0x80 [ipmi_si]
 i_ipmi_request+0x2ac/0x9d0 [ipmi_msghandler]
 __get_device_id.isra.29+0xaa/0x180 [ipmi_msghandler]
 __bmc_get_device_id+0xef/0x950 [ipmi_msghandler]
 redo_bmc_reg+0x52/0x60 [ipmi_msghandler]
 process_one_work+0x1a7/0x360

Set intf-&gt;in_shutdown on the out_err_started path before invoking the
lower driver's shutdown callback. This prevents later redo_bmc_reg
retries from using an interface whose lower driver state has been
cleaned up, and applies the same shutdown state to other IPMI interfaces
as well.

Fixes: 2512e40e48d2 ("ipmi: Rework SMI registration failure")
Cc: stable@vger.kernel.org
Signed-off-by: Seiji Nishikawa &lt;snishika@redhat.com&gt;
Message-ID: &lt;20260630174348.1483814-1-snishika@redhat.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: ipmb: validate write message length</title>
<updated>2026-07-02T11:46:25+00:00</updated>
<author>
<name>Yousef Alhouseen</name>
<email>alhouseenyousef@gmail.com</email>
</author>
<published>2026-06-24T17:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=53637506884dbd5c91a89b1a3547d99d80f8ed2c'/>
<id>urn:sha1:53637506884dbd5c91a89b1a3547d99d80f8ed2c</id>
<content type='text'>
ipmb_write() read message fields before validating the length byte.

A zero or short write can read uninitialized stack bytes.

A length smaller than the SMBus header underflows the block write length.

Require a non-empty buffer and the minimum IPMB request length.

Also require the length byte plus payload before parsing the message.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Cc: stable@vger.kernel.org
Signed-off-by: Yousef Alhouseen &lt;alhouseenyousef@gmail.com&gt;
Message-ID: &lt;20260624175353.8592-1-alhouseenyousef@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: Drop unused assignment of platform_device_id driver data</title>
<updated>2026-06-16T19:26:36+00:00</updated>
<author>
<name>Uwe Kleine-König (The Capable Hub)</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2026-06-16T14:29:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9961c88b1cfb444ee03e9c1641cf170e9684c532'/>
<id>urn:sha1:9961c88b1cfb444ee03e9c1641cf170e9684c532</id>
<content type='text'>
The driver explicitly sets the .driver_data member of struct
platform_device_id to zero without relying on that value. Drop these
unused assignments.

Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
Message-ID: &lt;9afdb7b0894f51fba78c64612428f7bb117901d1.1781620139.git.u.kleine-koenig@baylibre.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: si: Use platform_get_irq_optional() to retrieve interrupt</title>
<updated>2026-06-04T11:19:19+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-06-03T19:25:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39851b7e580a65bee732e5364f0efb974b242370'/>
<id>urn:sha1:39851b7e580a65bee732e5364f0efb974b242370</id>
<content type='text'>
Use platform_get_irq_optional() to retrieve the interrupt resource
instead of directly parsing and mapping the OF node via
irq_of_parse_and_map().  This is the standard pattern for platform
devices.  irq_of_parse_and_map() requires ire_dispose_mapping(), which
is missing.

Assisted-by: Antigravity:Gemini-3.5-Flash
Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Message-ID: &lt;20260603192511.6869-1-rosenp@gmail.com&gt;
[Handle a negative return from platform_get_irq_optional() to mean
 no interrupt is assigned.]
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: fix refcount leak in i_ipmi_request()</title>
<updated>2026-06-03T12:20:31+00:00</updated>
<author>
<name>Wentao Liang</name>
<email>vulab@iscas.ac.cn</email>
</author>
<published>2026-06-03T12:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a3f3859cecacb64f18fd446271ece9a3b3f2d4de'/>
<id>urn:sha1:a3f3859cecacb64f18fd446271ece9a3b3f2d4de</id>
<content type='text'>
When a caller provides a `supplied_recv` message to i_ipmi_request(),
the function increments the user's `nr_msgs` reference count. If an
error occurs later, the out_err cleanup path only frees the recv_msg
if the function allocated it itself (i.e., !supplied_recv). In the
supplied_recv case the cleanup is skipped, leaving the reference count
elevated. The caller ipmi_request_supply_msgs() does not release the
supplied_recv on error, so the reference is permanently leaked.

Fix this by explicitly reverting the reference count operations when a
supplied recv_msg with a valid user pointer is present in the error
path: decrement nr_msgs and drop the user's kref.

Cc: stable@vger.kernel.org
Fixes: b52da4054ee0 ("ipmi: Rework user message limit handling")
Signed-off-by: Wentao Liang &lt;vulab@iscas.ac.cn&gt;
Message-ID: &lt;20260603120634.3758747-1-vulab@iscas.ac.cn&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi:ssif: Drop unused assignment of platform_device_id driver data</title>
<updated>2026-05-29T17:00:05+00:00</updated>
<author>
<name>Uwe Kleine-König (The Capable Hub)</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2026-05-29T11:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1aec36f2f362e4e6d25413113fc363c2c57a9aa0'/>
<id>urn:sha1:1aec36f2f362e4e6d25413113fc363c2c57a9aa0</id>
<content type='text'>
The driver explicitly set the .driver_data member of struct
platform_device_id to zero without relying on that value. Drop this
unused assignments.

While touching this array use a named initializer for assigning .name.

Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
Message-ID: &lt;5966a65daf432613a58af373af79c9c4421b3985.1780052427.git.u.kleine-koenig@baylibre.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix user refcount underflow in event delivery</title>
<updated>2026-05-21T14:15:00+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>mfleming@cloudflare.com</email>
</author>
<published>2026-05-21T13:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6aa9e61c46465d231e9beddf56af7effd71be682'/>
<id>urn:sha1:6aa9e61c46465d231e9beddf56af7effd71be682</id>
<content type='text'>
ipmi_alloc_recv_msg(user) takes the temporary user reference owned by the
receive message, and ipmi_free_recv_msg() drops it again. If event delivery
fails after allocating receive messages for earlier users,
handle_read_event_rsp() rolls those messages back with
ipmi_free_recv_msg().

That rollback path still drops user-&gt;refcount explicitly after freeing each
message. The extra put can free a user that remains linked on intf-&gt;users,
so later event delivery may dereference a freed user or trip refcount_t's
addition-on-zero warning when ipmi_alloc_recv_msg() tries to acquire
another reference.

Remove the stale explicit put and the now-dead user assignment. Keep the
list_del() and ipmi_free_recv_msg() calls; they are the required rollback
operations.

Fixes: b52da4054ee0 ("ipmi: Rework user message limit handling")
Cc: stable@vger.kernel.org # v6.18+
Signed-off-by: Matt Fleming &lt;mfleming@cloudflare.com&gt;
Message-ID: &lt;20260521130628.3641050-1-matt@readmodwrite.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: Use named initializers for struct i2c_device_id</title>
<updated>2026-05-19T17:32:40+00:00</updated>
<author>
<name>Uwe Kleine-König (The Capable Hub)</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2026-05-19T15:01:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8a8ba84886c905bd43dbdc3b3f78c7ba8f8661f3'/>
<id>urn:sha1:8a8ba84886c905bd43dbdc3b3f78c7ba8f8661f3</id>
<content type='text'>
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

While touching these arrays, unify usage of whitespace in the list
terminator.

Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
Message-ID: &lt;20260519150156.1590826-2-u.kleine-koenig@baylibre.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: Use LIST_HEAD() to initialize on stack list head</title>
<updated>2026-05-19T11:32:46+00:00</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@kernel.org</email>
</author>
<published>2026-05-19T05:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cc3f0c66183022444c1ff35ad6885127200eb921'/>
<id>urn:sha1:cc3f0c66183022444c1ff35ad6885127200eb921</id>
<content type='text'>
Use LIST_HEAD to initialize on stack list head. No intentional
functional impact.

Change generated with below coccinelle script:

@@
identifier name;
@@
- struct list_head name;
+ LIST_HEAD(name);
... when != name
- INIT_LIST_HEAD(&amp;name);

Signed-off-by: Jisheng Zhang &lt;jszhang@kernel.org&gt;
Message-ID: &lt;20260519055722.13161-1-jszhang@kernel.org&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi:kcs: Reduce the number of retries</title>
<updated>2026-05-19T11:32:11+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-21T13:40:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d08048d4e03b68aeadce6100ba32a525b6e5ab3d'/>
<id>urn:sha1:d08048d4e03b68aeadce6100ba32a525b6e5ab3d</id>
<content type='text'>
The retry count was initially set to 10, which with the 5 second
timeouts give 55 seconds to fail a message.

The IPMI spec specifies the 5 second timeout, and it specifies retries
for KCS but does not specify a number.  55 seconds is a long time, so
reduce retries to 2.  It matches the default in the BT state machine.
This is 15 seconds, then, which is still a long time, but more
reasonable.

Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
</feed>
