linux-next/drivers/comedi
Jann Horn ce8f9fb651 comedi: Flush partial mappings in error case
If some remap_pfn_range() calls succeeded before one failed, we still have
buffer pages mapped into the userspace page tables when we drop the buffer
reference with comedi_buf_map_put(bm). The userspace mappings are only
cleaned up later in the mmap error path.

Fix it by explicitly flushing all mappings in our VMA on the error path.

See commit 79a61cc3fc ("mm: avoid leaving partial pfn mappings around in
error case").

Cc: stable@vger.kernel.org
Fixes: ed9eccbe89 ("Staging: add comedi core")
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://lore.kernel.org/r/20241017-comedi-tlb-v3-1-16b82f9372ce@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-05 14:01:07 +01:00
..
drivers move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
kcomedilib comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
comedi_buf.c comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
comedi_fops.c comedi: Flush partial mappings in error case 2024-11-05 14:01:07 +01:00
comedi_internal.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_pci.c comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
comedi_pcmcia.c comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
comedi_usb.c comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
drivers.c comedi: comedi_8254: Replace comedi_8254_init() and comedi_8254_mm_init() 2023-10-05 13:34:04 +02:00
Kconfig comedi: add HAS_IOPORT dependencies again 2023-10-05 13:34:05 +02:00
Makefile staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
proc.c comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
range.c comedi: Move the main COMEDI headers 2021-11-26 16:48:59 +01:00
TODO staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00