Re: [PATCH] bluetooth: fix potential gfp

From: Johan Hovold
Date: Fri May 07 2021 - 12:15:59 EST


On Fri, May 07, 2021 at 06:07:50PM +0200, Marcel Holtmann wrote:
> 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 <paskripkin@xxxxxxxxx>
> >>>>> ---
> >>>>> 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@xxxxxxxxx/
>
> seems to have missed my inbox. Fixed now.

Would you mind adding my Reviewed-by tag from the reply to that patch as
well?

I don't know if you're using b4 yet but it can be used to fetch it all
from lore.

Johan