]> git.baikalelectronics.ru Git - kernel.git/commit
intel_th: msu: Fix vmalloced buffers
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 5 Jul 2022 08:26:34 +0000 (11:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 13:42:56 +0000 (15:42 +0200)
commitdbacac576cb4cff325ddf38901c5d55d13bf9e71
tree657a5e04106709c951dac90a7e0dc731ffcf993f
parent4f30d95db3de62262dbd6f1e4d6f7d12a14aa1ee
intel_th: msu: Fix vmalloced buffers

After commit 240442c7424b ("dma-mapping: remove CONFIG_DMA_REMAP") there's
a chance of DMA buffer getting allocated via vmalloc(), which messes up
the mmapping code:

> RIP: msc_mmap_fault [intel_th_msu]
> Call Trace:
>  <TASK>
>  __do_fault
>  do_fault
...

Fix this by accounting for vmalloc possibility.

Fixes: f50fcb8749aa ("intel_th: msu: Switch over to scatterlist")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20220705082637.59979-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/intel_th/msu.c