<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers, branch v4.19.141</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.141</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.141'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-08-21T09:05:39+00:00</updated>
<entry>
<title>drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume</title>
<updated>2020-08-21T09:05:39+00:00</updated>
<author>
<name>Sandeep Raghuraman</name>
<email>sandy.8925@gmail.com</email>
</author>
<published>2020-08-06T17:22:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c1684171564a7e91afce2897469c81bf7d6085a'/>
<id>urn:sha1:2c1684171564a7e91afce2897469c81bf7d6085a</id>
<content type='text'>
commit f87812284172a9809820d10143b573d833cd3f75 upstream.

Reproducing bug report here:
After hibernating and resuming, DPM is not enabled. This remains the case
even if you test hibernate using the steps here:
https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html

I debugged the problem, and figured out that in the file hardwaremanager.c,
in the function, phm_enable_dynamic_state_management(), the check
'if (!hwmgr-&gt;pp_one_vf &amp;&amp; smum_is_dpm_running(hwmgr) &amp;&amp; !amdgpu_passthrough(adev) &amp;&amp; adev-&gt;in_suspend)'
returns true for the hibernate case, and false for the suspend case.

This means that for the hibernate case, the AMDGPU driver doesn't enable DPM
(even though it should) and simply returns from that function.
In the suspend case, it goes ahead and enables DPM, even though it doesn't need to.

I debugged further, and found out that in the case of suspend, for the
CIK/Hawaii GPUs, smum_is_dpm_running(hwmgr) returns false, while in the case of
hibernate, smum_is_dpm_running(hwmgr) returns true.

For CIK, the ci_is_dpm_running() function calls the ci_is_smc_ram_running() function,
which is ultimately used to determine if DPM is currently enabled or not,
and this seems to provide the wrong answer.

I've changed the ci_is_dpm_running() function to instead use the same method that
some other AMD GPU chips do (e.g Fiji), which seems to read the voltage controller.
I've tested on my R9 390 and it seems to work correctly for both suspend and
hibernate use cases, and has been stable so far.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=208839
Signed-off-by: Sandeep Raghuraman &lt;sandy.8925@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm: Added orientation quirk for ASUS tablet model T103HAF</title>
<updated>2020-08-21T09:05:39+00:00</updated>
<author>
<name>Marius Iacob</name>
<email>themariusus@gmail.com</email>
</author>
<published>2020-08-01T12:34:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bfdd8596994870126a62e673b82e6208f96727cd'/>
<id>urn:sha1:bfdd8596994870126a62e673b82e6208f96727cd</id>
<content type='text'>
commit b5ac98cbb8e5e30c34ebc837d1e5a3982d2b5f5c upstream.

Signed-off-by: Marius Iacob &lt;themariusus@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200801123445.1514567-1-themariusus@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mfd: dln2: Run event handler loop under spinlock</title>
<updated>2020-08-21T09:05:38+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-07-23T13:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59547851489e5168b7291eac5ecc5bb24a71d7f5'/>
<id>urn:sha1:59547851489e5168b7291eac5ecc5bb24a71d7f5</id>
<content type='text'>
[ Upstream commit 3d858942250820b9adc35f963a257481d6d4c81d ]

The event handler loop must be run with interrupts disabled.
Otherwise we will have a warning:

[ 1970.785649] irq 31 handler lineevent_irq_handler+0x0/0x20 enabled interrupts
[ 1970.792739] WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x162/0x170
[ 1970.860732] RIP: 0010:__handle_irq_event_percpu+0x162/0x170
...
[ 1970.946994] Call Trace:
[ 1970.949446]  &lt;IRQ&gt;
[ 1970.951471]  handle_irq_event_percpu+0x2c/0x80
[ 1970.955921]  handle_irq_event+0x23/0x43
[ 1970.959766]  handle_simple_irq+0x57/0x70
[ 1970.963695]  generic_handle_irq+0x42/0x50
[ 1970.967717]  dln2_rx+0xc1/0x210 [dln2]
[ 1970.971479]  ? usb_hcd_unmap_urb_for_dma+0xa6/0x1c0
[ 1970.976362]  __usb_hcd_giveback_urb+0x77/0xe0
[ 1970.980727]  usb_giveback_urb_bh+0x8e/0xe0
[ 1970.984837]  tasklet_action_common.isra.0+0x4a/0xe0
...

Recently xHCI driver switched to tasklets in the commit 36dc01657b49
("usb: host: xhci: Support running urb giveback in tasklet context").

The handle_irq_event_* functions are expected to be called with interrupts
disabled and they rightfully complain here because we run in tasklet context
with interrupts enabled.

Use a event spinlock to protect event handler from being interrupted.

Note, that there are only two users of this GPIO and ADC drivers and both of
them are using generic_handle_irq() which makes above happen.

Fixes: 338a12814297 ("mfd: Add support for Diolan DLN-2 devices")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Wang Hai</name>
<email>wanghai38@huawei.com</email>
</author>
<published>2020-08-10T02:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c08be09b2c1c5389f1d24677b595822ac7a75a21'/>
<id>urn:sha1:c08be09b2c1c5389f1d24677b595822ac7a75a21</id>
<content type='text'>
[ Upstream commit 50caa777a3a24d7027748e96265728ce748b41ef ]

Fix the missing clk_disable_unprepare() before return
from emac_clks_phase1_init() in the error handling case.

Fixes: b9b17debc69d ("net: emac: emac gigabit ethernet controller driver")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Wang Hai &lt;wanghai38@huawei.com&gt;
Acked-by: Timur Tabi &lt;timur@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Fix two list_for_each loop exit tests</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-06-26T10:39:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae71f731f061272806651be14f355cafd9560462'/>
<id>urn:sha1:ae71f731f061272806651be14f355cafd9560462</id>
<content type='text'>
[ Upstream commit 4437c1152ce0e57ab8f401aa696ea6291cc07ab1 ]

These if statements are supposed to be true if we ended the
list_for_each_entry() loops without hitting a break statement but they
don't work.

In the first loop, we increment "i" after the "if (i == unit)" condition
so we don't necessarily know that "i" is not equal to unit at the end of
the loop.

In the second loop we exit when mode is not pointing to a valid
drm_display_mode struct so it doesn't make sense to check "mode-&gt;type".

Fixes: a278724aa23c ("drm/vmwgfx: Implement fbdev on kms v2")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Roland Scheidegger &lt;sroland@vmware.com&gt;
Signed-off-by: Roland Scheidegger &lt;sroland@vmware.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Use correct vmw_legacy_display_unit pointer</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-06-26T10:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3cfd94ed90ee1eb4854aef1a4f9d8a3334654671'/>
<id>urn:sha1:3cfd94ed90ee1eb4854aef1a4f9d8a3334654671</id>
<content type='text'>
[ Upstream commit 1d2c0c565bc0da25f5e899a862fb58e612b222df ]

The "entry" pointer is an offset from the list head and it doesn't
point to a valid vmw_legacy_display_unit struct.  Presumably the
intent was to point to the last entry.

Also the "i++" wasn't used so I have removed that as well.

Fixes: d7e1958dbe4a ("drm/vmwgfx: Support older hardware.")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Roland Scheidegger &lt;sroland@vmware.com&gt;
Signed-off-by: Roland Scheidegger &lt;sroland@vmware.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Input: sentelic - fix error return when fsp_reg_write fails</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-08-06T22:35:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27a545d597ddecc87cf20e1e4809985fd32736c7'/>
<id>urn:sha1:27a545d597ddecc87cf20e1e4809985fd32736c7</id>
<content type='text'>
[ Upstream commit ea38f06e0291986eb93beb6d61fd413607a30ca4 ]

Currently when the call to fsp_reg_write fails -EIO is not being returned
because the count is being returned instead of the return value in retval.
Fix this by returning the value in retval instead of count.

Addresses-Coverity: ("Unused value")
Fixes: fc69f4a6af49 ("Input: add new driver for Sentelic Finger Sensing Pad")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/r/20200603141218.131663-1-colin.king@canonical.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>watchdog: initialize device before misc_register</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Krzysztof Sobota</name>
<email>krzysztof.sobota@nokia.com</email>
</author>
<published>2020-07-17T10:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ddf2b7891323fe30bfac761d2e12d3378a0d7eb2'/>
<id>urn:sha1:ddf2b7891323fe30bfac761d2e12d3378a0d7eb2</id>
<content type='text'>
[ Upstream commit cb36e29bb0e4b0c33c3d5866a0a4aebace4c99b7 ]

When watchdog device is being registered, it calls misc_register that
makes watchdog available for systemd to open. This is a data race
scenario, because when device is open it may still have device struct
not initialized - this in turn causes a crash. This patch moves
device initialization before misc_register call and it solves the
problem printed below.

