diff options
| author | Yue Hu <[email protected]> | 2019-02-01 03:27:32 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2019-02-12 20:38:54 +0000 |
| commit | 47afd7ae65c737bfef67e9eb1424723d13b06787 (patch) | |
| tree | 11a20edce466b8bbe77ecfc9fedd7bb19110dc85 /lib/error-inject.c | |
| parent | pstore/ram: Move initialization earlier (diff) | |
| download | kernel-47afd7ae65c737bfef67e9eb1424723d13b06787.tar.gz kernel-47afd7ae65c737bfef67e9eb1424723d13b06787.zip | |
pstore/ram: Add kmsg hlen zero check to ramoops_pstore_write()
If zero-length header happened in ramoops_write_kmsg_hdr(), that means
we will not be able to read back dmesg record later, since it will be
treated as invalid header in ramoops_pstore_read(). So we should not
execute the following code but return the error.
Signed-off-by: Yue Hu <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'lib/error-inject.c')
0 files changed, 0 insertions, 0 deletions
