diff options
author | Javier González <javier@cnexlabs.com> | 2016-07-07 09:54:09 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-07-07 08:51:52 -0600 |
commit | 5389a1dfb39786df08d4f6a482bd2734b1b50e33 (patch) | |
tree | eedb421c20a8d3a10be7470e9ba3d9cd8d7b6b0d /include/linux/lightnvm.h | |
parent | 529435e8188674fa1071235f50e6fbbbe020c93f (diff) | |
download | op-kernel-dev-5389a1dfb39786df08d4f6a482bd2734b1b50e33.zip op-kernel-dev-5389a1dfb39786df08d4f6a482bd2734b1b50e33.tar.gz |
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 <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r-- | include/linux/lightnvm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 9c56148..cee4c8d 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. */ |