<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/char/ipmi, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-19T15:08:33Z</updated>
<entry>
<title>ipmi:si: Fix check for a misbehaving BMC</title>
<updated>2026-03-19T15:08:33Z</updated>
<author>
<name>Corey Minyard</name>
</author>
<published>2026-02-13T06:15:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58e6e3d39c286d60785302ede8e8d4b9dbabb408'/>
<id>urn:sha1:58e6e3d39c286d60785302ede8e8d4b9dbabb408</id>
<content type='text'>
commit cae66f1a1dcd23e17da5a015ef9d731129f9d2dd upstream.

There is a race on checking the state in the sender, it needs to be
checked under a lock.  But you also need a check to avoid issues with
a misbehaving BMC for run to completion mode.  So leave the check at
the beginning for run to completion, and add a check under the lock
to avoid the race.

Reported-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Fixes: bc3a9d217755 ("ipmi:si: Gracefully handle if the BMC is non-functional")
Cc: stable@vger.kernel.org # 4.18
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Reviewed-by: Rafael J. Wysocki (Intel) &lt;rafael@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipmi:si: Handle waiting messages when BMC failure detected</title>
<updated>2026-03-19T15:08:33Z</updated>
<author>
<name>Corey Minyard</name>
</author>
<published>2026-02-06T15:59:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b7855110fd75d6cbe5514b36d3b7944176992c1'/>
<id>urn:sha1:9b7855110fd75d6cbe5514b36d3b7944176992c1</id>
<content type='text'>
commit 52c9ee202edd21d0599ac3b5a6fe1da2a2f053e5 upstream.

If a BMC failure is detected, the current message is returned with an
error.  However, if there was a waiting message, it would not be
handled.

Add a check for the waiting message after handling the current message.

Suggested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reported-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Closes: https://lore.kernel.org/linux-acpi/CAK8fFZ58fidGUCHi5WFX0uoTPzveUUDzT=k=AAm4yWo3bAuCFg@mail.gmail.com/
Fixes: bc3a9d217755 ("ipmi:si: Gracefully handle if the BMC is non-functional")
Cc: stable@vger.kernel.org # 4.18
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipmi:si: Use a long timeout when the BMC is misbehaving</title>
<updated>2026-03-19T15:08:32Z</updated>
<author>
<name>Corey Minyard</name>
</author>
<published>2026-02-06T16:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1df500f363bc878c5ee10ac6598e0335e6729aa9'/>
<id>urn:sha1:1df500f363bc878c5ee10ac6598e0335e6729aa9</id>
<content type='text'>
commit c3bb3295637cc9bf514f690941ca9a385bf30113 upstream.

If the driver goes into HOSED state, don't reset the timeout to the
short timeout in the timeout handler.

Reported-by: Igor Raits &lt;igor@gooddata.com&gt;
Closes: https://lore.kernel.org/linux-acpi/CAK8fFZ58fidGUCHi5WFX0uoTPzveUUDzT=k=AAm4yWo3bAuCFg@mail.gmail.com/
Fixes: bc3a9d217755 ("ipmi:si: Gracefully handle if the BMC is non-functional")
Cc: stable@vger.kernel.org # 4.18
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipmi:si: Don't block module unload if the BMC is messed up</title>
<updated>2026-03-19T15:08:32Z</updated>
<author>
<name>Corey Minyard</name>
</author>
<published>2026-02-13T03:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68d7fcb6a451c8dc0c94e6e14308229ea0a99e8d'/>
<id>urn:sha1:68d7fcb6a451c8dc0c94e6e14308229ea0a99e8d</id>
<content type='text'>
commit f895e5df80316a308c2f7d64d13a78494630ea05 upstream.

If the BMC is in a bad state, don't bother waiting for queues messages
since there can't be any.  Otherwise the unload is blocked until the
BMC is back in a good state.

Reported-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Fixes: bc3a9d217755 ("ipmi:si: Gracefully handle if the BMC is non-functional")
Cc: stable@vger.kernel.org # 4.18
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Reviewed-by: Rafael J. Wysocki (Intel) &lt;rafael@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix use-after-free and list corruption on sender error</title>
<updated>2026-03-12T11:09:45Z</updated>
<author>
<name>Corey Minyard</name>
</author>
<published>2026-01-27T13:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c08ec55617cb9674a060a3392ea08391ab2a4f74'/>
<id>urn:sha1:c08ec55617cb9674a060a3392ea08391ab2a4f74</id>
<content type='text'>
commit 594c11d0e1d445f580898a2b8c850f2e3f099368 upstream.

The analysis from Breno:

When the SMI sender returns an error, smi_work() delivers an error
response but then jumps back to restart without cleaning up properly:

1. intf-&gt;curr_msg is not cleared, so no new message is pulled
2. newmsg still points to the message, causing sender() to be called
   again with the same message
3. If sender() fails again, deliver_err_response() is called with
   the same recv_msg that was already queued for delivery

This causes list_add corruption ("list_add double add") because the
recv_msg is added to the user_msgs list twice. Subsequently, the
corrupted list leads to use-after-free when the memory is freed and
reused, and eventually a NULL pointer dereference when accessing
recv_msg-&gt;done.

The buggy sequence:

  sender() fails
    -&gt; deliver_err_response(recv_msg)  // recv_msg queued for delivery
    -&gt; goto restart                    // curr_msg not cleared!
  sender() fails again (same message!)
    -&gt; deliver_err_response(recv_msg)  // tries to queue same recv_msg
    -&gt; LIST CORRUPTION

Fix this by freeing the message and setting it to NULL on a send error.
Also, always free the newmsg on a send error, otherwise it will leak.

Reported-by: Breno Leitao &lt;leitao@debian.org&gt;
Closes: https://lore.kernel.org/lkml/20260127-ipmi-v1-0-ba5cc90f516f@debian.org/
Fixes: 9cf93a8fa9513 ("ipmi: Allow an SMI sender to return an error")
Cc: stable@vger.kernel.org # 4.18
Reviewed-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipmi: ipmb: initialise event handler read bytes</title>
<updated>2026-03-04T12:20:44Z</updated>
<author>
<name>Matt Johnston</name>
</author>
<published>2026-01-13T09:41:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f726b3a57e00bb6249c67714c11ae8b4b31719a1'/>
<id>urn:sha1:f726b3a57e00bb6249c67714c11ae8b4b31719a1</id>
<content type='text'>
[ Upstream commit 9f235ccecd03c436cb1683eac16b12f119e54aa9 ]

IPMB doesn't use i2c reads, but the handler needs to set a value.
Otherwise an i2c read will return an uninitialised value from the bus
driver.

Fixes: 63c4eb347164 ("ipmi:ipmb: Add initial support for IPMI over IPMB")
Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Message-ID: &lt;20260113-ipmb-read-init-v1-1-a9cbce7b94e3@codeconstruct.com.au&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix __scan_channels() failing to rescan channels</title>
<updated>2026-01-02T11:56:59Z</updated>
<author>
<name>Jinhui Guo</name>
</author>
<published>2025-09-30T07:42:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb8d9fb6280dac6df702e0899b590b4daadf2e8a'/>
<id>urn:sha1:eb8d9fb6280dac6df702e0899b590b4daadf2e8a</id>
<content type='text'>
[ Upstream commit 6bd30d8fc523fb880b4be548e8501bc0fe8f42d4 ]

channel_handler() sets intf-&gt;channels_ready to true but never
clears it, so __scan_channels() skips any rescan. When the BMC
firmware changes a rescan is required. Allow it by clearing
the flag before starting a new scan.

Signed-off-by: Jinhui Guo &lt;guojinhui.liam@bytedance.com&gt;
Message-ID: &lt;20250930074239.2353-3-guojinhui.liam@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix the race between __scan_channels() and deliver_response()</title>
<updated>2026-01-02T11:56:59Z</updated>
<author>
<name>Jinhui Guo</name>
</author>
<published>2025-09-30T07:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=235ae3fc9e9c9fbcd4245ec6f6b5423ed47fcda9'/>
<id>urn:sha1:235ae3fc9e9c9fbcd4245ec6f6b5423ed47fcda9</id>
<content type='text'>
[ Upstream commit 936750fdba4c45e13bbd17f261bb140dd55f5e93 ]

The race window between __scan_channels() and deliver_response() causes
the parameters of some channels to be set to 0.

1.[CPUA] __scan_channels() issues an IPMI request and waits with
         wait_event() until all channels have been scanned.
         wait_event() internally calls might_sleep(), which might
         yield the CPU. (Moreover, an interrupt can preempt
         wait_event() and force the task to yield the CPU.)
