mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
w1: fix loop in w1_fini()
[ Upstream commit83f3fcf96f] The __w1_remove_master_device() function calls: list_del(&dev->w1_master_entry); So presumably this can cause an endless loop. Fixes:7785925dd8("[PATCH] w1: cleanups.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
eab6485377
commit
c3f5604aba
@@ -1263,10 +1263,10 @@ err_out_exit_init:
|
|||||||
|
|
||||||
static void __exit w1_fini(void)
|
static void __exit w1_fini(void)
|
||||||
{
|
{
|
||||||
struct w1_master *dev;
|
struct w1_master *dev, *n;
|
||||||
|
|
||||||
/* Set netlink removal messages and some cleanup */
|
/* Set netlink removal messages and some cleanup */
|
||||||
list_for_each_entry(dev, &w1_masters, w1_master_entry)
|
list_for_each_entry_safe(dev, n, &w1_masters, w1_master_entry)
|
||||||
__w1_remove_master_device(dev);
|
__w1_remove_master_device(dev);
|
||||||
|
|
||||||
w1_fini_netlink();
|
w1_fini_netlink();
|
||||||
|
|||||||
Reference in New Issue
Block a user