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 Jan 29, 2024
1 parent 213b22b commit 4d96351
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 @@ -19,6 +21,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 4d96351

Please sign in to comment.