lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <e300faf3-ad5c-4702-a022-128c8c983e21@kili.mountain>
Date:   Mon, 17 Jul 2023 12:50:02 +0300
From:   Dan Carpenter <dan.carpenter@...aro.org>
To:     Takashi Sakamoto <o-takashi@...amocchi.jp>
Cc:     linux1394-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] firewire: core: put GFP_ATOMIC back in fw_node_create()

This was recently changed from GFP_ATOMIC to GFP_KERNEL, but it
needs to be GFP_ATOMIC so change it back.  The problematic
call tree is:

fw_core_handle_bus_reset() <- spin_lock_irqsave(&card->lock, flags);
-> build_tree()
   -> fw_node_create() <- sleeping allocation

Fixes: 06f45435d985 ("firewire: core: obsolete usage of GFP_ATOMIC at building node tree")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
 drivers/firewire/core-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c
index 88466b663482..f40c81534381 100644
--- a/drivers/firewire/core-topology.c
+++ b/drivers/firewire/core-topology.c
@@ -101,7 +101,7 @@ static struct fw_node *fw_node_create(u32 sid, int port_count, int color)
 {
 	struct fw_node *node;
 
-	node = kzalloc(struct_size(node, ports, port_count), GFP_KERNEL);
+	node = kzalloc(struct_size(node, ports, port_count), GFP_ATOMIC);
 	if (node == NULL)
 		return NULL;
 
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