LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* commit c7e88ecbe328 ("staging: r8188eu: remove rtw_buf_free() function")
@ 2021-08-03 7:21 Fabio Aiuto
2021-08-03 12:23 ` Fabio M. De Francesco
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Aiuto @ 2021-08-03 7:21 UTC (permalink / raw)
To: gregkh; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel
Dear Greg,
I followed the discussion about the bug that was
introduced by commit c7e88ecbe328. But I can't
understand why this patch introduced such a bug.
In the changelog of the revert patch you wrote
that you forgot how pointers work (:-D), but
I think I forgot either (if ever known :P).
Do you have any idea of what happened? This
topic could give us all deeper understanding
of kernel memory management.
Thank you in advance,
fabio
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: commit c7e88ecbe328 ("staging: r8188eu: remove rtw_buf_free() function")
2021-08-03 7:21 commit c7e88ecbe328 ("staging: r8188eu: remove rtw_buf_free() function") Fabio Aiuto
@ 2021-08-03 12:23 ` Fabio M. De Francesco
2021-08-03 12:39 ` Fabio Aiuto
0 siblings, 1 reply; 3+ messages in thread
From: Fabio M. De Francesco @ 2021-08-03 12:23 UTC (permalink / raw)
To: gregkh, Fabio Aiuto; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel
On Tuesday, August 3, 2021 9:21:30 AM CEST Fabio Aiuto wrote:
>
> Do you have any idea of what happened? This
> topic could give us all deeper understanding
> of kernel memory management.
>
Hi Fabio,
I've just briefly looked at that c7e88ecbe328. I have no time to dig it deeper
but at a first look it seems that the following line is the culprit:
kfree(&pmlmepriv->assoc_req);
It should be:
kfree(pmlmepriv->assoc_req);
The second line frees the memory location whose address is saved in assoc_rec;
the first line instead frees assoc_req itself.
Regards,
Fabio
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: commit c7e88ecbe328 ("staging: r8188eu: remove rtw_buf_free() function")
2021-08-03 12:23 ` Fabio M. De Francesco
@ 2021-08-03 12:39 ` Fabio Aiuto
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Aiuto @ 2021-08-03 12:39 UTC (permalink / raw)
To: Fabio M. De Francesco
Cc: gregkh, hdegoede, Larry.Finger, linux-staging, linux-kernel
Hi Fabio,
On Tue, Aug 03, 2021 at 02:23:25PM +0200, Fabio M. De Francesco wrote:
> On Tuesday, August 3, 2021 9:21:30 AM CEST Fabio Aiuto wrote:
> >
> > Do you have any idea of what happened? This
> > topic could give us all deeper understanding
> > of kernel memory management.
> >
> Hi Fabio,
>
> I've just briefly looked at that c7e88ecbe328. I have no time to dig it deeper
> but at a first look it seems that the following line is the culprit:
>
> kfree(&pmlmepriv->assoc_req);
>
> It should be:
>
> kfree(pmlmepriv->assoc_req);
I think you are right :)
I didn't noticed rtw_buf_free's first argument is
a double star pointer.
>
> The second line frees the memory location whose address is saved in assoc_rec;
> the first line instead frees assoc_req itself.
>
> Regards,
>
> Fabio
>
>
>
thank you,
fabio
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-03 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 7:21 commit c7e88ecbe328 ("staging: r8188eu: remove rtw_buf_free() function") Fabio Aiuto
2021-08-03 12:23 ` Fabio M. De Francesco
2021-08-03 12:39 ` Fabio Aiuto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).