Re: [syzbot] Discardable change
From: syzbot
Date: Fri Nov 10 2023 - 12:58:46 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: Discardable change
Author: yuran.pereira@xxxxxxxxxxx
#syz test: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
---
drivers/usb/core/devio.c | 2 ++
include/linux/page_ext.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 3beb6a862e80..22ae7babf46b 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -276,12 +276,14 @@ static int usbdev_mmap(struct file *file, struct vm_area_struct *vma)
if (remap_pfn_range(vma, vma->vm_start,
virt_to_phys(usbm->mem) >> PAGE_SHIFT,
size, vma->vm_page_prot) < 0) {
+ pr_info("==> if* vma_use_count %d\n", usbm->vma_use_count);
dec_usb_memory_use_count(usbm, &usbm->vma_use_count);
return -EAGAIN;
}
} else {
if (dma_mmap_coherent(hcd->self.sysdev, vma, mem, dma_handle,
size)) {
+ pr_info("==> else* vma_use_count %d\n", usbm->vma_use_count);
dec_usb_memory_use_count(usbm, &usbm->vma_use_count);
return -EAGAIN;
}
diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index be98564191e6..fb3e7dcfbffb 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -84,6 +84,7 @@ extern void page_ext_put(struct page_ext *page_ext);
static inline void *page_ext_data(struct page_ext *page_ext,
struct page_ext_operations *ops)
{
+ pr_info("==> offset = %ld\n", ops->offset);
return (void *)(page_ext) + ops->offset;
}
--
2.25.1