login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
30
Re: [PATCH] drm, video: fix use-before-NULL-check
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Jesse Barnes
Subject:
Re: [PATCH] drm, video: fix use-before-NULL-check
Date: Monday, August 30, 2010 - 9:31 am
On Fri, 27 Aug 2010 14:07:19 -0700 Kees Cook <kees.cook@canonical.com> wrote:
quoted text
> Fix potential crashes due to use-before-NULL situations. > > Signed-off-by: Kees Cook <kees.cook@canonical.com> > --- > drivers/gpu/drm/drm_fb_helper.c | 3 ++- > drivers/media/video/em28xx/em28xx-video.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index de82e20..8dd7e6f 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -94,10 +94,11 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_fb_helper_conn > int i; > enum drm_connector_force force = DRM_FORCE_UNSPECIFIED; > struct drm_fb_helper_cmdline_mode *cmdline_mode; > - struct drm_connector *connector = fb_helper_conn->connector; > + struct drm_connector *connector; > > if (!fb_helper_conn) > return false; > + connector = fb_helper_conn->connector; > > cmdline_mode = &fb_helper_conn->cmdline_mode; > if (!mode_option) > diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c > index 7b9ec6e..95a4b60 100644 > --- a/drivers/media/video/em28xx/em28xx-video.c > +++ b/drivers/media/video/em28xx/em28xx-video.c > @@ -277,12 +277,13 @@ static void em28xx_copy_vbi(struct em28xx *dev, > { > void *startwrite, *startread; > int offset; > - int bytesperline = dev->vbi_width; > + int bytesperline; > > if (dev == NULL) { > em28xx_isocdbg("dev is null\n"); > return; > } > + bytesperline = dev->vbi_width; > > if (dma_q == NULL) { > em28xx_isocdbg("dma_q is null\n");
Look fine to me. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> -- Jesse Barnes, Intel Open Source Technology Center --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] drm, video: fix use-before-NULL-check
, Kees Cook
, (Fri Aug 27, 2:07 pm)
Re: [PATCH] drm, video: fix use-before-NULL-check
, Jesse Barnes
, (Mon Aug 30, 9:31 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Robin Lee Powell
NFS hang + umount -f: better behaviour requested.
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
git
:
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Wink Saville
How-to combine several separate git repos?
Emily Ren
How to pull remote branch with specified commit id?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Timo Teräs
ip xfrm policy semantics
Ron Mercer
[net-next PATCH 2/2] qlge: Version change to v1.00.00.27
Maciej W. Rozycki
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
git-commits-head
:
Linux Kernel Mailing List
powerpc/fsl_msi: enable msi allocation in all banks
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
[ARM] mmp: add dma support to mmp2
Colocation donated by:
Syndicate