| From 5389a1dfb39786df08d4f6a482bd2734b1b50e33 Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= <javier@cnexlabs.com> |
| Date: Thu, 7 Jul 2016 09:54:09 +0200 |
| Subject: lightnvm: initialize ppa_addr in dev_to_generic_addr() |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| From: Javier González <javier@cnexlabs.com> |
| |
| 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> |
| |
| --- |
| include/linux/lightnvm.h | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- a/include/linux/lightnvm.h |
| +++ b/include/linux/lightnvm.h |
| @@ -310,6 +310,7 @@ static inline struct ppa_addr dev_to_gen |
| { |
| struct ppa_addr l; |
| |
| + l.ppa = 0; |
| /* |
| * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc. |
| */ |