Skip to content

Commit 24f4b40

Browse files
committed
Merge branch 'hot-fixes' (fixes for rc6)
This is a collection of three fixes for small annoyances. Two of these are already pending in other trees, but I really don't want to release another -rc with these issues pending, so I picked up the patches for these things directly. We'll end up with duplicate commits eventually, I prefer that over having these issues pending. The third one is just me getting rid of another BUG_ON() just because it was reported and I dislike those things so much. * merge 'hot-fixes' branch: ida: don't use BUG_ON() for debugging drm/aperture: Run fbdev removal before internal helpers ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
2 parents 952c53c + fc82bbf commit 24f4b40

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

drivers/gpu/drm/drm_aperture.c

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,20 @@ int drm_aperture_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
329329
const struct drm_driver *req_driver)
330330
{
331331
resource_size_t base, size;
332-
int bar, ret = 0;
332+
int bar, ret;
333+
334+
/*
335+
* WARNING: Apparently we must kick fbdev drivers before vgacon,
336+
* otherwise the vga fbdev driver falls over.
337+
*/
338+
#if IS_REACHABLE(CONFIG_FB)
339+
ret = remove_conflicting_pci_framebuffers(pdev, req_driver->name);
340+
if (ret)
341+
return ret;
342+
#endif
343+
ret = vga_remove_vgacon(pdev);
344+
if (ret)
345+
return ret;
333346

334347
for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) {
335348
if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))
@@ -339,15 +352,6 @@ int drm_aperture_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
339352
drm_aperture_detach_drivers(base, size);
340353
}
341354

342-
/*
343-
* WARNING: Apparently we must kick fbdev drivers before vgacon,
344-
* otherwise the vga fbdev driver falls over.
345-
*/
346-
#if IS_REACHABLE(CONFIG_FB)
347-
ret = remove_conflicting_pci_framebuffers(pdev, req_driver->name);
348-
#endif
349-
if (ret == 0)
350-
ret = vga_remove_vgacon(pdev);
351-
return ret;
355+
return 0;
352356
}
353357
EXPORT_SYMBOL(drm_aperture_remove_conflicting_pci_framebuffers);

kernel/ptrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static void ptrace_unfreeze_traced(struct task_struct *task)
222222
if (lock_task_sighand(task, &flags)) {
223223
task->jobctl &= ~JOBCTL_PTRACE_FROZEN;
224224
if (__fatal_signal_pending(task)) {
225-
task->jobctl &= ~TASK_TRACED;
225+
task->jobctl &= ~JOBCTL_TRACED;
226226
wake_up_state(task, __TASK_TRACED);
227227
}
228228
unlock_task_sighand(task, &flags);

lib/idr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ void ida_free(struct ida *ida, unsigned int id)
491491
struct ida_bitmap *bitmap;
492492
unsigned long flags;
493493

494-
BUG_ON((int)id < 0);
494+
if ((int)id < 0)
495+
return;
495496

496497
xas_lock_irqsave(&xas, flags);
497498
bitmap = xas_load(&xas);

0 commit comments

Comments
 (0)