Re: [PATCH 2/3] mn88472: make sure the private data struct is nulled after free

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

 



On 01/19/2015 02:15 PM, Hans Verkuil wrote:
On 12/06/2014 09:26 PM, Benjamin Larsson wrote:

Well I guess I am biased as I have spent lots of time finding a bug that
probably wouldn't exist if the policy was that drivers always should set
their memory to zero before it is free'd.

Just because you zero memory before it is freed doesn't mean it stays zeroed.
As soon as it is freed some other process might take that memory and fill it
up again. So zeroing is pointless and in fact will only *hide* bugs.


Well in this specific case NOT zeroing the memory it actually hid a use after free bug. So stating that it is pointless and that it will only hide bugs is not correct at least for this case.

MvH
Benjamin Larsson
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux