diff options
| author | Li Chen <chenl311@chinatelecom.cn> | 2025-11-11 20:13:36 +0800 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2025-11-18 19:02:08 +0100 |
| commit | a6ee8422b4f2a591de010f4e60471060b13d4170 (patch) | |
| tree | 6e63c2a9661c33a000622882f780aa3c4eafb790 /net/unix/af_unix.c | |
| parent | 840b80af74fda9672f111023ca17ad7875427f13 (diff) | |
dm-pcache: zero cache_info before default init
pcache_meta_find_latest() leaves whatever it last copied into the
caller’s buffer even when it returns NULL. For cache_info_init(),
that meant cache->cache_info could still contain CRC-bad garbage when
no valid metadata exists, leading later initialization paths to read
bogus flags.
Explicitly memset cache->cache_info in cache_info_init_default()
so new-cache paths start from a clean slate. The default sequence
number assignment becomes redundant with this reset, so it drops out.
Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
Reviewed-by: Zheng Gu <cengku@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
