Received: by 10.223.176.5 with SMTP id f5csp398656wra; Wed, 7 Feb 2018 00:58:00 -0800 (PST) X-Google-Smtp-Source: AH8x227NmTJo1t2dklg1JAg77GwUgUe9lEMzc8C0fO63DhS47HO4kXNbrl0LtzY1au9b4k6yMzID X-Received: by 10.98.236.156 with SMTP id e28mr5160554pfm.152.1517993880030; Wed, 07 Feb 2018 00:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517993879; cv=none; d=google.com; s=arc-20160816; b=p/h9i8a3jNiwwG9mnr7yEcxK5Joqj8XvoqKNyq2TxxsK7tS6yjwU3dJ2EaWL1ijltX 8o+BwdUKsKWWdQ4hFBe/TLiqfS4Vwhm3Z+zb5V0hlIPovYXqd9tVYZsmE0it90vgER2E rYX4Fe5d1HLyE7BAb9IbE1nCX6POnhvIDq0976zw67zDTtYypxLejd/2jyzGFeRe38bw LAaL64diD7CX2UGulI8SKNH1yD8zSj16W/oePb9t9ZAB9gPmNifpznxNeKhRw6fiQWww NFZpnka1kni24gseYT6Anc3USn6e7DFDohG7OwEnziQ9wTrZwpITcKdcNruLtnY1eiRj j61Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=5g0bBiy3DBuQfY2E2Jf1JTVx0w8pKtelHGoRMp7aoLc=; b=x/E0/AvlJFI+RYRTZB/to26kXvzUky3RAp4ufynp6XwaaZWfm5NsY9t+1slisJh+i/ gVqle1XXj5SOSgpO6d/l9VX4q+0U6FG3VIZ6CH6qo/OSvZdjyJmVHGW3u5zf+7tbXQEj nN4ilaPUobYNv2L889O6+jK8/p6TxN4c/5GmCU94gLzJRvQ2cA0uSfkw5ckACoRoRnVM NxU+CxNrQNj8HpciPQFzmjihtpceqea1J/r7O+ebPjXW5pjSwNQqolCiXlmyz+BTaUFV +5nG9mzw/yEQrC8wUgnmBGrdeIwwzHbQZDJjbWeGdqimVxi31A1tO5KDm1NDyH/hzF7r Mf8w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si680676pgv.29.2018.02.07.00.57.46; Wed, 07 Feb 2018 00:57:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753478AbeBGIzs (ORCPT + 99 others); Wed, 7 Feb 2018 03:55:48 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:58359 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752829AbeBGIzr (ORCPT ); Wed, 7 Feb 2018 03:55:47 -0500 Received: from marcel-macpro.fritz.box (p5B3D2E4B.dip0.t-ipconnect.de [91.61.46.75]) by mail.holtmann.org (Postfix) with ESMTPSA id 662A0CF2C4; Wed, 7 Feb 2018 10:01:52 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH] bluetooth: btmrvl_main: Replace GFP_ATOMIC with GFP_KERNEL in btmrvl_send_sync_cmd From: Marcel Holtmann In-Reply-To: <1516982221-8524-1-git-send-email-baijiaju1990@gmail.com> Date: Wed, 7 Feb 2018 09:55:44 +0100 Cc: "Gustavo F. Padovan" , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <1516982221-8524-1-git-send-email-baijiaju1990@gmail.com> To: Jia-Ju Bai X-Mailer: Apple Mail (2.3445.5.20) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jia-Ju, > After checking all possible call chains to btmrvl_send_sync_cmd(), > my tool finds that this function is never called in atomic context, > namely never in an interrupt handler or holding a spinlock. > And it calls wait_event_interruptible_timeout() after bt_skb_alloc(), > so it indicates that btmrvl_send_sync_cmd() > can call function which can 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. > > Signed-off-by: Jia-Ju Bai > --- > drivers/bluetooth/btmrvl_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel