Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp190938iob; Tue, 17 May 2022 23:20:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6JmEp7vweSPau36AAghVTNz81DPO3iJKe0W2WZOTWGNEW/FneU/3f1Cq8M6F+3fthTlTF X-Received: by 2002:a17:903:240c:b0:153:c452:f282 with SMTP id e12-20020a170903240c00b00153c452f282mr25497571plo.88.1652854827426; Tue, 17 May 2022 23:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652854827; cv=none; d=google.com; s=arc-20160816; b=z4p9NcYWfQeVh4tSnmVuCEsIGggWcCmRRAwBtN+mtiwYXlLy6px04Y/sbhBwN07RWo yNEGTlryrfTXq57kx8aPd2M5q6YT1QbtcmGBKZsVcFMfIaeJpyFDMtLi36Mrhb12QmbP I5fClwPo6geegQ2TobV2HZKWGX/3xlvZQZoN4cq+2S5OBStWiDebI92E2qSr88PyaaCo m2039n1rdFpkKnjf26/xnjwiEnmqb3NQrMkL47p54zKleeX0tj8fF6/2ueInh6ihMyLj lcIPutLsm6Ymjpk0SKA8I0gIZLlmuh1FSH9k6EctzF1vBba4f2T+xXqGbBRYauexKcrA nc0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NY8GpNn3ouqYPF3eic3S/ZQvlCNUF5XAtgPk9wl+rm0=; b=Hbh676oHbXJOzQFqoLM85o05gznaCQHhCI5SCp7qrZj42kgHJ30Ogg8pNQcJTVk0ro AhVy+BlK/xpXJd6NI1OKpt/nYPeMspnqs3QWeLzmLaDIKcf5XwfAxu9nrC3tFPfWdEhN FidbL5hML0z5mFzoQvGruClXkdLupeNUKJFNJZdSl1mUFsG6OhmFGguFwVUlAqd8WmIq 5eTlVTR9PySfNF+YKo2+Lm8xOyA4dire58Pw6QcmU5iXOA6K8ibX3Vfdzt89Z1i4rwm+ wue7JJTfZKdLlfOvNzpD0ln25Dy+Dk3yf2idlFDh/w+LONhwv0+0jt2WEFhj8qJvIH6I mO6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=b8c46vdY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r1-20020aa79ec1000000b00517cafbba6csi1798334pfq.145.2022.05.17.23.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 23:20:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=b8c46vdY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8EF7AC6E75; Tue, 17 May 2022 23:20:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230491AbiERGUP (ORCPT + 99 others); Wed, 18 May 2022 02:20:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230421AbiERGUN (ORCPT ); Wed, 18 May 2022 02:20:13 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A6FE6C0F4 for ; Tue, 17 May 2022 23:20:11 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so2554500wmj.1 for ; Tue, 17 May 2022 23:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NY8GpNn3ouqYPF3eic3S/ZQvlCNUF5XAtgPk9wl+rm0=; b=b8c46vdYjeWBbn0XMdRJguDoxnmC5sZgPyGV4+/mX8+WOLitHXwcKu1OKRIVtijzxg DWaVcdVj1CJHc8VV888C2pNoxc4NXxYGoPFfYTWN072HzrAxgt7K5EKXhBe8U0WX49tj DDyUxOo1q2sARKc/5wxojJqa0NVRmJ4RgLgyg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NY8GpNn3ouqYPF3eic3S/ZQvlCNUF5XAtgPk9wl+rm0=; b=kzL+M9dybepRRd5qStFXu0el8sXcKDyl0E63GAPnDMrF1EbPiG4xGGxcpRCRcEUeFI GUOg7qLgMaviOrv4VnMfqk2e5mQwydJI5e3SD/bR256enk6MWABAqvN70cN5fnhab8Om wO/g0V+KE5G5MJokfLObxfAbRkaUdsu+WU0jud9OhRbq4FvB9IjwH6OwSrVreiY5t4cp e3oBl6d9gMhAbpL6pEESnggZ1sS9tzHWHtbENpOYKyZh/l/lJ4DiocLf25RfZ6qfA5Y1 uCQOQzh2kiYpdrRXexoyeN+pLdtIrdnrSlLAvoeyWYiNicUFjgsoBc5QjSBR3D25ohCZ 1/4g== X-Gm-Message-State: AOAM5307lmbm8pRddDav/O1cdH8kcH1mEXzi6W/PHAb9Fs/7gl2EYhT/ dyiD9k4xN+kGsMLc4bV/mSpsPg== X-Received: by 2002:a05:600c:3d8b:b0:397:87e:c8df with SMTP id bi11-20020a05600c3d8b00b00397087ec8dfmr11998118wmb.187.1652854810094; Tue, 17 May 2022 23:20:10 -0700 (PDT) Received: from localhost.localdomain (mob-37-180-41-238.net.vodafone.it. [37.180.41.238]) by smtp.gmail.com with ESMTPSA id u23-20020a05600c00d700b003942a244f42sm4105169wmm.27.2022.05.17.23.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 23:20:09 -0700 (PDT) From: Michael Trimarchi To: Joakim Zhang , Liam Girdwood , Jakub Kicinski Cc: Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: fec: Avoid allocating rx buffer using ATOMIC in ndo_open Date: Wed, 18 May 2022 08:20:07 +0200 Message-Id: <20220518062007.10056-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Make ndo_open less sensitive to memory pressure. Signed-off-by: Michael Trimarchi --- Change: - Adjust the commit message addressing the comments in RFC version --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 9f33ec838b52..09eb6ea9a584 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3076,7 +3076,7 @@ fec_enet_alloc_rxq_buffers(struct net_device *ndev, unsigned int queue) rxq = fep->rx_queue[queue]; bdp = rxq->bd.base; for (i = 0; i < rxq->bd.ring_size; i++) { - skb = netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE); + skb = __netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE, GFP_KERNEL); if (!skb) goto err_alloc; -- 2.25.1