Skip to content

Commit

Permalink
ubsan-dont-handle-misaligned-address-when-support-unaligned-access-v2
Browse files Browse the repository at this point in the history
add braces around if block

Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
dingtianhong authored and sfrothwell committed Dec 25, 2017
1 parent 38ae1e3 commit 6a54485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ubsan.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,10 @@ void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,

if (!ptr)
handle_null_ptr_deref(data);
else if (data->alignment && !IS_ALIGNED(ptr, data->alignment))
else if (data->alignment && !IS_ALIGNED(ptr, data->alignment)) {
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
handle_missaligned_access(data, ptr);
else
} else
handle_object_size_mismatch(data, ptr);
}
EXPORT_SYMBOL(__ubsan_handle_type_mismatch);
Expand Down

0 comments on commit 6a54485

Please sign in to comment.