Skip to content

Commit 366a929

Browse files
committed
Merge tag 'drm-misc-fixes-2025-09-25' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
A CPU stall fix for ast, a NULL pointer dereference fix for gma500, an OOB and overflow fixes for fbcon, and a race condition fix for panthor. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://lore.kernel.org/r/20250925-smilodon-of-luxurious-genius-4ebee7@penduick
2 parents 4d486a5 + 7d9c344 commit 366a929

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

drivers/gpu/drm/ast/ast_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static int ast_astdp_read_edid_block(void *data, u8 *buf, unsigned int block, si
134134
* 3. The Delays are often longer a lot when system resume from S3/S4.
135135
*/
136136
if (j)
137-
mdelay(j + 1);
137+
msleep(j + 1);
138138

139139
/* Wait for EDID offset to show up in mirror register */
140140
vgacrd7 = ast_get_index_reg(ast, AST_IO_VGACRI, 0xd7);

drivers/gpu/drm/gma500/oaktrail_hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,8 @@ void oaktrail_hdmi_teardown(struct drm_device *dev)
726726

727727
if (hdmi_dev) {
728728
pdev = hdmi_dev->dev;
729-
pci_set_drvdata(pdev, NULL);
730729
oaktrail_hdmi_i2c_exit(pdev);
730+
pci_set_drvdata(pdev, NULL);
731731
iounmap(hdmi_dev->regs);
732732
kfree(hdmi_dev);
733733
pci_dev_put(pdev);

drivers/gpu/drm/panthor/panthor_sched.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,7 @@ static void group_free_queue(struct panthor_group *group, struct panthor_queue *
886886
if (IS_ERR_OR_NULL(queue))
887887
return;
888888

889-
if (queue->entity.fence_context)
890-
drm_sched_entity_destroy(&queue->entity);
889+
drm_sched_entity_destroy(&queue->entity);
891890

892891
if (queue->scheduler.ops)
893892
drm_sched_fini(&queue->scheduler);
@@ -3558,11 +3557,6 @@ int panthor_group_destroy(struct panthor_file *pfile, u32 group_handle)
35583557
if (!group)
35593558
return -EINVAL;
35603559

3561-
for (u32 i = 0; i < group->queue_count; i++) {
3562-
if (group->queues[i])
3563-
drm_sched_entity_destroy(&group->queues[i]->entity);
3564-
}
3565-
35663560
mutex_lock(&sched->reset.lock);
35673561
mutex_lock(&sched->lock);
35683562
group->destroyed = true;

drivers/video/fbdev/core/fbcon.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ static int fbcon_set_font(struct vc_data *vc, const struct console_font *font,
25042504
unsigned charcount = font->charcount;
25052505
int w = font->width;
25062506
int h = font->height;
2507-
int size;
2507+
int size, alloc_size;
25082508
int i, csum;
25092509
u8 *new_data, *data = font->data;
25102510
int pitch = PITCH(font->width);
@@ -2531,9 +2531,16 @@ static int fbcon_set_font(struct vc_data *vc, const struct console_font *font,
25312531
if (fbcon_invalid_charcount(info, charcount))
25322532
return -EINVAL;
25332533

2534-
size = CALC_FONTSZ(h, pitch, charcount);
2534+
/* Check for integer overflow in font size calculation */
2535+
if (check_mul_overflow(h, pitch, &size) ||
2536+
check_mul_overflow(size, charcount, &size))
2537+
return -EINVAL;
2538+
2539+
/* Check for overflow in allocation size calculation */
2540+
if (check_add_overflow(FONT_EXTRA_WORDS * sizeof(int), size, &alloc_size))
2541+
return -EINVAL;
25352542

2536-
new_data = kmalloc(FONT_EXTRA_WORDS * sizeof(int) + size, GFP_USER);
2543+
new_data = kmalloc(alloc_size, GFP_USER);
25372544

25382545
if (!new_data)
25392546
return -ENOMEM;

0 commit comments

Comments
 (0)