]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: PEL need to check gen number for verification of collected log
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Thu, 26 Aug 2021 03:06:11 +0000 (12:06 +0900)
committerDaniel Wagner <dwagner@suse.de>
Mon, 15 Nov 2021 11:06:29 +0000 (12:06 +0100)
commit303e03c6e228f9296b2fa70ec899db620f2e10f6
tree9a9b08444b22c2ad3d109d02e5a1b0a04fa5d223
parent82ea68f15b5b5bb0426dc28185fee07baa3729bb
nvme: PEL need to check gen number for verification of collected log

If the Persistent Event Log is not read with a single Get Log Page
command, then host software should read the Generation Number field in
the Persistent Event Log header after establishing a reporting context
but before reading the remainder of the log and then re-read the
Generation Number field after it has read the entire log.

If the generation numbers do not match, then:
    - the reporting context may have been lost while reading the log;
    - the Persistent Event Log contents read may be invalid; and
    - host software should re-read the log.

While at it, fix bug (unallocated pointer free)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: ported from monolitic branch and updated context]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme.c