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 C6B35C433B4 for ; Fri, 7 May 2021 19:22:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E70160BD3 for ; Fri, 7 May 2021 19:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229542AbhEGTXM (ORCPT ); Fri, 7 May 2021 15:23:12 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:50911 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbhEGTXL (ORCPT ); Fri, 7 May 2021 15:23:11 -0400 Received: from smtpclient.apple (p4fefc624.dip0.t-ipconnect.de [79.239.198.36]) by mail.holtmann.org (Postfix) with ESMTPSA id 7E6F4CECE9; Fri, 7 May 2021 21:30:00 +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 21:22:09 +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. > > Would you mind adding my Reviewed-by tag from the reply to that patch as > well? sure thing. Regards Marcel