Skip to content

Commit

Permalink
firewire: core: obsolete usage of GFP_ATOMIC at building node tree
Browse files Browse the repository at this point in the history
The flag of GFP_ATOMIC is given to the call of kmalloc when building node
tree, but the call is not atomic context. The call of
fw_core_handle_bus_reset() and fw_core_remove_card() builds the tree,
while they are done in specific workqueue or pci remove callback.

This commit obsolete the usage of GFP_ATOMIC.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>
  • Loading branch information
takaswie committed Jun 5, 2023
1 parent 5716e58 commit 06f4543
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/firewire/core-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
* without actually having a link.
*/
create:
device = kzalloc(sizeof(*device), GFP_ATOMIC);
device = kzalloc(sizeof(*device), GFP_KERNEL);
if (device == NULL)
break;

Expand Down
2 changes: 1 addition & 1 deletion drivers/firewire/core-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_ATOMIC);
node = kzalloc(struct_size(node, ports, port_count), GFP_KERNEL);
if (node == NULL)
return NULL;

Expand Down

0 comments on commit 06f4543

Please sign in to comment.