2.[CPUB] deliver_response() is invoked when the CPU receives the
         IPMI response. After processing a IPMI response,
         deliver_response() directly assigns intf-&gt;wchannels to
         intf-&gt;channel_list and sets intf-&gt;channels_ready to true.
         However, not all channels are actually ready for use.
3.[CPUA] Since intf-&gt;channels_ready is already true, wait_event()
         never enters __wait_event(). __scan_channels() immediately
         clears intf-&gt;null_user_handler and exits.
4.[CPUB] Once intf-&gt;null_user_handler is set to NULL, deliver_response()
         ignores further IPMI responses, leaving the remaining
	 channels zero-initialized and unusable.

CPUA                             CPUB
-------------------------------  -----------------------------
__scan_channels()
 intf-&gt;null_user_handler
       = channel_handler;
 send_channel_info_cmd(intf,
       0);
 wait_event(intf-&gt;waitq,
       intf-&gt;channels_ready);
  do {
   might_sleep();
                                 deliver_response()
                                  channel_handler()
                                   intf-&gt;channel_list =
				         intf-&gt;wchannels + set;
                                   intf-&gt;channels_ready = true;
                                   send_channel_info_cmd(intf,
                                         intf-&gt;curr_channel);
   if (condition)
    break;
   __wait_event(wq_head,
          condition);
  } while(0)
 intf-&gt;null_user_handler
       = NULL;
                                 deliver_response()
                                  if (!msg-&gt;user)
                                   if (intf-&gt;null_user_handler)
                                    rv = -EINVAL;
                                  return rv;
-------------------------------  -----------------------------

Fix the race between __scan_channels() and deliver_response() by
deferring both the assignment intf-&gt;channel_list = intf-&gt;wchannels
and the flag intf-&gt;channels_ready = true until all channels have
been successfully scanned or until the IPMI request has failed.

Signed-off-by: Jinhui Guo &lt;guojinhui.liam@bytedance.com&gt;
Message-ID: &lt;20250930074239.2353-2-guojinhui.liam@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix handling of messages with provided receive message pointer</title>
<updated>2025-10-07T11:50:08Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2025-10-06T20:18:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2c69490dda5d4c9f1bfbb2898989c8f3530e354'/>
<id>urn:sha1:e2c69490dda5d4c9f1bfbb2898989c8f3530e354</id>
<content type='text'>
Prior to commit b52da4054ee0 ("ipmi: Rework user message limit handling"),
i_ipmi_request() used to increase the user reference counter if the receive
message is provided by the caller of IPMI API functions. This is no longer
the case. However, ipmi_free_recv_msg() is still called and decreases the
reference counter. This results in the reference counter reaching zero,
the user data pointer is released, and all kinds of interesting crashes are
seen.

Fix the problem by increasing user reference counter if the receive message
has been provided by the caller.

Fixes: b52da4054ee0 ("ipmi: Rework user message limit handling")
Reported-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Message-ID: &lt;20251006201857.3433837-1-linux@roeck-us.net&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>ipmi: Add Loongson-2K BMC support</title>
<updated>2025-09-16T15:15:54Z</updated>
<author>
<name>Binbin Zhou</name>
</author>
<published>2025-09-04T12:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d46651d4e3c0caab554c4c591c0b6c3b026b1e93'/>
<id>urn:sha1:d46651d4e3c0caab554c4c591c0b6c3b026b1e93</id>
<content type='text'>
This patch adds Loongson-2K BMC IPMI support.

According to the existing design, we use software simulation to
implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.

Also since both host side and BMC side read and write kcs status, fifo flag
is used to ensure data consistency.

The single KCS message block is as follows:

+-------------------------------------------------------------------------+
|FIFO flags| KCS register data | CMD data | KCS version | WR REQ | WR ACK |
+-------------------------------------------------------------------------+

Co-developed-by: Chong Qiao &lt;qiaochong@loongson.cn&gt;
Signed-off-by: Chong Qiao &lt;qiaochong@loongson.cn&gt;
Reviewed-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
Acked-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Binbin Zhou &lt;zhoubinbin@loongson.cn&gt;
Message-ID: &lt;8f9ffb6f0405345af8f04193ce1510aacd075e72.1756987761.git.zhoubinbin@loongson.cn&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
</feed>
