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.

drm/appletbdrm: Use kvzalloc for big allocations

This driver is attached to a ~2000x80 screen, which is a lot more than
a single page. This causes out of memory errors in some rare cases.

Reported-by: soopyc <cassie@soopy.moe>
Closes: https://github.com/t2linux/fedora/issues/51
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Aditya Garg <gargaditya08@live.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Cc: <stable@vger.kernel.org> # v6.15+
Link: https://patch.msgid.link/20260420-x86-tb-vmalloc-v1-1-7757ff657223@chaosmail.tech

authored by

Sasha Finkelstein and committed by
Thomas Zimmermann
aaaa684b 4aa81100

+2 -2
+2 -2
drivers/gpu/drm/tiny/appletbdrm.c
··· 353 353 frames_size + 354 354 sizeof(struct appletbdrm_fb_request_footer), 16); 355 355 356 - appletbdrm_state->request = kzalloc(request_size, GFP_KERNEL); 356 + appletbdrm_state->request = kvzalloc(request_size, GFP_KERNEL); 357 357 358 358 if (!appletbdrm_state->request) 359 359 return -ENOMEM; ··· 543 543 { 544 544 struct appletbdrm_plane_state *appletbdrm_state = to_appletbdrm_plane_state(state); 545 545 546 - kfree(appletbdrm_state->request); 546 + kvfree(appletbdrm_state->request); 547 547 kfree(appletbdrm_state->response); 548 548 549 549 __drm_gem_destroy_shadow_plane_state(&appletbdrm_state->base);