Skip to content

Commit

Permalink
UBSAN: fix typo in format string
Browse files Browse the repository at this point in the history
handle_object_size_mismatch() used %pk to format a kernel pointer with
pr_err().  This seemed to be a misspelling for %pK, but using this to
format a kernel pointer does not make much sence here.

Therefore use %p instead, like in handle_missaligned_access().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Nicolas Iooss <[email protected]>
Acked-by: Andrey Ryabinin <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
fishilico authored and torvalds committed Aug 2, 2016
1 parent 9b24fef commit 901d805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ubsan.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static void handle_object_size_mismatch(struct type_mismatch_data *data,
return;

ubsan_prologue(&data->location, &flags);
pr_err("%s address %pk with insufficient space\n",
pr_err("%s address %p with insufficient space\n",
type_check_kinds[data->type_check_kind],
(void *) ptr);
pr_err("for an object of type %s\n", data->type->type_name);
Expand Down

0 comments on commit 901d805

Please sign in to comment.