> -----Original Message----- > From: mroos@xxxxxxxxxx [mailto:mroos@xxxxxxxxxx] On Behalf Of Meelis > Roos > Sent: Wednesday, January 3, 2018 1:11 AM > To: linux-scsi@xxxxxxxxxxxxxxx; dl-esc-Aacraid Linux Driver > <aacraid@xxxxxxxxxxxxx> > Subject: [PATCH] aacraid driver oops with dead battery > > EXTERNAL EMAIL > > > The battery in my HP NetRAID-4M died of old age, and the aacraid driver > started oopsing with NULL pointer dereference on startup after that. > > Fix it by reordering the init sequence to fill in function pointers > before ioremapping memory, or dev->a_ops.adapter_ioremap pointer will > be > NULL. > > Other subtypes of aacraid seem to have the order already correct. > > This was the call trace: > > ? aac_probe_one+0x7a5/0xb30 [aacraid] > pci_device_probe+0xc0/0x1a0 > driver_probe_device+0x1df/0x3b0 > __driver_attach+0xa9/0xe0 > ? driver_probe_device+0x3b0/0x3b0 > bus_for_each_dev+0x4c/0x90 > driver_attach+0x1d/0x40 > ? driver_probe_device+0x3b0/0x3b0 > bus_add_driver+0x1a7/0x2a0 > driver_register+0x6e/0x130 > __pci_register_driver+0x54/0x90 > ? 0xf81f4000 > aac_init+0x2b/0x1000 [aacraid] > do_one_initcall+0x45/0x1e0 > ? kfree_skbmem+0x74/0xa0 > ? kfree+0x16d/0x240 > ? kvfree+0x45/0x50 > ? kvfree+0x45/0x50 > ? __vunmap+0x99/0x120 > ? do_init_module+0x1a/0x245 > do_init_module+0x83/0x245 > load_module+0x2764/0x34a0 > ? kernel_read_file+0x150/0x320 > SyS_finit_module+0x82/0xa0 > do_fast_syscall_32+0xba/0x340 > > Signed-off-by: Meelis Roos <mroos@xxxxxxxx> ..... Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@xxxxxxxxxxxxx>