* [PATCH] drm/ast: free correct pointer in astfb_create() error paths
@ 2016-09-19 7:13 Andrew Donnellan
2016-09-20 1:56 ` [PATCH RESEND] " Andrew Donnellan
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Donnellan @ 2016-09-19 7:13 UTC (permalink / raw)
To: airlied, dri-devel; +Cc: linux-kernel
In the err_free_vram and err_release_fbi error paths in astfb_create(), we
attempt to free afbdev->sysram. The only jumps to these error paths occur
before we assign afbdev->sysram = sysram. Free sysram instead.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
Found by Coverity Scan. Compile tested only.
---
drivers/gpu/drm/ast/ast_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index c017a93..0fef8ea 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -254,7 +254,7 @@ static int astfb_create(struct drm_fb_helper *helper,
err_release_fbi:
drm_fb_helper_release_fbi(helper);
err_free_vram:
- vfree(afbdev->sysram);
+ vfree(sysram);
return ret;
}
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RESEND] drm/ast: free correct pointer in astfb_create() error paths
2016-09-19 7:13 [PATCH] drm/ast: free correct pointer in astfb_create() error paths Andrew Donnellan
@ 2016-09-20 1:56 ` Andrew Donnellan
2016-09-20 2:54 ` Andrew Donnellan
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Donnellan @ 2016-09-20 1:56 UTC (permalink / raw)
To: airlied, dri-devel; +Cc: linux-kernel
In the err_free_vram and err_release_fbi error paths in astfb_create(), we
attempt to free afbdev->sysram. The only jumps to these error paths occur
before we assign afbdev->sysram = sysram. Free sysram instead.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
Found by Coverity Scan. Compile tested only.
Resending as it looks like this didn't hit dri-devel.
---
drivers/gpu/drm/ast/ast_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index c017a93..0fef8ea 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -254,7 +254,7 @@ static int astfb_create(struct drm_fb_helper *helper,
err_release_fbi:
drm_fb_helper_release_fbi(helper);
err_free_vram:
- vfree(afbdev->sysram);
+ vfree(sysram);
return ret;
}
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND] drm/ast: free correct pointer in astfb_create() error paths
2016-09-20 1:56 ` [PATCH RESEND] " Andrew Donnellan
@ 2016-09-20 2:54 ` Andrew Donnellan
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Donnellan @ 2016-09-20 2:54 UTC (permalink / raw)
To: airlied, dri-devel; +Cc: linux-kernel
On 20/09/16 11:56, Andrew Donnellan wrote:
> In the err_free_vram and err_release_fbi error paths in astfb_create(), we
> attempt to free afbdev->sysram. The only jumps to these error paths occur
> before we assign afbdev->sysram = sysram. Free sysram instead.
>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
>
> ---
>
> Found by Coverity Scan. Compile tested only.
>
> Resending as it looks like this didn't hit dri-devel.
It did show up after all :)
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND] drm/ast: free correct pointer in astfb_create() error paths
2016-11-14 3:03 Andrew Donnellan
@ 2016-11-14 6:46 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2016-11-14 6:46 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: airlied, dri-devel, daniel.vetter, linux-kernel
On Mon, Nov 14, 2016 at 02:03:59PM +1100, Andrew Donnellan wrote:
> In the err_free_vram and err_release_fbi error paths in astfb_create(), we
> attempt to free afbdev->sysram. The only jumps to these error paths occur
> before we assign afbdev->sysram = sysram. Free sysram instead.
>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to drm-misc, thanks.
-Daniel
>
> ---
>
> Found by Coverity Scan. Compile tested only.
> ---
> drivers/gpu/drm/ast/ast_fb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
> index 7a86e24..d6f5ec6 100644
> --- a/drivers/gpu/drm/ast/ast_fb.c
> +++ b/drivers/gpu/drm/ast/ast_fb.c
> @@ -253,7 +253,7 @@ static int astfb_create(struct drm_fb_helper *helper,
> err_release_fbi:
> drm_fb_helper_release_fbi(helper);
> err_free_vram:
> - vfree(afbdev->sysram);
> + vfree(sysram);
> return ret;
> }
>
> --
> Andrew Donnellan OzLabs, ADL Canberra
> andrew.donnellan@au1.ibm.com IBM Australia Limited
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND] drm/ast: free correct pointer in astfb_create() error paths
@ 2016-11-14 6:46 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2016-11-14 6:46 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: daniel.vetter, linux-kernel, dri-devel
On Mon, Nov 14, 2016 at 02:03:59PM +1100, Andrew Donnellan wrote:
> In the err_free_vram and err_release_fbi error paths in astfb_create(), we
> attempt to free afbdev->sysram. The only jumps to these error paths occur
> before we assign afbdev->sysram = sysram. Free sysram instead.
>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to drm-misc, thanks.
-Daniel
>
> ---
>
> Found by Coverity Scan. Compile tested only.
> ---
> drivers/gpu/drm/ast/ast_fb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
> index 7a86e24..d6f5ec6 100644
> --- a/drivers/gpu/drm/ast/ast_fb.c
> +++ b/drivers/gpu/drm/ast/ast_fb.c
> @@ -253,7 +253,7 @@ static int astfb_create(struct drm_fb_helper *helper,
> err_release_fbi:
> drm_fb_helper_release_fbi(helper);
> err_free_vram:
> - vfree(afbdev->sysram);
> + vfree(sysram);
> return ret;
> }
>
> --
> Andrew Donnellan OzLabs, ADL Canberra
> andrew.donnellan@au1.ibm.com IBM Australia Limited
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND] drm/ast: free correct pointer in astfb_create() error paths
@ 2016-11-14 3:03 Andrew Donnellan
2016-11-14 6:46 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Donnellan @ 2016-11-14 3:03 UTC (permalink / raw)
To: airlied, dri-devel, daniel.vetter; +Cc: linux-kernel
In the err_free_vram and err_release_fbi error paths in astfb_create(), we
attempt to free afbdev->sysram. The only jumps to these error paths occur
before we assign afbdev->sysram = sysram. Free sysram instead.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
Found by Coverity Scan. Compile tested only.
---
drivers/gpu/drm/ast/ast_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 7a86e24..d6f5ec6 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -253,7 +253,7 @@ static int astfb_create(struct drm_fb_helper *helper,
err_release_fbi:
drm_fb_helper_release_fbi(helper);
err_free_vram:
- vfree(afbdev->sysram);
+ vfree(sysram);
return ret;
}
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-11-14 6:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 7:13 [PATCH] drm/ast: free correct pointer in astfb_create() error paths Andrew Donnellan
2016-09-20 1:56 ` [PATCH RESEND] " Andrew Donnellan
2016-09-20 2:54 ` Andrew Donnellan
2016-11-14 3:03 Andrew Donnellan
2016-11-14 6:46 ` Daniel Vetter
2016-11-14 6:46 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.