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 12/06/2014 07:37 PM, Antti Palosaari wrote:

I do think it is good practice to set pointers to null generally as that
would have saved me several days of work of whentracking down this bug.
The current dvb framework contain several other cases where pointers are
feed'd but not nulled.

There is kzfree() for that, but still I am very unsure should we start zeroing memory upon release driver has allocated, or just relase it using kfree.

regards
Antti

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. Maybe we should have a compile time override so that all free calls zeroes the memory before the actual free? Maybe there already is this kind of feature?

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