From patchwork Mon Jul 17 09:50:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 121171 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1014758vqt; Mon, 17 Jul 2023 03:10:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZn7YVcBgBqclrTLDcSSIOfiGJ73JBniMAaT67VSP7yBi2M5JnSCBZJXv9ejKauLEUEKV2 X-Received: by 2002:a05:6a00:3989:b0:67a:a4d1:e70 with SMTP id fi9-20020a056a00398900b0067aa4d10e70mr11087340pfb.16.1689588607065; Mon, 17 Jul 2023 03:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689588607; cv=none; d=google.com; s=arc-20160816; b=vtJGZ5doLXoUt20FMOFIATGqnTDxGc81Vxtr4IgbNwnR8Aui6sveswhbmJObwe5ilE Y9gvQwmYBqDFokyg4MPUkD/NxVrSE5CKGlksaFjnmnAtezxlmkH64gARb5F9fKyqm737 +xPu2C+BqsjT3hDnJwpaIWbJrmxBHQDPVn4LoW4Au02Gez5lPAjacpogv0DUvxNEGvqx gcprK1qEWQGqHWPGfOk0XYNcBMNC+FXU6Wu0rIR9b/XJIxQ2pAR8cPR5RNx+EzjwU7rz S+mn1CMNcTEEJJb9g5PXYMnhCiJM074bMalQY16kMk8Zfdbbm5b/z+bmthR0eSu0y51L EVvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=UHlCYgjw3sGv5X4Rh41zT7Cz0UApml3bPiXbTYKgKB4=; fh=12bw8pK0B2eoFhckdwqnxaQlgfqE88aGhwc+0OUgVZo=; b=nujWL3oCmWkFfi8sWP8hyDBP5DRyM21rMBKYpL9Qm9IQCzs0MfAY+GJVzGxqGt6jM/ koPJvpMwZ9Y/czHNetzQ0x9OkWmvBtrxudyHwQyfX2ftYzXz7XEK+gKyRxKN5jywS1fz NFJYM0DgYj30JqcnV4Xr8Cea9P0w4L+cBNOp917sP9ajMe6E4U0yZhWXmbM/0uJsY1DW ei/hKrPikXFmxxHHa9lo649E/h9ChWLMOlAPNdH84EX5WTO3pEkxPrq59iK3DxPcu4Md o3qsqRQHKZ7Wk377qqG2ibcpcrnLJVLzMCEGT5mkTlIK1Y2mFFbCbw2JQI0nGWQBQNp3 n4RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uZn+r1p4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w67-20020a636246000000b0055fe651e9cesi3080748pgb.796.2023.07.17.03.09.54; Mon, 17 Jul 2023 03:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uZn+r1p4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230326AbjGQJuQ (ORCPT + 99 others); Mon, 17 Jul 2023 05:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230095AbjGQJuO (ORCPT ); Mon, 17 Jul 2023 05:50:14 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F8811A3 for ; Mon, 17 Jul 2023 02:50:09 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3144bf65ce9so4066852f8f.3 for ; Mon, 17 Jul 2023 02:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689587408; x=1692179408; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=UHlCYgjw3sGv5X4Rh41zT7Cz0UApml3bPiXbTYKgKB4=; b=uZn+r1p4QIZuoah4Ce+XfaOMOBX6Cm212+xmfzaNY9nI8ClKQQPurJnYlgHvkb2plk LkjcTRNlRA7v7NCsFrWp+bnH+BK8MPMzELnviSYlipTvbJqwcoLxFkYugBaiwDelsHlj 7CKb5gU9vlyhzAlf4EbGFTIu4SXAA322IHFEYLMfk4WM5TUEZ39i6mTf9tcxXZP7eg5E socjfxUGHfJN0z0bTdDTit2Ckx7aMR0BvSQxK6FtRqERMajXK+hZQY3P8e4lR+qZObAc WsI2v+K5GMGWY/CyiWrdquwtW5OzYiXDDAL4ewaAsu49fuGY7+dBFM2wllJy9xZdE7t+ g0Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689587408; x=1692179408; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UHlCYgjw3sGv5X4Rh41zT7Cz0UApml3bPiXbTYKgKB4=; b=UYtYZ7DdvRGBYPG4M7EOZ6FLhlBaU/8IdQJcUkATowRoAgUeAxZk7NXLbnX7ohusOv XuKhqeyL+vUSgJTHmJ+ESrC68vPsCWq0lfSBWdYkYwfeMisdtNjWo++cuDZlTv1WrrDE Wj9ZmRWY1Tws1xySIO0GoExhZ+ypIEJ7hbCwSzJ2+DG6SOH/9hMkntYbTt3MKujtX0a2 uAFpDblvNY+WsgTcbMveRgUPz9rKUly58MUOOeWUSC6lPKA/EAj9x3RqQ85VV2kdAjgK BInVCKVkf6HuY7onn4pDdZVrKYoQVXAjBuM2afmPna+davOdyscqCtq5s+KUXlWKdC0e iUGA== X-Gm-Message-State: ABy/qLYlcNPyne1nqW7R9bbV4RaxeLwFmzKj1OmIrtseCfXuzgIVp8Aa zu8sz3TuDDAHZkPihPBVi4YPLA== X-Received: by 2002:adf:f044:0:b0:313:efed:9162 with SMTP id t4-20020adff044000000b00313efed9162mr8459155wro.59.1689587407918; Mon, 17 Jul 2023 02:50:07 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id r7-20020a5d6947000000b00313fd294d6csm19002391wrw.7.2023.07.17.02.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 02:50:06 -0700 (PDT) Date: Mon, 17 Jul 2023 12:50:02 +0300 From: Dan Carpenter To: Takashi Sakamoto Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] firewire: core: put GFP_ATOMIC back in fw_node_create() Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771662063400637764 X-GMAIL-MSGID: 1771662063400637764 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 --- 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;