Thanks.
Reviewed-by: Wen Yang
--
Best wishes,
Wen
On 2025/5/13 15:44, Ryan Chung wrote:
- Rename test from to
- Make the RDWR‐flag comment declarative:
“The kernel automatically adds the O_RDWR flag.”
- Update semaphore‐flag failure message to:
“eventfd semaphore flag check failed
context, not necessarily that it must not sleep.
This patch fixes these comments.
Suggested-by: Bjorn Andersson
Signed-off-by: Wen Yang
Cc: Bjorn Andersson
Cc: Baolin Wang
Cc: Dave Young
Cc: linux-remotep...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Documentation/locking/hwspin
On 2024/8/27 00:37, Bjorn Andersson wrote:
On Sat, Aug 24, 2024 at 10:38:47PM GMT, Wen Yang wrote:
Both __hwspin_trylock and __hwspin_unlock use hwlock->lock, and require
running in atomic context, with a special annotation:
function will never sleep.
However, this requirement is
Both __hwspin_trylock and __hwspin_unlock use hwlock->lock, and require
running in atomic context, with a special annotation:
function will never sleep.
However, this requirement is not fulfilled on PREEMPT_RT.
To address it, use raw_spinlock_t instead of spin_lock_t.
Signed-off-by: Wen Yang
IO
has not returned here is that the process handling IO in the BM hypervisor
has failed.
The cpu resources of the cloud server are precious, and the server
cannot be restarted after running for a long time. So it's slightly
optimized here to prevent the CPU from being 100% occupied.
Signed-off-b
在 2021/4/11 下午12:25, Theodore Ts'o 写道:
On Sun, Apr 11, 2021 at 03:45:01AM +0800, Wen Yang wrote:
At this time, some logs are lost. It is suspected that the hard disk itself
is faulty.
If you have a kernel crash dump, that means you can extract out the
dmesg buffer, correct? Is there
在 2021/4/9 下午1:47, riteshh 写道:
On 21/04/09 02:50AM, Wen Yang wrote:
On Apr 7, 2021, at 5:16 AM, riteshh wrote:
On 21/04/07 03:01PM, Wen Yang wrote:
From: Wen Yang
The kworker has occupied 100% of the CPU for several days:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
68086
> On Apr 7, 2021, at 5:16 AM, riteshh wrote:
>>
>> On 21/04/07 03:01PM, Wen Yang wrote:
>>> From: Wen Yang
>>>
>>> The kworker has occupied 100% of the CPU for several days:
>>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
>
From: Wen Yang
The kworker has occupied 100% of the CPU for several days:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
68086 root 20 0 00 0 R 100.0 0.0 9718:18 kworker/u64:11
And the stack obtained through sysrq is as follows:
[20613144.850426] task: 8800b5e08000
在 2021/1/8 上午2:28, Greg Kroah-Hartman 写道:
On Fri, Jan 08, 2021 at 12:21:38AM +0800, Wen Yang wrote:
在 2021/1/7 下午8:17, Greg Kroah-Hartman 写道:
On Thu, Jan 07, 2021 at 03:52:12PM +0800, Wen Yang wrote:
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted
在 2021/1/7 下午8:17, Greg Kroah-Hartman 写道:
On Thu, Jan 07, 2021 at 03:52:12PM +0800, Wen Yang wrote:
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted when the process exits.
Suppose the following race appears:
release_task dput
Cc: Kees Cook
Cc: Thomas Gleixner
Cc: David Howells
Cc: "Michael Kerrisk (man-pages)"
Cc: Andy Lutomirsky
Cc: Andrew Morton
Cc: Aleksa Sarai
Cc: Linus Torvalds
Cc: Al Viro
Cc: # 4.19.x
(clone: fix up cherry-pick conflicts for b3e583825266)
Signed-off-by: Wen Yang
---
include/
ot;
Cc: # 4.19.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index fffc7e4..45b4344 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -34,21 +34,27 @@ static void proc
make this
code robust to future changes in proc.
Signed-off-by: "Eric W. Biederman"
Cc: # 4.19.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 16 ++--
fs/proc/internal.h| 2 +-
fs/proc/proc_sysctl.c | 8
3 files changed, 19 insertions(+), 7 deletions
eg Nesterov
Cc: kernel-t...@android.com
Reviewed-by: Oleg Nesterov
Co-developed-by: Daniel Colascione
Signed-off-by: Daniel Colascione
Signed-off-by: Joel Fernandes (Google)
Signed-off-by: Christian Brauner
Cc: # 4.19.x
Signed-off-by: Wen Yang
---
include/linux/pid.h | 3 +++
kernel/fo
a generic name so it is clear that
it is no longer sysctl specific.
Also for good measure initialize sibling_inodes when
proc_inode is initialized.
Signed-off-by: Eric W. Biederman
Cc: # 4.19.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 1 +
fs/proc/internal.h| 2 +-
fs/proc/pro
proc_sys_prune_dcache into proc_prune_siblings_dcache
Cc: # 4.19.x: 71448011ea2a: proc: Clear the
pieces of
proc_inode that proc_evict_inode cares about
Cc: # 4.19.x: f90f3cafe8d5: Use d_invalidate in
proc_prune_siblings_dcache
Cc: # 4.19.x
Signed-off-by: Wen Yang
---
fs/proc/base.c |
From: "Eric W. Biederman"
[ Upstream commit 26dbc60f385ff9cff475ea2a3bad02e80fd6fa43 ]
This prepares the way for allowing the pid part of proc to use this
dcache pruning code as well.
Signed-off-by: Eric W. Biederman
Cc: # 4.19.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c
ot to have
things work as expected in a container.
Signed-off-by: "Eric W. Biederman"
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/base.c | 102 ++---
fs/proc/fd.c | 12 +--
fs/proc/internal.h | 16 ++---
3 files ch
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted when the process exits.
Suppose the following race appears:
release_task dput
-> proc_flush_task
-> dentry->d_op->d_delete(dentry)
-> __exit_signal
1120203005.GA27743@avx2
Signed-off-by: Alexey Dobriyan
Cc: Alexander Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/base.c| 16
fs/proc/fd.c | 2 +-
fs/proc/self.c| 6 +++--
uot;
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 920c761..739fb9c 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -32,21 +32,27 @@ static void proc_evict_
cache
Cc: # 4.9.x: 71448011ea2a: proc: Clear the pieces of
proc_inode that proc_evict_inode cares about
Cc: # 4.9.x: f90f3cafe8d5: Use d_invalidate in
proc_prune_siblings_dcache
Cc: # 4.9.x
(proc: fix up cherry-pick conflicts for 7bc3e6e55acf)
Sig
Cc: Kees Cook
Cc: Thomas Gleixner
Cc: David Howells
Cc: "Michael Kerrisk (man-pages)"
Cc: Andy Lutomirsky
Cc: Andrew Morton
Cc: Aleksa Sarai
Cc: Linus Torvalds
Cc: Al Viro
Cc: # 4.9.x
(clone: fix up cherry-pick conflicts for b3e583825266)
Signed-off-by: Wen Yang
---
include/
5f)
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 38 ++
fs/proc/internal.h| 1 +
fs/proc/proc_sysctl.c | 35 +--
3 files changed, 40 insertions(+), 34 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
ind
a generic name so it is clear that
it is no longer sysctl specific.
Also for good measure initialize sibling_inodes when
proc_inode is initialized.
Signed-off-by: Eric W. Biederman
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 1 +
fs/proc/internal.h| 2 +-
fs/proc/pro
make this
code robust to future changes in proc.
Signed-off-by: "Eric W. Biederman"
Cc: # 4.9.x
(proc: fix up cherry-pick conflicts for f90f3cafe8d5)
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 16 ++--
fs/proc/internal.h| 2 +-
fs/proc/proc_sysctl.c |
sclass right away without introducing "half-initialized" inode
security structs.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Paul Moore
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/base.c | 23 +--
fs/proc/fd.c | 6 ++
fs/proc/inter
eg Nesterov
Cc: kernel-t...@android.com
Reviewed-by: Oleg Nesterov
Co-developed-by: Daniel Colascione
Signed-off-by: Daniel Colascione
Signed-off-by: Joel Fernandes (Google)
Signed-off-by: Christian Brauner
Cc: # 4.9.x
(pidfd: fix up cherry-pick conflicts for b53b0b9d9a61)
Signed-o
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted when the process exits.
Suppose the following race appears:
release_task dput
-> proc_flush_task
-> dentry->d_op->d_delete(dentry)
-> __exit_signal
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted when the process exits.
Suppose the following race appears:
release_task dput
-> proc_flush_task
-> dentry->d_op->d_delete(dentry)
-> __exit_signal
在 2020/12/31 下午5:22, Greg Kroah-Hartman 写道:
On Thu, Dec 17, 2020 at 10:26:23AM +0800, Wen Yang wrote:
在 2020/12/4 上午2:31, Wen Yang 写道:
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted when the process exits.
Suppose the following race appears
在 2020/12/4 上午2:31, Wen Yang 写道:
The dentries such as /proc//ns/ have the DCACHE_OP_DELETE flag, they
should be deleted when the process exits.
Suppose the following race appears:
release_task dput
-> proc_flush_task
-> dentry->d_op-
9.x: 7144801: proc: Clear the pieces of
proc_inode that proc_evict_inode cares about
Cc: # 4.9.x: f90f3ca: Use d_invalidate in
proc_prune_siblings_dcache
Cc: # 4.9.x
(proc: fix up cherry-pick conflicts for 7bc3e6e55acf)
Signed-off-by: Wen Yang
---
fs/proc/base.c | 111 --
make this
code robust to future changes in proc.
Signed-off-by: "Eric W. Biederman"
Cc: # 4.9.x
(proc: fix up cherry-pick conflicts for f90f3cafe8d5)
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 16 ++--
fs/proc/internal.h| 2 +-
fs/proc/proc_sysctl.c |
5f)
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 38 ++
fs/proc/internal.h| 1 +
fs/proc/proc_sysctl.c | 35 +--
3 files changed, 40 insertions(+), 34 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
ind
uot;
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 920c761..739fb9c 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -32,21 +32,27 @@ static void proc_evict_
1120203005.GA27743@avx2
Signed-off-by: Alexey Dobriyan
Cc: Alexander Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/base.c| 16
fs/proc/fd.c | 2 +-
fs/proc/self.c| 6 +++--
a generic name so it is clear that
it is no longer sysctl specific.
Also for good measure initialize sibling_inodes when
proc_inode is initialized.
Signed-off-by: Eric W. Biederman
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/inode.c | 1 +
fs/proc/internal.h| 2 +-
fs/proc/pro
ot to have
things work as expected in a container.
Signed-off-by: "Eric W. Biederman"
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/base.c | 102 ++---
fs/proc/fd.c | 12 +--
fs/proc/internal.h | 16 ++---
3 files ch
sclass right away without introducing "half-initialized" inode
security structs.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Paul Moore
Cc: # 4.9.x
Signed-off-by: Wen Yang
---
fs/proc/base.c | 23 +--
fs/proc/fd.c | 6 ++
fs/proc/inter
Cc: Kees Cook
Cc: Thomas Gleixner
Cc: David Howells
Cc: "Michael Kerrisk (man-pages)"
Cc: Andy Lutomirsky
Cc: Andrew Morton
Cc: Aleksa Sarai
Cc: Linus Torvalds
Cc: Al Viro
Cc: # 4.9.x
(clone: fix up cherry-pick conflicts for b3e583825266)
Signed-off-by: Wen Yang
---
include/
k conflicts for b53b0b9d9a61)
Signed-off-by: Wen Yang
---
include/linux/pid.h | 3 +++
kernel/fork.c | 26 ++
kernel/pid.c| 2 ++
kernel/signal.c | 11 +++
4 files changed, 42 insertions(+)
diff --git a/include/linux/pid.h b/include/linux/pid.
= 0644,
+ .proc_handler = proc_dointvec,
+ .extra1 = &zero,
+ },
+ {
+ .procname = "dentry_debug_pid",
+ .data = &sysctl_dentry_debug_pid,
+ .maxlen = sizeof(sysctl_
在 2020/11/29 下午2:05, Greg Kroah-Hartman 写道:
On Sat, Nov 28, 2020 at 11:28:53PM +0800, Wen Yang wrote:
在 2020/11/28 下午10:05, Greg Kroah-Hartman 写道:
On Sat, Nov 28, 2020 at 09:59:09PM +0800, Wen Yang wrote:
在 2020/11/28 下午4:06, Greg Kroah-Hartman 写道:
On Sat, Nov 28, 2020 at 02:47:22PM
The proc_inode_is_dead function might race with __unhash_process.
This will result in a whole bunch of stale proc entries being cached.
To prevent that, add the required locking.
Signed-off-by: Wen Yang
Cc: Oleg Nesterov
Cc: "Eric W. Biederman"
Cc: Alexey Dobriyan
Cc: Christian B
ngs_dcache")
f90f3cafe8d5 ("proc: Use d_invalidate in proc_prune_siblings_dcache")
Signed-off-by: Wen Yang
Cc: Eric W. Biederman
Cc: sta...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
on 2020/8/6 PM5:09, Wen Yang wrote:
在 2020/8/5 上午6:58, David Miller 写道:
From: Wen Yang
Date: Sat, 1 Aug 2020 16:58:45 +0800
diff --git a/net/core/link_watch.c b/net/core/link_watch.c
index 75431ca..6b9d44b 100644
--- a/net/core/link_watch.c
+++ b/net/core/link_watch.c
@@ -98,6 +98,9
在 2020/8/5 上午6:58, David Miller 写道:
From: Wen Yang
Date: Sat, 1 Aug 2020 16:58:45 +0800
diff --git a/net/core/link_watch.c b/net/core/link_watch.c
index 75431ca..6b9d44b 100644
--- a/net/core/link_watch.c
+++ b/net/core/link_watch.c
@@ -98,6 +98,9 @@ static bool linkwatch_urgent_event
educed from 366ms to 50ms.
Signed-off-by: Wen Yang
Cc: "David S. Miller"
Cc: Jakub Kicinski
Cc: Andrew Lunn
Cc: Eric Dumazet
Cc: Jiri Pirko
Cc: Leon Romanovsky
Cc: Julian Wiedmann
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
net/core/link_watch.c | 3 +++
net/core/rtn
M=usb_role
DEVTYPE=usb_role_switch
USB_ROLE_SWITCH=ci_hdrc.0-role-switch
SEQNUM=2432
Cc: Heikki Krogerus
Cc: Greg Kroah-Hartman
Cc: Chunfeng Yun
Cc: Suzuki K Poulose
Cc: Alexandre Belloni
Cc: Wen Yang
Cc: chenqiwu
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bryan O'Donoghue
---
dr
-by: Wen Yang
Cc: Andy Whitcroft (maintainer:CHECKPATCH)
Cc: Joe Perches (maintainer:CHECKPATCH)
Cc: Stephen Rothwell
Cc: "David S. Miller"
Cc: linux-kernel@vger.kernel.org (open list)
---
scripts/checkpatch.pl | 21 -
1 file changed, 20 insertions(+), 1 deletio
On 2019/10/2 1:03 上午, David Miller wrote:
From: Wen Yang
Date: Sun, 29 Sep 2019 15:00:47 +0800
of_node_put needs to be called when the device node which is got
from of_get_child_by_name finished using.
irq_domain_add_linear() also calls of_node_get() to increase refcount,
so irq_domain will
On 2019/10/2 1:02 上午, David Miller wrote:
From: Wen Yang
Date: Sun, 29 Sep 2019 14:54:24 +0800
of_node_put needs to be called when the device node which is got
from of_get_child_by_name finished using.
In both cases of success and failure, we need to release 'ports',
so clean u
k SMI driver")
Signed-off-by: Wen Yang
Cc: Linus Walleij
Cc: Andrew Lunn
Cc: Vivien Didelot
Cc: Florian Fainelli
Cc: "David S. Miller"
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/net/dsa/rtl8366rb.c | 16 ++--
1 file changed, 10 insert
of_node_put needs to be called when the device node which is got
from of_get_child_by_name finished using.
In both cases of success and failure, we need to release 'ports',
so clean up the code using goto.
fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support"
of_node_put needs to be called when the device node which is got
from of_get_child_by_name finished using.
fixes: 2290aefa2e90 ("can: dev: Add support for limiting configured bitrate")
Signed-off-by: Wen Yang
Cc: Wolfgang Grandegger
Cc: Marc Kleine-Budde
Cc: "David S. Miller&q
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh Kumar
d by the r_use_after_put rule)
Suggested-by: Julia Lawall
Signed-off-by: Wen Yang
Cc: Julia Lawall
Cc: Gilles Muller
Cc: Nicolas Palix
Cc: Michal Marek
Cc: Masahiro Yamada
Cc: Wen Yang
Cc: Markus Elfring
Cc: co...@systeme.lip6.fr
---
v3: delete the global set, add a rule that checks fo
We developed a coccinelle SmPL to detect sound/soc/samsung/odroid.c and
found some use-after-free problems.
This patch series fixes those problems.
Wen Yang (2):
ASoC: samsung: odroid: fix an use-after-free issue for codec
ASoC: samsung: odroid: fix a double-free issue for cpu_dai
sound/soc
; jump to err_put_clk_i2s
...
err_put_clk_i2s:
clk_put(priv->clk_i2s_bus);
err_put_sclk:
clk_put(priv->sclk_i2s);
err_put_cpu_dai:
of_node_put(cpu_dai);--> double-free here
Fixes: d832d2b246c5 ("ASoC: samsung: odroid: Fix of_node refcount unbalan
The codec variable is still being used after the of_node_put() call,
which may result in use-after-free.
Fixes: bc3cf17b575a ("ASoC: samsung: odroid: Add support for secondary CPU DAI")
Signed-off-by: Wen Yang
Cc: Krzysztof Kozlowski
Cc: Sangbeom Kim
Cc: Sylwester Nawrocki
Cc: Lia
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh Kumar
The node variable is still being used after the of_node_put() call,
which may result in use-after-free.
Fixes: cfc652a73331 ("ASoC: simple-card: tidyup prefix for snd_soc_codec_conf")
Signed-off-by: Wen Yang
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc
We developed a coccinelle SmPL to detect sound/sooc/generic code and
found some use-after-free problems.
This patch series fixes those problems.
Wen Yang (4):
ASoC: simple-card: fix an use-after-free in simple_dai_link_of_dpcm()
ASoC: simple-card: fix an use-after-free in simple_for_each_link
After calling of_node_put() on the ports, port, and node variables,
they are still being used, which may result in use-after-free.
Fix this issue by calling of_node_put() after the last usage.
Fixes: dd98fbc558a0 ("ASoC: audio-graph-card: cleanup DAI link loop method -
step1")
Signed-o
The codec variable is still being used after the of_node_put() call,
which may result in use-after-free.
Fixes: d947cdfd4be2 ("ASoC: simple-card: cleanup DAI link loop method - step1")
Signed-off-by: Wen Yang
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc
After calling of_node_put() on the node variable, it is still being
used, which may result in use-after-free.
Fix this issue by calling of_node_put() after the last usage.
Fixes: a0c426fe1433 ("ASoC: simple-card-utils: check "reg" property on
asoc_simple_card_get_dai_id()"
Commit-ID: 7c8e90ddf02f139a90bc29c04302e9914818f0c8
Gitweb: https://git.kernel.org/tip/7c8e90ddf02f139a90bc29c04302e9914818f0c8
Author: Wen Yang
AuthorDate: Mon, 8 Jul 2019 14:19:04 +0800
Committer: Thomas Gleixner
CommitDate: Tue, 9 Jul 2019 14:53:50 +0200
irqchip/renesas-rza1
Rename the jump labels according to the cleanup they perform,
and move reference handling to simplify cleanup.
Signed-off-by: Wen Yang
Cc: Scott Wood
Cc: Kumar Gala
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc: Markus Elfring
Cc: linuxppc-...@lists.ozlabs.org
Cc
The immr_node variable is still being used after the of_node_put() call,
which may result in use-after-free.
Fix this issue by calling of_node_put() after the last usage.
Fixes: fd066e850351 ("powerpc/mpc8308: fix USB DR controller initialization")
Signed-off-by: Wen Yang
Cc: Scot
Fix use-after-free in mpc831x_usb_cfg() and do some cleanups.
According to Markus's suggestion, split it into two small patches:
https://lkml.org/lkml/2019/7/8/520
Wen Yang (2):
powerpc/83xx: fix use-after-free in mpc831x_usb_cfg()
powerpc/83xx: cleanup error paths in mpc831x_usb_cfg()
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh Kumar
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh
The gic_node is still being used in the rza1_irqc_parse_map() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a644ccb819bc ("irqchip: Add Renesas RZ/A1 Interrupt Controller driver")
Signed-off-by: Wen Yang
Cc: Thomas Gleixner
Cc: Jason Cooper
Cc: Marc Z
The regmap_node variable is still being used in the syscon_node_to_regmap()
call after the of_node_put() call, which may result in use-after-free.
Fixes: 71e2f5c5c224 ("phy: ti: Add a new SERDES driver for TI's AM654x SoC")
Signed-off-by: Wen Yang
Cc: Kishon Vijay Abraham I
Cc
The cpu variable is still being used in the of_get_property() call
after the of_node_put() call, which may result in use-after-free.
Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak")
Signed-off-by: Wen Yang
Cc: "Rafael J. Wysocki"
Cc: Viresh
The phy_dn variable is still being used in of_phy_connect() after the
of_node_put() call, which may result in use-after-free.
Fixes: 1dd2d06c0459 ("net: Rework pasemi_mac driver to use of_mdio
infrastructure")
Signed-off-by: Wen Yang
Cc: "David S. Miller"
Cc: Thoma
axistream-connected attribute
optional")
Signed-off-by: Wen Yang
Cc: Anirudha Sarangi
Cc: John Linn
Cc: "David S. Miller"
Cc: Michal Simek
Cc: Robert Hancock
Cc: net...@vger.kernel.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/net/ethern
The gpr_np variable is still being used in dev_dbg() after the
of_node_put() call, which may result in use-after-free.
Fixes: de3578c198c6 ("can: flexcan: add self wakeup support")
Signed-off-by: Wen Yang
Cc: Wolfgang Grandegger
Cc: Marc Kleine-Budde
Cc: "David S. Mil
The np variable is still being used after the of_node_put() call,
which may result in use-after-free.
We fix this issue by calling of_node_put() after the last usage.
Fixes: 3eb906c6b6c1 ("powerpc: Make cpu_to_chip_id() available when SMP=n")
Signed-off-by: Wen Yang
Cc: Benjamin Her
; dereferenced here
...
484 #endif
485 }
We solve this problem by introducing a new parent_np variable.
Fixes: 9deaa53ac7fa ("serial: add irq handler for Freescale 16550 errata.")
Signed-off-by: Wen Yang
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc: Rob Herring
ned-off-by: Wen Yang
Cc: Scott Wood
Cc: Kumar Gala
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc: linuxppc-...@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/platforms/83xx/usb.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
di
ned-off-by: Wen Yang
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc: Kuninori Morimoto
Cc: alsa-de...@alsa-project.org
Cc: linux-kernel@vger.kernel.org
---
sound/soc/generic/audio-graph-card.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
corresponding object release within this function.
drivers/media/platform/xilinx/xilinx-tpg.c:764:1-7: ERROR: missing of_node_put;
acquired a node pointer with refcount incremented on line 717, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: Patrice
corresponding object release within this function.
drivers/media/platform/xilinx/xilinx-tpg.c:764:1-7: ERROR: missing of_node_put;
acquired a node pointer with refcount incremented on line 717, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: Patrice
issues.
Wen Yang (3):
media: xilinx: fix leaked of_node references
media: exynos4-is: fix leaked of_node references
media: ti-vpe: fix leaked of_node references
drivers/media/platform/exynos4-is/fimc-is.c | 1 +
drivers/media/platform/exynos4-is/media-dev.c | 2 ++
drivers/media
refcount incremented on line 1607, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: Benoit Parrot
Cc: Mauro Carvalho Chehab
Cc: linux-me...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/media/platform/ti-vpe/cal.c | 1 +
1 file changed, 1
without a corresponding object release within this function.
drivers/media/platform/exynos4-is/media-dev.c:534:1-7: ERROR: missing
of_node_put; acquired a node pointer with refcount incremented on line 499, but
without a corresponding object release within this function.
Signed-off-by: Wen Yang
Cc
issues.
Wen Yang (4):
media: venus: firmware: fix leaked of_node references
media: mtk-vpu: fix leaked of_node references
media: mtk-vcodec: fix leaked of_node references
media: xilinx: fix leaked of_node references
drivers/media/platform/exynos4-is/fimc-is.c | 1 +
drivers
/arm/mach-rockchip/platsmp.c:303:3-9: ERROR: missing of_node_put;
acquired a node pointer with refcount incremented on line 294, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Reviewed-by: Florian Fainelli
Suggested-by: Heiko Stuebner
Cc: Russell King
)
Signed-off-by: Wen Yang
Cc: Alan Tull
Cc: Moritz Fischer
Cc: Nicolas Saenz Julienne
Cc: linux-f...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/fpga/stratix10-soc.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/fpga/stratix10-soc.c b/drivers
issues.
Wen Yang (3):
firmware: arm_sdei: fix leaked of_node references
firmware: psci: fix leaked of_node references
firmware: stratix10-svc: fix leaked of_node references
drivers/firmware/arm_sdei.c | 1 +
drivers/firmware/psci.c | 4 +++-
drivers/firmware/stratix10-svc.c
dei.c:1091:1-7: ERROR: missing of_node_put; acquired a
node pointer with refcount incremented on line 1082, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: James Morse
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
dr
680 if (!np || !of_device_is_available(np))
682 return -ENODEV; ---> leaked here
...
686 return init_fn(np); ---> released here
687 }
Detected by using coccinelle.
Signed-off-by: Wen Yang
Cc: Mark Rutland
Cc: Lorenzo Pieralisi
Cc: linux-a
count incremented on line 1014, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: Greg Kroah-Hartman
Cc: Alan Tull
Cc: Richard Gong
Cc: Nicolas Saenz Julienne
Cc: linux-kernel@vger.kernel.org
---
drivers/firmware/stratix10-svc.c | 14 ++
1
drivers/power/supply/ab8500_bmdata.c:511:2-8: ERROR: missing of_node_put;
acquired a node pointer with refcount incremented on line 502, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: Sebastian Reichel
Cc: linux...@vger.kernel.org
Cc: linux-kerne
:1-7: ERROR: missing of_node_put;
acquired a node pointer with refcount incremented on line 595, but without a
corresponding object release within this function.
Signed-off-by: Wen Yang
Cc: Sebastian Reichel
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/power/supply
1 - 100 of 235 matches
Mail list logo