On Tue, Sep 22, 2020 at 10:45:09AM +0200, Boris Fiuczynski wrote: > On 9/22/20 8:26 AM, Erik Skultety wrote: > > On Mon, Sep 21, 2020 at 07:06:32PM +0200, Marc Hartmayer wrote: > > > Don't process subchannel devices where `def->driver` is not set. This > > > fixes the following segfault: > > > > > > Thread 21 "nodedev-init" received signal SIGSEGV, Segmentation fault. > > > [Switching to Thread 0x3ffb08fc910 (LWP 64303)] > > > (gdb) bt > > > #0 0x000003fffd1272b4 in __strcmp_vx () at /lib64/libc.so.6 > > > #1 0x000003ffc260c3a8 in udevProcessCSS (device=0x3ff9018d130, def=0x3ff90194a90) > > > #2 0x000003ffc260cb78 in udevGetDeviceDetails (device=0x3ff9018d130, def=0x3ff90194a90) > > > #3 0x000003ffc260d126 in udevAddOneDevice (device=0x3ff9018d130) > > > #4 0x000003ffc260d414 in udevProcessDeviceListEntry (udev=0x3ffa810d800, list_entry=0x3ff90001990) > > > #5 0x000003ffc260d638 in udevEnumerateDevices (udev=0x3ffa810d800) > > > #6 0x000003ffc260e08e in nodeStateInitializeEnumerate (opaque=0x3ffa810d800) > > > #7 0x000003fffdaa14b6 in virThreadHelper (data=0x3ffa810df00) > > > #8 0x000003fffc309ed6 in start_thread () > > > #9 0x000003fffd185e66 in thread_start () > > > (gdb) p *def > > > $2 = { > > > name = 0x0, > > > sysfs_path = 0x3ff90198e80 "/sys/devices/css0/0.0.ff40", > > > > Okay, this patch fixes the segfault. However, if ^this generated it because the > > driver name is not set, how do we even get to the resulting device tree as > > outlined in 05e6cdafa6e0? > > > > +- css_0_0_003a > > | > > +- ccw_0_0_1a2b > > | > > +- scsi_host0 > > > > What kind of CSS device is the one causing the error? If we skip this CSS > > device, we don't generate a name for it and don't put it in the list, so I'm > > quite puzzled on what I missed in the IBM document and thus in the review > > process. > > > > FWIW: > > Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx> > > > > Erik, > for whatever reason Marcs system does not have the subchannel device driver > "chsc_subchannel" loaded. Therefore the subchannel is not bound to any > driver and by the way this would be a filtered device since we want to show > the users only io_subchannel and vfio_ccw subchannels. > The tree above shows a subchannel bound to the io_subchannel device driver. > Maybe it helps you to see a full example of how it looks on my system: Oh, it would have been a different driver anyway - impossible to spot just from the address :). Yeah, the tree dump makes it much clearer, thanks, I pushed the patch. Erik