https://github.com/torvalds/linux
Revision 3aac7ada64d8c26ccc922f1ca966043c0dae88da authored by Liang He on 21 September 2022, 13:32:45 UTC, committed by Jakub Kicinski on 22 September 2022, 14:23:58 UTC
In prestera_port_sfp_bind(), there are two refcounting bugs:
(1) we should call of_node_get() before of_find_node_by_name() as
it will automaitcally decrease the refcount of 'from' argument;
(2) we should call of_node_put() for the break of the iteration
for_each_child_of_node() as it will automatically increase and
decrease the 'child'.

Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Yevhen Orlov <yevhen.orlov@plvision.eu>
Link: https://lore.kernel.org/r/20220921133245.4111672-1-windhl@126.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent c2e1cfe
History
Tip revision: 3aac7ada64d8c26ccc922f1ca966043c0dae88da authored by Liang He on 21 September 2022, 13:32:45 UTC
net: marvell: Fix refcounting bugs in prestera_port_sfp_bind()
Tip revision: 3aac7ad
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 19.9 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 151 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 23.7 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 99.1 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 664.3 KB
Makefile -rw-r--r-- 64.5 KB
README -rw-r--r-- 727 bytes

README

back to top