Re: [PATCH] drm/atomic: fix null dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux