[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150712061438.GA2649@sudip-PC>
Date: Sun, 12 Jul 2015 11:44:38 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Rob Clark <robdclark@...il.com>
Cc: David Airlie <airlied@...ux.ie>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/atomic: fix null dereference
On Sat, Jul 11, 2015 at 02:17:49PM -0400, Rob Clark wrote:
> On Sat, Jul 11, 2015 at 1:24 PM, Sudip Mukherjee
> <sudipm.mukherjee@...il.com> wrote:
> > We are checking the size of e->event but we were doing it when e is
> > known to be NULL.
>
> nak, this will leak event_space.. since it is a sizeof, it isn't
> actually deref'ing e, but rather just using the static type info, so
> it's ok (although perhaps funny looking)
Agreed, and I just verified the same with an userspace code also.
But i think this will confuse people like me who have started to look
at the drm code to start working with some new drm driver.
what about:
file_priv->event_space += sizeof(struct drm_event_vblank);
It will server the same purpose yet it will not be confusing.
regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists