Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5971193imm; Mon, 23 Jul 2018 09:08:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc66vWPqzXiFbguQD076VOz8l9h0j5N8HaSBr17g+Q2oL776MWR++r1nD310NdGRZ5owR+o X-Received: by 2002:a63:231a:: with SMTP id j26-v6mr12632061pgj.138.1532362087343; Mon, 23 Jul 2018 09:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532362087; cv=none; d=google.com; s=arc-20160816; b=f8Is31Rrf06nKZtvJIcA0J9fFBllZleNP+b2B8lMIqAHfsPCaAfwZn3iM+Ox74lbGi IYuByIQBqbk6r12uvjCVY27gu2OMsqZjxxMnOkuufowEA/2so2VvRJpt1kH2CfpVPHd1 LPBySENV011vGb2n+80/vhQZLmnINqQ7OvNXYQ8jgPK2+5CrecZS8QR96Hhln4X6SD0B sNOPUw9zUB8Jm78zA3gNbQ1GqXR2UCZP+I998AC2BIMNyj8QANxdsiiby0BAGacwj+Dq U3y8bu/OT/L50mDoy0IGwOjrvZGx0zP0K93rFwsP0ltxgnCpXcSvNJPiWNZVGEmpT5Ka kG5A== 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=1tJqtszObN+fzx0Lx2ngUOwW+pP7c6zuj5Vr2EEW5/8=; b=OrhrkCab5rzNRY0OCS8leGMKdLFxEEzLd4WyTCnuNxJNWLVx3rKI2+7f8YBs8xjF5I VLwlv2KBf8PA12ZLQPaRufnBPEnOMpBlyXO1PQWq1uDBzmcensWjxAbHc0+y6+ob24pk NtecQaCzfX0Kr9zT9OGf+62qZLtsJz1UgiHbg1j23R3Xk0fIwVzgHTblL/JYtJi1Gj+5 N9qMRobgaXlUUAlCiw0rEa19mhLgGYP5BguiG71zOdXoXH5si/js3OPSxOwJ5fkRMnBg pK363HVIUTZERi15XZVU/4mSIzGBSG1dG6b71mnAnqguq4I+5G5M5ZLmgCbrDU6qll5u BbOw== 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 r4-v6si8585608pgb.97.2018.07.23.09.07.51; Mon, 23 Jul 2018 09:08:07 -0700 (PDT) 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 S2388396AbeGWRHx (ORCPT + 99 others); Mon, 23 Jul 2018 13:07:53 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:59648 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387989AbeGWRHx (ORCPT ); Mon, 23 Jul 2018 13:07:53 -0400 Received: from [192.168.0.117] (188.146.236.198.nat.umts.dynamic.t-mobile.pl [188.146.236.198]) by mail.holtmann.org (Postfix) with ESMTPSA id C406ECEEB2; Mon, 23 Jul 2018 18:12:52 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH] bluetooth: btusb: Replace GFP_ATOMIC with GFP_KERNEL in inject_cmd_complete() From: Marcel Holtmann In-Reply-To: <20180723033851.8141-1-baijiaju1990@gmail.com> Date: Mon, 23 Jul 2018 18:05:55 +0200 Cc: Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20180723033851.8141-1-baijiaju1990@gmail.com> To: Jia-Ju Bai X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jia-Ju, > inject_cmd_complete() is only called by btusb_send_frame_intel(), > which is set to hdev->send, and hdev->send() is never > called in atomic context. > > inject_cmd_complete() calls bt_skb_alloc() with GFP_ATOMIC, > which is not necessary. > GFP_ATOMIC can be replaced with GFP_KERNEL. > > This is found by a static analysis tool named DCNS written by myself. > I also manually check the kernel code before reporting it. > > Signed-off-by: Jia-Ju Bai > --- > drivers/bluetooth/btusb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) all 6 patches have been applied to bluetooth-next tree. Regards Marcel