Skip to content

Commit

Permalink
kmsan: fix a minor nit, NFC
Browse files Browse the repository at this point in the history
kmsan_get_metadata_or_null() was incorrectly called for origin instead
of shadow. Fortunately we didn't use the result except for checking it
for being NULL (which doesn't differ for shadow and origin)
  • Loading branch information
ramosian-glider committed Jan 10, 2019
1 parent 13f1d11 commit 32736fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/kmsan/kmsan_instr.c
Expand Up @@ -131,7 +131,7 @@ void *__msan_memcpy(void *dst, const void *src, u64 n)
return result;

/* Ok to skip address check here, we'll do it later. */
shadow_dst = kmsan_get_metadata_or_null((u64)dst, n, /*is_origin*/true);
shadow_dst = kmsan_get_metadata_or_null((u64)dst, n, /*is_origin*/false);
if (!shadow_dst)
/* Can happen e.g. if the memory is untracked. */
return result;
Expand Down

0 comments on commit 32736fb

Please sign in to comment.