# Re: \[PATCH 1/4\] USB: usbfs: replace \_\_get\_free\_page() with kmalloc()

- From: Oliver Neukum \<oneukum@suse.com\>
- Date: 2026-08-31 13:27:17 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/08/17483905
- Thread: https://ratatoskr.run/linux-mm/2026/08/17479169/t.md

```text
On 30.08.26 10:10, Mike Rapoport (Microsoft) wrote:
> do_proc_control() allocates a temporary buffer for the data stage of a
> control transfer issued from userspace.
>
> This buffer can be allocated with kmalloc() as there's nothing special
> about it to go directly to the page allocator.

You are breaking the calculation. A page has a size of exactly
PAGE_SIZE. A kmalloced object of PAGE_SIZE is larger. That is
a bad idea.

	Regards
		Oliver

```
