<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/char/ipmi, branch v5.4.113</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.113</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.113'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-10-29T08:57:44+00:00</updated>
<entry>
<title>ipmi_si: Fix wrong return value in try_smi_init()</title>
<updated>2020-10-29T08:57:44+00:00</updated>
<author>
<name>Tianjia Zhang</name>
<email>tianjia.zhang@linux.alibaba.com</email>
</author>
<published>2020-10-05T14:52:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dddb49f4152a9f2908e212b6e1fc357818cfee2c'/>
<id>urn:sha1:dddb49f4152a9f2908e212b6e1fc357818cfee2c</id>
<content type='text'>
[ Upstream commit 8fe7990ceda8597e407d06bffc4bdbe835a93ece ]

On an error exit path, a negative error code should be returned
instead of a positive return value.

Fixes: 90b2d4f15ff7 ("ipmi_si: Remove hacks for adding a dummy platform devices")
Cc: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Tianjia Zhang &lt;tianjia.zhang@linux.alibaba.com&gt;
Message-Id: &lt;20201005145212.84435-1-tianjia.zhang@linux.alibaba.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi:bt-bmc: Fix error handling and status check</title>
<updated>2020-10-01T11:18:01+00:00</updated>
<author>
<name>Tang Bin</name>
<email>tangbin@cmss.chinamobile.com</email>
</author>
<published>2020-05-05T10:29:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=004cb15b1e4cdca29cdf4c473ba6e2004e59f3b4'/>
<id>urn:sha1:004cb15b1e4cdca29cdf4c473ba6e2004e59f3b4</id>
<content type='text'>
[ Upstream commit 49826937e7c7917140515aaf10c17bedcc4acaad ]

If the function platform_get_irq() failed, the negative value
returned will not be detected here. So fix error handling in
bt_bmc_config_irq(). And in the function bt_bmc_probe(),
when get irq failed, it will print error message. So use
platform_get_irq_optional() to simplify code. Finally in the
function bt_bmc_remove() should make the right status check
if get irq failed.

Signed-off-by: Shengju Zhang &lt;zhangshengju@cmss.chinamobile.com&gt;
Signed-off-by: Tang Bin &lt;tangbin@cmss.chinamobile.com&gt;
Message-Id: &lt;20200505102906.17196-1-tangbin@cmss.chinamobile.com&gt;
[Also set bt_bmc-&gt;irq to a negative value if devm_request_irq() fails.]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: use vzalloc instead of kmalloc for user creation</title>
<updated>2020-06-24T15:50:28+00:00</updated>
<author>
<name>Feng Tang</name>
<email>feng.tang@intel.com</email>
</author>
<published>2020-04-17T04:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b1bc8753eefc82b79e285977c6177c67bc17344e'/>
<id>urn:sha1:b1bc8753eefc82b79e285977c6177c67bc17344e</id>
<content type='text'>
[ Upstream commit 7c47a219b95d0e06b5ef5fcc7bad807895015eac ]

We met mulitple times of failure of staring bmc-watchdog,
due to the runtime memory allocation failure of order 4.

     bmc-watchdog: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0-1
     CPU: 1 PID: 2571 Comm: bmc-watchdog Not tainted 5.5.0-00045-g7d6bb61d6188c #1
     Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.00.01.0015.110720180833 11/07/2018
     Call Trace:
      dump_stack+0x66/0x8b
      warn_alloc+0xfe/0x160
      __alloc_pages_slowpath+0xd3e/0xd80
      __alloc_pages_nodemask+0x2f0/0x340
      kmalloc_order+0x18/0x70
      kmalloc_order_trace+0x1d/0xb0
      ipmi_create_user+0x55/0x2c0 [ipmi_msghandler]
      ipmi_open+0x72/0x110 [ipmi_devintf]
      chrdev_open+0xcb/0x1e0
      do_dentry_open+0x1ce/0x380
      path_openat+0x305/0x14f0
      do_filp_open+0x9b/0x110
      do_sys_open+0x1bd/0x250
      do_syscall_64+0x5b/0x1f0
      entry_SYSCALL_64_after_hwframe+0x44/0xa9

Using vzalloc/vfree for creating ipmi_user heals the
problem

Thanks to Stephen Rothwell for finding the vmalloc.h
inclusion issue.

Signed-off-by: Feng Tang &lt;feng.tang@intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: fix hung processes in __get_guid()</title>
<updated>2020-04-17T08:50:22+00:00</updated>
<author>
<name>Wen Yang</name>
<email>wenyang@linux.alibaba.com</email>
</author>
<published>2020-04-03T09:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5fdf01181cb8a7a86385002f875ff2d8ddab0eb9'/>
<id>urn:sha1:5fdf01181cb8a7a86385002f875ff2d8ddab0eb9</id>
<content type='text'>
commit 32830a0534700f86366f371b150b17f0f0d140d7 upstream.

The wait_event() function is used to detect command completion.
When send_guid_cmd() returns an error, smi_send() has not been
called to send data. Therefore, wait_event() should not be used
on the error path, otherwise it will cause the following warning:

[ 1361.588808] systemd-udevd   D    0  1501   1436 0x00000004
[ 1361.588813]  ffff883f4b1298c0 0000000000000000 ffff883f4b188000 ffff887f7e3d9f40
[ 1361.677952]  ffff887f64bd4280 ffffc90037297a68 ffffffff8173ca3b ffffc90000000010
[ 1361.767077]  00ffc90037297ad0 ffff887f7e3d9f40 0000000000000286 ffff883f4b188000
[ 1361.856199] Call Trace:
[ 1361.885578]  [&lt;ffffffff8173ca3b&gt;] ? __schedule+0x23b/0x780
[ 1361.951406]  [&lt;ffffffff8173cfb6&gt;] schedule+0x36/0x80
[ 1362.010979]  [&lt;ffffffffa071f178&gt;] get_guid+0x118/0x150 [ipmi_msghandler]
[ 1362.091281]  [&lt;ffffffff810d5350&gt;] ? prepare_to_wait_event+0x100/0x100
[ 1362.168533]  [&lt;ffffffffa071f755&gt;] ipmi_register_smi+0x405/0x940 [ipmi_msghandler]
[ 1362.258337]  [&lt;ffffffffa0230ae9&gt;] try_smi_init+0x529/0x950 [ipmi_si]
[ 1362.334521]  [&lt;ffffffffa022f350&gt;] ? std_irq_setup+0xd0/0xd0 [ipmi_si]
[ 1362.411701]  [&lt;ffffffffa0232bd2&gt;] init_ipmi_si+0x492/0x9e0 [ipmi_si]
[ 1362.487917]  [&lt;ffffffffa0232740&gt;] ? ipmi_pci_probe+0x280/0x280 [ipmi_si]
[ 1362.568219]  [&lt;ffffffff810021a0&gt;] do_one_initcall+0x50/0x180
[ 1362.636109]  [&lt;ffffffff812231b2&gt;] ? kmem_cache_alloc_trace+0x142/0x190
[ 1362.714330]  [&lt;ffffffff811b2ae1&gt;] do_init_module+0x5f/0x200
[ 1362.781208]  [&lt;ffffffff81123ca8&gt;] load_module+0x1898/0x1de0
[ 1362.848069]  [&lt;ffffffff811202e0&gt;] ? __symbol_put+0x60/0x60
[ 1362.913886]  [&lt;ffffffff8130696b&gt;] ? security_kernel_post_read_file+0x6b/0x80
[ 1362.998514]  [&lt;ffffffff81124465&gt;] SYSC_finit_module+0xe5/0x120
[ 1363.068463]  [&lt;ffffffff81124465&gt;] ? SYSC_finit_module+0xe5/0x120
[ 1363.140513]  [&lt;ffffffff811244be&gt;] SyS_finit_module+0xe/0x10
[ 1363.207364]  [&lt;ffffffff81003c04&gt;] do_syscall_64+0x74/0x180

Fixes: 50c812b2b951 ("[PATCH] ipmi: add full sysfs support")
Signed-off-by: Wen Yang &lt;wenyang@linux.alibaba.com&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: openipmi-developer@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # 2.6.17-
Message-Id: &lt;20200403090408.58745-1-wenyang@linux.alibaba.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipmi_si: Avoid spurious errors for optional IRQs</title>
<updated>2020-03-18T06:17:52+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-02-05T09:31:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c47d02ad451c052430405d48e5e7d76c9d27bfe'/>
<id>urn:sha1:0c47d02ad451c052430405d48e5e7d76c9d27bfe</id>
<content type='text'>
commit 443d372d6a96cd94ad119e5c14bb4d63a536a7f6 upstream.