------------[ cut here ]------------
WARNING: CPU: 3 PID: 1 at lib/kobject.c:612 kobject_get+0x50/0x54
kobject: '(null)' ((ptrval)): is not initialized, yet kobject_get() is being called.
Modules linked in: k2_reset_status(O) davinci_wdt(+) sfn_platform_hwbcn(O) fsmddg_sfn(O) clk_misc_mmap(O) clk_sw_bcn(O) fsp_reset(O) cma_mod(O) slave_sup_notif(O) fpga_master(O) latency(O+) evnotify(O) enable_arm_pmu(O) xge(O) rio_mport_cdev br_netfilter bridge stp llc nvrd_checksum(O) ipv6
CPU: 3 PID: 1 Comm: systemd Tainted: G           O      4.19.113-g2579778-fsm4_k2 #1
Hardware name: Keystone
[&lt;c02126c4&gt;] (unwind_backtrace) from [&lt;c020da94&gt;] (show_stack+0x18/0x1c)
[&lt;c020da94&gt;] (show_stack) from [&lt;c07f87d8&gt;] (dump_stack+0xb4/0xe8)
[&lt;c07f87d8&gt;] (dump_stack) from [&lt;c0221f70&gt;] (__warn+0xfc/0x114)
[&lt;c0221f70&gt;] (__warn) from [&lt;c0221fd8&gt;] (warn_slowpath_fmt+0x50/0x74)
[&lt;c0221fd8&gt;] (warn_slowpath_fmt) from [&lt;c07fd394&gt;] (kobject_get+0x50/0x54)
[&lt;c07fd394&gt;] (kobject_get) from [&lt;c0602ce8&gt;] (get_device+0x1c/0x24)
[&lt;c0602ce8&gt;] (get_device) from [&lt;c06961e0&gt;] (watchdog_open+0x90/0xf0)
[&lt;c06961e0&gt;] (watchdog_open) from [&lt;c06001dc&gt;] (misc_open+0x130/0x17c)
[&lt;c06001dc&gt;] (misc_open) from [&lt;c0388228&gt;] (chrdev_open+0xec/0x1a8)
[&lt;c0388228&gt;] (chrdev_open) from [&lt;c037fa98&gt;] (do_dentry_open+0x204/0x3cc)
[&lt;c037fa98&gt;] (do_dentry_open) from [&lt;c0391e2c&gt;] (path_openat+0x330/0x1148)
[&lt;c0391e2c&gt;] (path_openat) from [&lt;c0394518&gt;] (do_filp_open+0x78/0xec)
[&lt;c0394518&gt;] (do_filp_open) from [&lt;c0381100&gt;] (do_sys_open+0x130/0x1f4)
[&lt;c0381100&gt;] (do_sys_open) from [&lt;c0201000&gt;] (ret_fast_syscall+0x0/0x28)
Exception stack(0xd2ceffa8 to 0xd2cefff0)
ffa0:                   b6f69968 00000000 ffffff9c b6ebd210 000a0001 00000000
ffc0: b6f69968 00000000 00000000 00000142 fffffffd ffffffff 00b65530 bed7bb78
ffe0: 00000142 bed7ba70 b6cc2503 b6cc41d6
---[ end trace 7b16eb105513974f ]---

