From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A5F2C433B4 for ; Fri, 7 May 2021 16:07:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3B696140C for ; Fri, 7 May 2021 16:07:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236092AbhEGQIx (ORCPT ); Fri, 7 May 2021 12:08:53 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:60132 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbhEGQIv (ORCPT ); Fri, 7 May 2021 12:08:51 -0400 Received: from smtpclient.apple (p4fefc624.dip0.t-ipconnect.de [79.239.198.36]) by mail.holtmann.org (Postfix) with ESMTPSA id 3FA15CECE3; Fri, 7 May 2021 18:15:41 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: [PATCH] bluetooth: fix potential gfp From: Marcel Holtmann In-Reply-To: Date: Fri, 7 May 2021 18:07:50 +0200 Cc: Pavel Skripkin , Johan Hedberg , Luiz Augusto von Dentz , Bluetooth Kernel Mailing List , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20210501150445.4055-1-paskripkin@gmail.com> <9A08CBDA-3501-48F6-9F7A-60958C5CF888@holtmann.org> To: Johan Hovold X-Mailer: Apple Mail (2.3654.80.0.2.43) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, >>>>> In qca_power_shutdown() qcadev local variable is >>>>> initialized by hu->serdev.dev private data, but >>>>> hu->serdev can be NULL and there is a check for it. >>>>> >>>>> Since, qcadev is not used before >>>>> >>>>> if (!hu->serdev) >>>>> return; >>>>> >>>>> we can move its initialization after this "if" to >>>>> prevent gfp. >>>>> >>>>> Signed-off-by: Pavel Skripkin >>>>> --- >>>>> drivers/bluetooth/hci_qca.c | 4 ++-- >>>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> patch has been applied to bluetooth-next tree. >>> >>> Why did you pick the v1 when it is clear from thread that a v2 has been >>> posted? >> >> because I only saw that email after I applied the patch and the v2 is >> nowhere in sight as it seems. If it shows up, I replace this one then. > > Here it is > > https://lore.kernel.org/lkml/20210503100605.5223-1-paskripkin@gmail.com/ seems to have missed my inbox. Fixed now. Regards Marcel