Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

firewire: ohci: allocate isoc context header by kvmalloc()

Isochronous packet handling now runs in a workqueue context, where page
faults is acceptable.

This commit replaces __get_free_page() with kvmalloc() when allocating the
isochronous context header buffer.

Link: https://lore.kernel.org/r/20260117142823.440811-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+3 -3
+3 -3
drivers/firewire/ohci.c
··· 2958 2958 int type, int channel, size_t header_size) 2959 2959 { 2960 2960 struct fw_ohci *ohci = fw_ohci(card); 2961 - void *header __free(free_page) = NULL; 2961 + void *header __free(kvfree) = NULL; 2962 2962 struct iso_context *ctx; 2963 2963 descriptor_callback_t callback; 2964 2964 u64 *channels; ··· 3016 3016 3017 3017 if (type != FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL) { 3018 3018 ctx->sc.header_length = 0; 3019 - header = (void *) __get_free_page(GFP_KERNEL); 3019 + header = kvmalloc(PAGE_SIZE, GFP_KERNEL); 3020 3020 if (!header) { 3021 3021 ret = -ENOMEM; 3022 3022 goto out; ··· 3137 3137 context_release(&ctx->context); 3138 3138 3139 3139 if (base->type != FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL) { 3140 - free_page((unsigned long)ctx->sc.header); 3140 + kvfree(ctx->sc.header); 3141 3141 ctx->sc.header = NULL; 3142 3142 } 3143 3143