------------[ cut here ]------------
WARNING: CPU: 3 PID: 1 at lib/refcount.c:153 kobject_get+0x24/0x54
refcount_t: increment on 0; use-after-free.
Modules linked in: k2_reset_status(O) davinci_wdt(+) sfn_platform_hwbcn(O) fsmddg_sfn(O) clk_misc_mmap(O) clk_sw_bcn(O) fsp_reset(O) cma_mod(O) slave_sup_notif(O) fpga_master(O) latency(O+) evnotify(O) enable_arm_pmu(O) xge(O) rio_mport_cdev br_netfilter bridge stp llc nvrd_checksum(O) ipv6
CPU: 3 PID: 1 Comm: systemd Tainted: G        W  O      4.19.113-g2579778-fsm4_k2 #1
Hardware name: Keystone
[&lt;c02126c4&gt;] (unwind_backtrace) from [&lt;c020da94&gt;] (show_stack+0x18/0x1c)
[&lt;c020da94&gt;] (show_stack) from [&lt;c07f87d8&gt;] (dump_stack+0xb4/0xe8)
[&lt;c07f87d8&gt;] (dump_stack) from [&lt;c0221f70&gt;] (__warn+0xfc/0x114)
[&lt;c0221f70&gt;] (__warn) from [&lt;c0221fd8&gt;] (warn_slowpath_fmt+0x50/0x74)
[&lt;c0221fd8&gt;] (warn_slowpath_fmt) from [&lt;c07fd368&gt;] (kobject_get+0x24/0x54)
[&lt;c07fd368&gt;] (kobject_get) from [&lt;c0602ce8&gt;] (get_device+0x1c/0x24)
[&lt;c0602ce8&gt;] (get_device) from [&lt;c06961e0&gt;] (watchdog_open+0x90/0xf0)
[&lt;c06961e0&gt;] (watchdog_open) from [&lt;c06001dc&gt;] (misc_open+0x130/0x17c)
[&lt;c06001dc&gt;] (misc_open) from [&lt;c0388228&gt;] (chrdev_open+0xec/0x1a8)
[&lt;c0388228&gt;] (chrdev_open) from [&lt;c037fa98&gt;] (do_dentry_open+0x204/0x3cc)
[&lt;c037fa98&gt;] (do_dentry_open) from [&lt;c0391e2c&gt;] (path_openat+0x330/0x1148)
[&lt;c0391e2c&gt;] (path_openat) from [&lt;c0394518&gt;] (do_filp_open+0x78/0xec)
[&lt;c0394518&gt;] (do_filp_open) from [&lt;c0381100&gt;] (do_sys_open+0x130/0x1f4)
[&lt;c0381100&gt;] (do_sys_open) from [&lt;c0201000&gt;] (ret_fast_syscall+0x0/0x28)
Exception stack(0xd2ceffa8 to 0xd2cefff0)
ffa0:                   b6f69968 00000000 ffffff9c b6ebd210 000a0001 00000000
ffc0: b6f69968 00000000 00000000 00000142 fffffffd ffffffff 00b65530 bed7bb78
ffe0: 00000142 bed7ba70 b6cc2503 b6cc41d6
---[ end trace 7b16eb1055139750 ]---

Fixes: 72139dfa2464 ("watchdog: Fix the race between the release of watchdog_core_data and cdev")
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Krzysztof Sobota &lt;krzysztof.sobota@nokia.com&gt;
Link: https://lore.kernel.org/r/20200717103109.14660-1-krzysztof.sobota@nokia.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Ewan D. Milne</name>
<email>emilne@redhat.com</email>
</author>
<published>2020-07-29T23:10:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe9a71128e3dfb4f0fdd6edb7a0ef1d980dfcf1d'/>
<id>urn:sha1:fe9a71128e3dfb4f0fdd6edb7a0ef1d980dfcf1d</id>
<content type='text'>
[ Upstream commit af6de8c60fe9433afa73cea6fcccdccd98ad3e5e ]

We cannot wait on a completion object in the lpfc_nvme_targetport structure
in the _destroy_targetport() code path because the NVMe/fc transport will
free that structure immediately after the .targetport_delete() callback.
This results in a use-after-free, and a crash if slub_debug=FZPU is
enabled.

An earlier fix put put the completion on the stack, but commit 2a0fb340fcc8
("scsi: lpfc: Correct localport timeout duration error") subsequently
changed the code to reference the completion through a pointer in the
object rather than the local stack variable.  Fix this by using the stack
variable directly.

Link: https://lore.kernel.org/r/20200729231011.13240-1-emilne@redhat.com
Fixes: 2a0fb340fcc8 ("scsi: lpfc: Correct localport timeout duration error")
Reviewed-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: rcar: avoid race when unregistering slave</title>
<updated>2020-08-21T09:05:37+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2020-07-26T16:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49b30a64d320b23d7c3a3a67f2501a6ab5518a29'/>
<id>urn:sha1:49b30a64d320b23d7c3a3a67f2501a6ab5518a29</id>
<content type='text'>
[ Upstream commit c7c9e914f9a0478fba4dc6f227cfd69cf84a4063 ]

Due to the lockless design of the driver, it is theoretically possible
to access a NULL pointer, if a slave interrupt was running while we were
unregistering the slave. To make this rock solid, disable the interrupt
for a short time while we are clearing the interrupt_enable register.
This patch is purely based on code inspection. The OOPS is super-hard to
trigger because clearing SAR (the address) makes interrupts even more
unlikely to happen as well. While here, reinit SCR to SDBS because this
bit should always be set according to documentation. There is no effect,
though, because the interface is disabled.

Fixes: 7b814d852af6 ("i2c: rcar: avoid race when unregistering slave client")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Niklas Söderlund &lt;niklas.soderlund+renesas@ragnatech.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
