Skip to content

Commit

Permalink
drm-kmod: try to avoid panic upon sysctl -a
Browse files Browse the repository at this point in the history
  • Loading branch information
emaste committed Oct 25, 2024
1 parent fab72cb commit 627e5cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_gt_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © 2022 Intel Corporation
*/

#include "opt_ddb.h"

#include <drm/drm_device.h>
#include <linux/device.h>
#include <linux/kobject.h>
Expand All @@ -20,6 +22,14 @@

bool is_object_gt(struct kobject *kobj)
{
// https://github.com/freebsd/drm-kmod/issues/280
if (kobj->name == NULL) {
printf("kobj %p has NULL name\n", kobj);
#ifdef KDB
kdb_backtrace();
#endif
return false;
}
return !strncmp(kobj->name, "gt", 2);
}

Expand Down

0 comments on commit 627e5cc

Please sign in to comment.