Received: by 10.223.176.46 with SMTP id f43csp880052wra; Fri, 26 Jan 2018 08:19:01 -0800 (PST) X-Google-Smtp-Source: AH8x225y4nqFT+fIuCtPDKqWquxtWm9t4pKZsf1E6fKAYZlAy3dR20vAGHJiX2AApCGnve94TQFo X-Received: by 10.101.75.193 with SMTP id p1mr16656576pgr.63.1516983541437; Fri, 26 Jan 2018 08:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516983541; cv=none; d=google.com; s=arc-20160816; b=zJ0rBba2WTdODsn4uucS/1ZOQxH2y7uME9JqkdtJonkU2yO7jccbPnuPg9u5FYiSXn jiqDth4UKA8IJ4LJLootwKCSY4RN/Fcj9M71SbtwYfKvV1OTysuEclwIK1uDwSDvlDqA SqzbmmQt5MF623U2BoKXwA9Oq74LGlrQegrdBLeRrMsQ0zrcqBIda3Osc6ANUrDh5aEV /mVNOzwJ+pcaWPYNj3sZHqqsyatQVKwThpoP4sweQ5Ze0JQqmoxPjvtIr96xLTGVuvew bUa7vMewjc3DlnRgzW7YKDL5JdaO03C81Ymn9OHeh1BuLp5TxAfrLySuNCIkwuHkrQKb uFaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=9Ac2ndxEMClUYWNihkEwL4iUucBIDTgOTVe33WWhEPc=; b=rcu3CDXuyVY+YQp4qsifTsq8D6TwlK+RS22ONJmZwAk3thDZeMKlaAI5mI+eTcCK8G 9diZ9fUnnvU7M7nimdzp/KX3UEMLMBAhwlrU8i/QphwlRHynAwE4eX+JeuVdtEtf1fPJ EtlQpWNc1Nagf+dReJXqSjdiJMhloDbS0wW2S9RqB83Lp+CsMr7Am+ZZty3NkT1Ng7Nx 5VUUQ70CrVrdg9BaBOzRp6Y/oo3CCsjoTKIZmPuK/fdwrBK+n7k2cCtNZsOnaSJngTaC YZS7czivZudMbvWE5n7tJhvI4LDWcJ1+khNPp7zK5Pq2hugi3L4qm9kM1yPQZhzLugDg T/RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lZLIejG9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si3159006pgn.564.2018.01.26.08.18.47; Fri, 26 Jan 2018 08:19:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lZLIejG9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882AbeAZQSS (ORCPT + 99 others); Fri, 26 Jan 2018 11:18:18 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:45413 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753820AbeAZQSP (ORCPT ); Fri, 26 Jan 2018 11:18:15 -0500 Received: by mail-pg0-f68.google.com with SMTP id m136so537422pga.12; Fri, 26 Jan 2018 08:18:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9Ac2ndxEMClUYWNihkEwL4iUucBIDTgOTVe33WWhEPc=; b=lZLIejG9Xokiua+QQB9fb4B49k/68D9Dx1w3lIr1PQK8Q7ojOEqyS60Q5a+xNK5cvi IEwDSiYDmVSRb3nn+ZV5+thiojGZfIasBGOxZg1lXTS6uxv+c3i95NaCXfGvWy1yEHU/ 6qgegk04eqEZqzyu4z6vBRFEEETsAqIWvZXd8HYntY+60/1jVs9wYvNcPd2+CCPdkFEv C8XfD11HkscFG2KskM+zDObtfDQmIuZXkkbi0v5FrxaMSHh1yeUDmOhYUFP6UAuW85d3 JyGoqfLS7rBbkmdHQ7wmYk1JvYbu0BbQmpculKxihF0vP8luRZXUoMcO1qp1yhTspYju Js+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9Ac2ndxEMClUYWNihkEwL4iUucBIDTgOTVe33WWhEPc=; b=M+URWEUwnd+bqlJPjwVfpIJtZpimZMH8GJu6/7e4uiXfTTzMCVlGsee7hX+Kl+wrvC zwdmjbl1F71tfiXw/y9Igc2VsvUxn2xS7/FZFsJvkUGfm9n0EGIhUSvYXNkPS7EPv0Ii aBEHXSQeoCZjMHdNAW+x18I/qd0woYaOOy911BUFscXet3/9qfCR++i8hv3VrQxXMtac 2xM2JWuEX8Y0ID+s5mvnfS4JIjibDTNt2ms1UZG/In8STm05Ahz20iBXJvN0GpN5DE+T WAdZUuiuueEobNxoNKJ3tN/o9Ute4uCsAhD9Eqc4u9uurs3ZVLFV1szKd2kUUYL7OhRf 91tw== X-Gm-Message-State: AKwxytfd1eJbmo3qTuGY/AmscQKE7puhJTNknZwFVaY52DNHEXnLe9w0 H4zslFyYWyUg9XMxT0vCpYR7Uj/3 X-Received: by 10.98.60.132 with SMTP id b4mr19753154pfk.120.1516983494271; Fri, 26 Jan 2018 08:18:14 -0800 (PST) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.70.14? ([2402:f000:1:1501:200:5efe:a66f:460e]) by smtp.gmail.com with ESMTPSA id t1sm8710607pgs.73.2018.01.26.08.18.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 08:18:13 -0800 (PST) Subject: Re: [PATCH] atm: firestream: Replace GFP_ATOMIC with GFP_KERNEL in fs_send To: David Miller , viro@ZenIV.linux.org.uk Cc: 3chas3@gmail.com, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1516953627-30983-1-git-send-email-baijiaju1990@gmail.com> <20180126120522.GX13338@ZenIV.linux.org.uk> <20180126.110739.419621238821097728.davem@davemloft.net> From: Jia-Ju Bai Message-ID: Date: Sat, 27 Jan 2018 00:17:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180126.110739.419621238821097728.davem@davemloft.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/1/27 0:07, David Miller wrote: > From: Al Viro > Date: Fri, 26 Jan 2018 12:05:22 +0000 > >> On Fri, Jan 26, 2018 at 04:00:27PM +0800, Jia-Ju Bai wrote: >>> After checking all possible call chains to fs_send() here, >>> my tool finds that fs_send() is never called in atomic context. >>> And this function is assigned to a function pointer "dev->ops->send", >>> which is only called by vcc_sendmsg() (net/atm/common.c) >>> through vcc->dev->ops->send(), and vcc_sendmsg() calls schedule(), >>> it indicates that fs_send() can call functions which may sleep. >>> Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. >>> >>> This is found by a static analysis tool named DCNS written by myself. >> The trouble is, places like >> net/atm/raw.c:65: vcc->send = atm_send_aal0; >> net/atm/raw.c:74: vcc->send = vcc->dev->ops->send; >> net/atm/raw.c:83: vcc->send = vcc->dev->ops->send; >> mean extra call chains. It's *not* just vcc_sendmsg(), and e.g. >> ret = ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb) >> ? DROP_PACKET : 1; >> bh_unlock_sock(sk_atm(vcc)); >> in pppoatm_send() definitely is called under a spinlock. >> >> Looking through the driver (in advanced bitrot, as usual for drivers/atm), >> I'd say that submit_queue() is fucked in head in the "queue full" case. >> And judging by the history, had been thus since the original merge... > Jia-Ju, I'm probably not going to apply any of your GFP_KERNEL > conversions. > > Al's analysis above is similar to how things looked for other patches > you submited of this nature. > > So because of the lack of care and serious auditing you put into these > conversions, I really have no choice but to drop them from my queue > because on the whole they are adding bugs rather than improving the > code. > > Thank you. Okay, I can understand that careless GFP_KERNEL conversions will introduce bugs. Your concern is right. Sorry for my previous incorrect patches... I will manually carefully check and audit my patches before I submit them. Thanks, Jia-Ju Bai