diff options
author | Colin Ian King <[email protected]> | 2019-10-28 09:06:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-11-04 15:01:24 +0100 |
commit | 8e3ef7b444aec3d1059085ce41edaa76ee7340e7 (patch) | |
tree | ffee09eabaeb6bf25cba3bc5cc7bc7ae38e2c23b /lib/memory-notifier-error-inject.c | |
parent | 063f097fd65a90fca2cd49411a2d6e35b8ca25db (diff) |
intel_th: msu: Fix overflow in shift of an unsigned int
The shift of the unsigned int win->nr_blocks by PAGE_SHIFT may
potentially overflow. Note that the intended return of this shift
is expected to be a size_t however the shift is being performed as
an unsigned int. Fix this by casting win->nr_blocks to a size_t
before performing the shift.
Addresses-Coverity: ("Unintentional integer overflow")
Fixes: 615c164da0eb ("intel_th: msu: Introduce buffer interface")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions