[PATCH 7/8] mtd: rawnand: qcom: Early structure initialization
Tudor Ambarus
tudor.ambarus at linaro.org
Thu Jul 27 08:03:40 PDT 2023
On 7/16/23 15:46, Miquel Raynal wrote:
> Instead of allocating a structure on the stack with random data and then
> expect the callee to perform the initialization (which is, in general,
> error prone), prefer zeroing the structure explicitly at allocation and
> provide the already zeroed area, so no explicit memset operation is
> needed. It is probably safer to do so, so we limit the timeframe when
> dirty data could actually be accessed by mistake.
Why is zeroed data considered safe or sane?
More information about the linux-mtd
mailing list