<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/char/ipmi, branch v6.6.39</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-08-31T02:20:35+00:00</updated>
<entry>
<title>Merge tag 'for-linus-6.6-1' of https://github.com/cminyard/linux-ipmi</title>
<updated>2023-08-31T02:20:35+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-08-31T02:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a55b0a028877e9d7e7dacdbe363d39390554ba14'/>
<id>urn:sha1:a55b0a028877e9d7e7dacdbe363d39390554ba14</id>
<content type='text'>
Pull IPMI updates from Corey Minyard:
 "Minor fixes for IPMI

  Lots of small unconnected things, memory leaks on error, a possible
  (though unlikely) deadlock, changes for updates to other things that
  have changed. Nothing earth-shattering, but things that need update"

* tag 'for-linus-6.6-1' of https://github.com/cminyard/linux-ipmi:
  ipmi_si: fix -Wvoid-pointer-to-enum-cast warning
  ipmi: fix potential deadlock on &amp;kcs_bmc-&gt;lock
  ipmi_si: fix a memleak in try_smi_init()
  ipmi: Change request_module to request_module_nowait
  ipmi: make ipmi_class a static const structure
  ipmi:ssif: Fix a memory leak when scanning for an adapter
  ipmi:ssif: Add check for kstrdup
  dt-bindings: ipmi: aspeed,ast2400-kcs-bmc: drop unneeded quotes
  ipmi: Switch i2c drivers back to use .probe()
  ipmi_watchdog: Fix read syscall not responding to signals during sleep
</content>
</entry>
<entry>
<title>ipmi: Explicitly include correct DT includes</title>
<updated>2023-08-28T18:36:24+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-28T13:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86cdae14a58a877ee1ec79d39b1331bc98dace58'/>
<id>urn:sha1:86cdae14a58a877ee1ec79d39b1331bc98dace58</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Link: https://lore.kernel.org/r/20230728134819.3224045-1-robh@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi_si: fix -Wvoid-pointer-to-enum-cast warning</title>
<updated>2023-08-15T20:46:06+00:00</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-08-09T21:05:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d40f09c1a23024f0e550d9423f4d389672e1dfaf'/>
<id>urn:sha1:d40f09c1a23024f0e550d9423f4d389672e1dfaf</id>
<content type='text'>
With W=1 we see the following warning:

|  drivers/char/ipmi/ipmi_si_platform.c:272:15: error: \
|       cast to smaller integer type 'enum si_type' from \
|       'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
|    272 |         io.si_type      = (enum si_type) match-&gt;data;
|        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~

This is due to the fact that the `si_type` enum members are int-width
and a cast from pointer-width down to int will cause truncation and
possible data loss. Although in this case `si_type` has only a few
enumerated fields and thus there is likely no data loss occurring.
Nonetheless, this patch is necessary to the goal of promoting this
warning out of W=1.

Link: https://github.com/ClangBuiltLinux/linux/issues/1902
Link: https://lore.kernel.org/llvm/202308081000.tTL1ElTr-lkp@intel.com/
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Message-Id: &lt;20230809-cbl-1902-v1-1-92def12d1dea@google.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: fix potential deadlock on &amp;kcs_bmc-&gt;lock</title>
<updated>2023-07-04T14:22:45+00:00</updated>
<author>
<name>Chengfeng Ye</name>
<email>dg573847474@gmail.com</email>
</author>
<published>2023-06-27T15:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b02bb79eee074f07acdfde540f2d4fe2a04471d8'/>
<id>urn:sha1:b02bb79eee074f07acdfde540f2d4fe2a04471d8</id>
<content type='text'>
As kcs_bmc_handle_event() is executed inside both a timer and a hardirq,
it should disable irq before lock acquisition otherwise deadlock could
happen if the timmer is preemtped by the irq.

Possible deadlock scenario:
aspeed_kcs_check_obe() (timer)
    -&gt; kcs_bmc_handle_event()
    -&gt; spin_lock(&amp;kcs_bmc-&gt;lock)
        &lt;irq interruption&gt;
        -&gt; aspeed_kcs_irq()
        -&gt; kcs_bmc_handle_event()
        -&gt; spin_lock(&amp;kcs_bmc-&gt;lock) (deadlock here)

This flaw was found using an experimental static analysis tool we are
developing for irq-related deadlock.

The tentative patch fix the potential deadlock by spin_lock_irqsave()

Signed-off-by: Chengfeng Ye &lt;dg573847474@gmail.com&gt;
Message-Id: &lt;20230627152449.36093-1-dg573847474@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi_si: fix a memleak in try_smi_init()</title>
<updated>2023-06-29T13:06:45+00:00</updated>
<author>
<name>Yi Yang</name>
<email>yiyang13@huawei.com</email>
</author>
<published>2023-06-29T12:33:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6cf1a126de2992b4efe1c3c4d398f8de4aed6e3f'/>
<id>urn:sha1:6cf1a126de2992b4efe1c3c4d398f8de4aed6e3f</id>
<content type='text'>
Kmemleak reported the following leak info in try_smi_init():

