From: Javier González Date: Thu, 7 Jul 2016 07:54:09 +0000 (+0200) Subject: lightnvm: initialize ppa_addr in dev_to_generic_addr() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5389a1dfb39786df08d4f6a482bd2734b1b50e33;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git lightnvm: initialize ppa_addr in dev_to_generic_addr() The ->reserved bit is not initialized when allocated on stack. This may lead targets to misinterpret the PPA as cached. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 9c56148d6f63..cee4c8de34d5 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -385,6 +385,7 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev, { struct ppa_addr l; + l.ppa = 0; /* * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc. */