<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/char/ipmi, branch v6.18.50</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ipmi:msghandler: Cancel work cleanly on an error</title>
<updated>2026-09-07T15:22:52+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-08-18T17:49:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=99692252b348c11377fd0cdd66b6b18f3b22758e'/>
<id>99692252b348c11377fd0cdd66b6b18f3b22758e</id>
<content type='text'>
commit ae84a2536577057e97f23f75a202e26d0e86cf01 upstream.

If an error occurs during startup of an IPMI interface, it may have
scheduled work to run.  The work needs to be canceled before the
interface can be freed.

Reported-by: Nilay Shroff &lt;nilay@linux.ibm.com&gt;
Closes: https://sourceforge.net/p/openipmi/mailman/message/59375605/
Fixes: 62cd145453d5 ("ipmi:msghandler: Handle error returns from the SMI sender")
Cc: stable@vger.kernel.org # 7.0
Tested-by: Nilay Shroff &lt;nilay@linux.ibm.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ae84a2536577057e97f23f75a202e26d0e86cf01 upstream.

If an error occurs during startup of an IPMI interface, it may have
scheduled work to run.  The work needs to be canceled before the
interface can be freed.

Reported-by: Nilay Shroff &lt;nilay@linux.ibm.com&gt;
Closes: https://sourceforge.net/p/openipmi/mailman/message/59375605/
Fixes: 62cd145453d5 ("ipmi:msghandler: Handle error returns from the SMI sender")
Cc: stable@vger.kernel.org # 7.0
Tested-by: Nilay Shroff &lt;nilay@linux.ibm.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: si: Fix NULL pointer dereference after failed registration</title>
<updated>2026-09-07T15:22:52+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.tavy.me/linux-stable.git/commit/?id=53af3a8bae0a93c1342e1b5519812203332aca8e'/>
<id>53af3a8bae0a93c1342e1b5519812203332aca8e</id>
<content type='text'>
commit 6d920a75df9a83ab096b3cde7a643b656e4fdfeb upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6d920a75df9a83ab096b3cde7a643b656e4fdfeb upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Remove all sysfs files on registration failure</title>
<updated>2026-09-07T15:22:52+00:00</updated>
<author>
<name>Yuho Choi</name>
<email>dbgh9129@gmail.com</email>
</author>
<published>2026-08-03T01:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d46c97eddcbc53ca885e8bb359930c58884616ff'/>
<id>d46c97eddcbc53ca885e8bb359930c58884616ff</id>
<content type='text'>
commit b6c46ab0bdee90c238e96ea4a74972118c97900d upstream.

ipmi_add_smi() creates the nr_users and nr_msgs files before trying to
create the maintenance_mode file. If that last creation fails, the error
path removes only nr_users before dropping the final reference to the
interface.

Remove nr_msgs as well so no sysfs attribute embedded in the freed
interface remains registered.

Fixes: 627118470fcc ("ipmi: Add a maintenance mode sysfs file")
Cc: stable@vger.kernel.org # 6.18
Signed-off-by: Yuho Choi &lt;dbgh9129@gmail.com&gt;
Message-ID: &lt;20260803015550.618808-1-dbgh9129@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b6c46ab0bdee90c238e96ea4a74972118c97900d upstream.

ipmi_add_smi() creates the nr_users and nr_msgs files before trying to
create the maintenance_mode file. If that last creation fails, the error
path removes only nr_users before dropping the final reference to the
interface.

Remove nr_msgs as well so no sysfs attribute embedded in the freed
interface remains registered.

Fixes: 627118470fcc ("ipmi: Add a maintenance mode sysfs file")
Cc: stable@vger.kernel.org # 6.18
Signed-off-by: Yuho Choi &lt;dbgh9129@gmail.com&gt;
Message-ID: &lt;20260803015550.618808-1-dbgh9129@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ipmb: validate write message length</title>
<updated>2026-09-07T15:22:52+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.tavy.me/linux-stable.git/commit/?id=5719431ca2b5fa26560bb38f6202f8b97fa3bbb0'/>
<id>5719431ca2b5fa26560bb38f6202f8b97fa3bbb0</id>
<content type='text'>
commit 53637506884dbd5c91a89b1a3547d99d80f8ed2c upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 53637506884dbd5c91a89b1a3547d99d80f8ed2c upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Fix use-after-free of cmd_rcvr in _ipmi_destroy_user()</title>
<updated>2026-09-07T15:22:45+00:00</updated>
<author>
<name>Yifei Gao</name>
<email>gyf161023@gmail.com</email>
</author>
<published>2026-08-25T23:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3088e41292fecf132f85f79af5ee4d620b9ff1b4'/>
<id>3088e41292fecf132f85f79af5ee4d620b9ff1b4</id>
<content type='text'>
commit 05ec76cfbce653e07cec19b9b8b20e33449d5d87 upstream.

Commit 9e91f8a6c868 ("ipmi:msghandler: Remove srcu for the
ipmi_interfaces list") dropped the synchronize_rcu() between unlinking
the command receivers from intf-&gt;cmd_rcvrs and freeing them, updating
only the comment that explains why the barrier is needed.

The cmd_rcvrs list is still traversed under plain RCU: find_cmd_rcvr()
walks it inside rcu_read_lock(), and handle_ipmb_get_msg_cmd() borrows
rcvr-&gt;user from that lookup within the same read-side section. Without
the grace period, _ipmi_destroy_user() can kfree() a cmd_rcvr while a
reader still holds a pointer to it, causing a use-after-free.

The rework only made srcu unnecessary for the interfaces list; the
cmd_rcvrs list still relies on plain RCU. Restore the synchronize_rcu()
before freeing the receivers.

Fixes: 9e91f8a6c868 ("ipmi:msghandler: Remove srcu for the ipmi_interfaces list")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Yifei Gao &lt;gyf161023@gmail.com&gt;
Message-ID: &lt;20260825234630.1196170-1-gyf161023@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 05ec76cfbce653e07cec19b9b8b20e33449d5d87 upstream.

Commit 9e91f8a6c868 ("ipmi:msghandler: Remove srcu for the
ipmi_interfaces list") dropped the synchronize_rcu() between unlinking
the command receivers from intf-&gt;cmd_rcvrs and freeing them, updating
only the comment that explains why the barrier is needed.

The cmd_rcvrs list is still traversed under plain RCU: find_cmd_rcvr()
walks it inside rcu_read_lock(), and handle_ipmb_get_msg_cmd() borrows
rcvr-&gt;user from that lookup within the same read-side section. Without
the grace period, _ipmi_destroy_user() can kfree() a cmd_rcvr while a
reader still holds a pointer to it, causing a use-after-free.

The rework only made srcu unnecessary for the interfaces list; the
cmd_rcvrs list still relies on plain RCU. Restore the synchronize_rcu()
before freeing the receivers.

Fixes: 9e91f8a6c868 ("ipmi:msghandler: Remove srcu for the ipmi_interfaces list")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Yifei Gao &lt;gyf161023@gmail.com&gt;
Message-ID: &lt;20260825234630.1196170-1-gyf161023@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: fix refcount leak in i_ipmi_request()</title>
<updated>2026-07-24T14:17:13+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.tavy.me/linux-stable.git/commit/?id=f5c5065963024390ddad51bd455d1adc710de575'/>
<id>f5c5065963024390ddad51bd455d1adc710de575</id>
<content type='text'>
commit a3f3859cecacb64f18fd446271ece9a3b3f2d4de upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a3f3859cecacb64f18fd446271ece9a3b3f2d4de upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Fix user refcount underflow in event delivery</title>
<updated>2026-07-24T14:17:13+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.tavy.me/linux-stable.git/commit/?id=ddbb6e3dc9bb4743de686aa1598c31e745cee76b'/>
<id>ddbb6e3dc9bb4743de686aa1598c31e745cee76b</id>
<content type='text'>
commit 6aa9e61c46465d231e9beddf56af7effd71be682 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6aa9e61c46465d231e9beddf56af7effd71be682 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: change log level to dbg in irq callback</title>
<updated>2026-05-23T11:06:53+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-03T09:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e21bac13522020a5e5f05ac966dcf46188ed46b2'/>
<id>e21bac13522020a5e5f05ac966dcf46188ed46b2</id>
<content type='text'>
[ Upstream commit c9c99b7b7051eb7121b3224bfce181fb023b0269 ]

Long-running tests indicate that this logging can occasionally disrupt
timing and lead to request/response corruption.

Irq handler need to be executed as fast as possible,
most I2C slave IRQ implementations are byte-level, logging here
can significantly affect transfer behavior and timing. It is recommended
to use dev_dbg() for these messages.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-4-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c9c99b7b7051eb7121b3224bfce181fb023b0269 ]

Long-running tests indicate that this logging can occasionally disrupt
timing and lead to request/response corruption.

Irq handler need to be executed as fast as possible,
most I2C slave IRQ implementations are byte-level, logging here
can significantly affect transfer behavior and timing. It is recommended
to use dev_dbg() for these messages.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-4-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: fix message desynchronization after truncated response</title>
<updated>2026-05-23T11:06:53+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-03T09:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ca4d0555000f6e8cb4dd69a758f284d609cccd53'/>
<id>ca4d0555000f6e8cb4dd69a758f284d609cccd53</id>
<content type='text'>
[ Upstream commit 1d38e849adb6851ee280aa1a1d687b2181549a66 ]

A truncated response, caused by host power-off, or other conditions,
can lead to message desynchronization.

Raw trace data (STOP loss scenario, add state transition comment):

1. T-1: Read response phase (SSIF_RES_SENDING)
8271.955342  WR_RCV [03]                          &lt;- Read polling cmd
8271.955348  RD_REQ [04]  &lt;== SSIF_RES_SENDING    &lt;- start sending response
8271.955436  RD_PRO [b4]
8271.955527  RD_PRO [00]
8271.955618  RD_PRO [c1]
8271.955707  RD_PRO [00]
8271.955814  RD_PRO [ad]  &lt;== SSIF_RES_SENDING     &lt;- last byte
	&lt;- !! STOP lost (truncated response)

2. T: New Write request arrives, BMC still in SSIF_RES_SENDING
8271.967973  WR_REQ []    &lt;== SSIF_RES_SENDING &gt;&gt; SSIF_ABORTING  &lt;- log: unexpected WR_REQ in RES_SENDING
8271.968447  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968452  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968454  WR_RCV [18]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968456  WR_RCV [01]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968458  WR_RCV [66]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.978714  STOP []      &lt;== SSIF_ABORTING &gt;&gt; SSIF_READY  &lt;- log: unexpected SLAVE STOP in state=SSIF_ABORTING

3. T+1: Next Read polling, treated as a fresh transaction
8271.979125  WR_REQ []    &lt;== SSIF_READY &gt;&gt; SSIF_START
8271.979326  WR_RCV [03]  &lt;== SSIF_START &gt;&gt; SSIF_SMBUS_CMD        &lt;- smbus_cmd=0x03
8271.979331  RD_REQ [04]  &lt;== SSIF_RES_SENDING      &lt;- sending response
8271.979427  RD_PRO [b4]                            &lt;- !! this is T's stale response -&gt; desynchronization

When in SSIF_ABORTING state, a newly arrived command should still be
handled to avoid dropping the request or causing message
desynchronization.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-3-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 1d38e849adb6851ee280aa1a1d687b2181549a66 ]

A truncated response, caused by host power-off, or other conditions,
can lead to message desynchronization.

Raw trace data (STOP loss scenario, add state transition comment):

1. T-1: Read response phase (SSIF_RES_SENDING)
8271.955342  WR_RCV [03]                          &lt;- Read polling cmd
8271.955348  RD_REQ [04]  &lt;== SSIF_RES_SENDING    &lt;- start sending response
8271.955436  RD_PRO [b4]
8271.955527  RD_PRO [00]
8271.955618  RD_PRO [c1]
8271.955707  RD_PRO [00]
8271.955814  RD_PRO [ad]  &lt;== SSIF_RES_SENDING     &lt;- last byte
	&lt;- !! STOP lost (truncated response)

2. T: New Write request arrives, BMC still in SSIF_RES_SENDING
8271.967973  WR_REQ []    &lt;== SSIF_RES_SENDING &gt;&gt; SSIF_ABORTING  &lt;- log: unexpected WR_REQ in RES_SENDING
8271.968447  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968452  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968454  WR_RCV [18]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968456  WR_RCV [01]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968458  WR_RCV [66]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.978714  STOP []      &lt;== SSIF_ABORTING &gt;&gt; SSIF_READY  &lt;- log: unexpected SLAVE STOP in state=SSIF_ABORTING

3. T+1: Next Read polling, treated as a fresh transaction
8271.979125  WR_REQ []    &lt;== SSIF_READY &gt;&gt; SSIF_START
8271.979326  WR_RCV [03]  &lt;== SSIF_START &gt;&gt; SSIF_SMBUS_CMD        &lt;- smbus_cmd=0x03
8271.979331  RD_REQ [04]  &lt;== SSIF_RES_SENDING      &lt;- sending response
8271.979427  RD_PRO [b4]                            &lt;- !! this is T's stale response -&gt; desynchronization

When in SSIF_ABORTING state, a newly arrived command should still be
handled to avoid dropping the request or causing message
desynchronization.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-3-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: fix missing check for copy_to_user() partial failure</title>
<updated>2026-05-23T11:06:53+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-03T09:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3cce2a3f8f60c079fa779e385a4b45d246be918b'/>
<id>3cce2a3f8f60c079fa779e385a4b45d246be918b</id>
<content type='text'>
[ Upstream commit ea641be7a4faee4351f9c5ed6b188e1bbf5586a6 ]

copy_to_user() returns the number of bytes that could not be copied,
with a non-zero value indicating a partial or complete failure. The
current code only checks for negative return values and treats all
non-negative results as success.

Treating any positive return value from copy_to_user() as
an error and returning -EFAULT.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-2-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ea641be7a4faee4351f9c5ed6b188e1bbf5586a6 ]

copy_to_user() returns the number of bytes that could not be copied,
with a non-zero value indicating a partial or complete failure. The
current code only checks for negative return values and treats all
non-negative results as success.

Treating any positive return value from copy_to_user() as
an error and returning -EFAULT.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-2-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