unreferenced object 0xffff00018ecf9400 (size 1024):
  comm "modprobe", pid 2707763, jiffies 4300851415 (age 773.308s)
  backtrace:
    [&lt;000000004ca5b312&gt;] __kmalloc+0x4b8/0x7b0
    [&lt;00000000953b1072&gt;] try_smi_init+0x148/0x5dc [ipmi_si]
    [&lt;000000006460d325&gt;] 0xffff800081b10148
    [&lt;0000000039206ea5&gt;] do_one_initcall+0x64/0x2a4
    [&lt;00000000601399ce&gt;] do_init_module+0x50/0x300
    [&lt;000000003c12ba3c&gt;] load_module+0x7a8/0x9e0
    [&lt;00000000c246fffe&gt;] __se_sys_init_module+0x104/0x180
    [&lt;00000000eea99093&gt;] __arm64_sys_init_module+0x24/0x30
    [&lt;0000000021b1ef87&gt;] el0_svc_common.constprop.0+0x94/0x250
    [&lt;0000000070f4f8b7&gt;] do_el0_svc+0x48/0xe0
    [&lt;000000005a05337f&gt;] el0_svc+0x24/0x3c
    [&lt;000000005eb248d6&gt;] el0_sync_handler+0x160/0x164
    [&lt;0000000030a59039&gt;] el0_sync+0x160/0x180

The problem was that when an error occurred before handlers registration
and after allocating `new_smi-&gt;si_sm`, the variable wouldn't be freed in
the error handling afterwards since `shutdown_smi()` hadn't been
registered yet. Fix it by adding a `kfree()` in the error handling path
in `try_smi_init()`.

Cc: stable@vger.kernel.org # 4.19+
Fixes: 7960f18a5647 ("ipmi_si: Convert over to a shutdown handler")
Signed-off-by: Yi Yang &lt;yiyang13@huawei.com&gt;
Co-developed-by: GONG, Ruiqi &lt;gongruiqi@huaweicloud.com&gt;
Signed-off-by: GONG, Ruiqi &lt;gongruiqi@huaweicloud.com&gt;
Message-Id: &lt;20230629123328.2402075-1-gongruiqi@huaweicloud.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Change request_module to request_module_nowait</title>
<updated>2023-06-20T14:59:53+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>minyard@acm.org</email>
</author>
<published>2023-06-20T14:59:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e87443a5f68da7bacefe933c90453ae7215263b3'/>
<id>urn:sha1:e87443a5f68da7bacefe933c90453ae7215263b3</id>
<content type='text'>
When probing for an ACPI-specified IPMI device, the code would request
that the acpi_ipmi module be loaded ACPI operations through IPMI can be
performed.  This could happen through module load context, for instance,
if an I2C module is loaded that caused the IPMI interface to be probed.

This is not allowed because a synchronous module load in this context
can result in an deadlock, and I was getting a warning:

[   23.967853] WARNING: CPU: 0 PID: 21 at kernel/module/kmod.c:144 __request_module+0x1de/0x2d0
[   23.968852] Modules linked in: i2c_i801 ipmi_ssif

The IPMI driver is not dependent on acpi_ipmi, so just change the called
to request_module_nowait to make the load asynchronous.

Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: make ipmi_class a static const structure</title>
<updated>2023-06-20T14:49:08+00:00</updated>
<author>
<name>Ivan Orlov</name>
<email>ivan.orlov0322@gmail.com</email>
</author>
<published>2023-06-20T14:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=392fa3a3abdb03105c8767b7fb176bc8793349f5'/>
<id>urn:sha1:392fa3a3abdb03105c8767b7fb176bc8793349f5</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only
memory, move the ipmi_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: openipmi-developer@lists.sourceforge.net
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Message-Id: &lt;20230620143701.577657-2-gregkh@linuxfoundation.org&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi:ssif: Fix a memory leak when scanning for an adapter</title>
<updated>2023-06-20T11:54:20+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>minyard@acm.org</email>
</author>
<published>2023-06-19T16:43:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8d72e32e1453d37ee5c8a219f24e7eeadc471ef'/>
<id>urn:sha1:b8d72e32e1453d37ee5c8a219f24e7eeadc471ef</id>
<content type='text'>
The adapter scan ssif_info_find() sets info-&gt;adapter_name if the adapter
info came from SMBIOS, as it's not set in that case.  However, this
function can be called more than once, and it will leak the adapter name
if it had already been set.  So check for NULL before setting it.

Fixes: c4436c9149c5 ("ipmi_ssif: avoid registering duplicate ssif interface")
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi:ssif: Add check for kstrdup</title>
<updated>2023-06-19T16:40:38+00:00</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiasheng@iscas.ac.cn</email>
</author>
<published>2023-06-19T09:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5586d0f711e9744d0cade39b0c4a2d116a333ca'/>
<id>urn:sha1:c5586d0f711e9744d0cade39b0c4a2d116a333ca</id>
<content type='text'>
Add check for the return value of kstrdup() and return the error
if it fails in order to avoid NULL pointer dereference.

Fixes: c4436c9149c5 ("ipmi_ssif: avoid registering duplicate ssif interface")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Message-Id: &lt;20230619092802.35384-1-jiasheng@iscas.ac.cn&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Switch i2c drivers back to use .probe()</title>
<updated>2023-05-25T23:48:06+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-25T20:40:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e64c82b8064174a23434094d13a142254c138099'/>
<id>urn:sha1:e64c82b8064174a23434094d13a142254c138099</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Message-Id: &lt;20230525204021.696858-1-u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
</feed>
