Re: RE: [PATCH] video/fbdev: Fix a double free in hvfb_probe

2021-03-24 Thread lyl2019
r.kernel.org" , > "dri-devel@lists.freedesktop.org" , > "linux-fb...@vger.kernel.org" , > "linux-ker...@vger.kernel.org" > 主题: RE: [PATCH] video/fbdev: Fix a double free in hvfb_probe > > From: Lv Yunlong Sent: Tuesday, March 23, 2021 &

RE: [PATCH] video/fbdev: Fix a double free in hvfb_probe

2021-03-23 Thread Michael Kelley
From: Lv Yunlong Sent: Tuesday, March 23, 2021 12:34 AM > > In function hvfb_probe in hyperv_fb.c, it calls hvfb_getmem(hdev, info) > and return err when info->apertures is freed. > > In the error1 label of hvfb_probe, info->apertures will be freed twice > by framebuffer_release(info). > > My

[PATCH] video/fbdev: Fix a double free in hvfb_probe

2021-03-23 Thread Lv Yunlong
In function hvfb_probe in hyperv_fb.c, it calls hvfb_getmem(hdev, info) and return err when info->apertures is freed. In the error1 label of hvfb_probe, info->apertures will be freed twice by framebuffer_release(info). My patch sets info->apertures to NULL after it was freed to avoid double free.

Re: [PATCH] video/fbdev: Fix a double free in hvfb_probe

2021-03-23 Thread Wei Liu
Thanks for your patch. I would like to change the prefix to "video: hyperv_fb:" to be more specific. On Tue, Mar 23, 2021 at 12:33:50AM -0700, Lv Yunlong wrote: > In function hvfb_probe in hyperv_fb.c, it calls hvfb_getmem(hdev, info) > and return err when info->apertures is freed. > > In the er