diff options
author | Javier González <javier@cnexlabs.com> | 2016-07-07 09:54:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-02 07:06:51 +0200 |
commit | 5acdbe667cf467cefb8fc13ded0ecca58dd9a761 (patch) | |
tree | f13b473cf010f5c6b01ce80d86c21796d515a232 /include/linux | |
parent | d255fffdb532caf103369a5894be942e528c3151 (diff) |
lightnvm: initialize ppa_addr in dev_to_generic_addr()
commit 5389a1dfb39786df08d4f6a482bd2734b1b50e33 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-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 782d4e814e21..4bc4b1b13193 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -310,6 +310,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. */ |