On Sat, Apr 30, 2022 at 07:54:12PM -0600, Ted Bullock wrote: > in radeondrm_attach_kms:508 could potentially fail and result in a NULL > dereference at line 510. Check this with KASSERT().
This can not happen. drm_pciprobe() uses drm_find_description() if it returned NULL the driver would not match. > > diff 5fbcee9a5968b225053e9e1b0363430e36326626 /usr/src > blob - 94f38e8769827e9c649147689a9ca6f889d1464f > file + sys/dev/pci/drm/radeon/radeon_kms.c > --- sys/dev/pci/drm/radeon/radeon_kms.c > +++ sys/dev/pci/drm/radeon/radeon_kms.c > @@ -507,6 +507,8 @@ radeondrm_attach_kms(struct device *parent, struct dev > > id_entry = drm_find_description(PCI_VENDOR(pa->pa_id), > PCI_PRODUCT(pa->pa_id), radeondrm_pciidlist); > + KASSERT(id_entry != NULL); > + > rdev->flags = id_entry->driver_data; > rdev->family = rdev->flags & RADEON_FAMILY_MASK; > rdev->pc = pa->pa_pc; > > > > -- > Ted Bullock <tbull...@comlore.com> > >