Although the IRQ assignment in ipmi_si driver is optional,
platform_get_irq() spews error messages unnecessarily:
  ipmi_si dmi-ipmi-si.0: IRQ index 0 not found

Fix this by switching to platform_get_irq_optional().

Cc: stable@vger.kernel.org # 5.4.x
Cc: John Donnelly &lt;john.p.donnelly@oracle.com&gt;
Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
Reported-and-tested-by: Patrick Vo &lt;patrick.vo@hpe.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Message-Id: &lt;20200205093146.1352-1-tiwai@suse.de&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipmi:ssif: Handle a possible NULL pointer reference</title>
<updated>2020-03-05T15:43:35+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2019-12-23T16:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66bc95c1955abd8d096774f10ab5beefecdab2ec'/>
<id>urn:sha1:66bc95c1955abd8d096774f10ab5beefecdab2ec</id>
<content type='text'>
[ Upstream commit 6b8526d3abc02c08a2f888e8c20b7ac9e5776dfe ]

In error cases a NULL can be passed to memcpy.  The length will always
be zero, so it doesn't really matter, but go ahead and check for NULL,
anyway, to be more precise and avoid static analysis errors.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write</title>
<updated>2020-02-19T18:53:05+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-01-14T14:40:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf0ea974b6a2c9308149f747db0ab30de1b5d36b'/>
<id>urn:sha1:cf0ea974b6a2c9308149f747db0ab30de1b5d36b</id>
<content type='text'>
commit e0354d147e5889b5faa12e64fa38187aed39aad4 upstream.

The end of buffer check is off-by-one since the check is against
an index that is pre-incremented before a store to buf[]. Fix this
adjusting the bounds check appropriately.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Message-Id: &lt;20200114144031.358003-1-colin.king@canonical.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipmi: Fix memory leak in __ipmi_bmc_register</title>
<updated>2020-01-26T09:01:02+00:00</updated>
<author>
<name>Navid Emamdoost</name>
<email>navid.emamdoost@gmail.com</email>
</author>
<published>2019-10-21T20:06:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57d748f43f0742f58b5cf01b2d7b9a0d2e113e3d'/>
<id>urn:sha1:57d748f43f0742f58b5cf01b2d7b9a0d2e113e3d</id>
<content type='text'>
commit 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab upstream.

In the impelementation of __ipmi_bmc_register() the allocated memory for
bmc should be released in case ida_simple_get() fails.

Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Message-Id: &lt;20191021200649.1511-1-navid.emamdoost@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipmi: Don't allow device module unload when in use</title>
<updated>2019-12-31T15:44:14+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2019-10-14T15:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b642ced2cad496c32ae1f62b85fc395391190820'/>
<id>urn:sha1:b642ced2cad496c32ae1f62b85fc395391190820</id>
<content type='text'>
[ Upstream commit cbb79863fc3175ed5ac506465948b02a893a8235 ]

If something has the IPMI driver open, don't allow the device
module to be unloaded.  Before it would unload and the user would
get errors on use.

This change is made on user request, and it makes it consistent
with the I2C driver, which has the same behavior.

It does change things a little bit with respect to kernel users.
If the ACPI or IPMI watchdog (or any other kernel user) has
created a user, then the device module cannot be unloaded.  Before
it could be unloaded,

This does not affect hot-plug.  If the device goes away (it's on
something removable that is removed or is hot-removed via sysfs)
then it still behaves as it did before.

Reported-by: tony camuso &lt;tcamuso@redhat.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Tested-by: tony camuso &lt;tcamuso@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi_si_intf: Fix race in timer shutdown handling</title>
<updated>2019-09-12T21:03:18+00:00</updated>
<author>
<name>Jes Sorensen</name>
<email>jsorensen@fb.com</email>
</author>
<published>2019-08-28T20:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c9acc3c4f8e42ae538aea7f418fddc16f257ba75'/>
<id>urn:sha1:c9acc3c4f8e42ae538aea7f418fddc16f257ba75</id>
<content type='text'>
smi_mod_timer() enables the timer before setting timer_running. This
means the timer can be running when we get to stop_timer_and_thread()
without timer_running having been set, resulting in del_timer_sync()
not being called and the timer being left to cause havoc during
shutdown.

Instead just call del_timer_sync() unconditionally

Signed-off-by: Jes Sorensen &lt;jsorensen@fb.com&gt;
Message-Id: &lt;20190828203625.32093-2-Jes.Sorensen@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
</feed>
