Re: [PATCH v3 10/40] drivers/usb/mon: update to use mmap_prepare + map kernel pages
From: Lance Yang
Date: Fri Oct 02 2026 - 06:02:41 EST
On 2026/9/18 00:22, Lorenzo Stoakes (ARM) wrote:
[...]
+static int mon_bin_discontig_init(void *vm_private_data, void **private)
+{
+ struct mon_reader_bin *rp = vm_private_data;
+
+ /* Dropped by mon_bin_vma_close() on unmap, including on error. */
+ __mon_bin_vma_open(rp);
Em ... If Coda uses a usbmon container and the first page insertion fails
(e.g. -ENOMEM when allocating a page table) after mon_bin_discontig_init(),
where is mmap_active decremented?
mmap_action_finish() returns the error when is_compat is true, and
mmap_file() then replaces vm_ops with dummy ops.
Am i missing something?
+ return 0;
+}
Cheers, Lance
[...]