Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-11 Thread Andriy Gapon
On 10/02/2016 01:02, John Baldwin wrote: > I'm actually not certain of what triggered the fault. The check that emits > the printf should also be failing the kldload with EEXIST (but that doesn't > work for the case where both are compiled into the kernel). The new driver > should have just never

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-10 Thread Sreekanth Reddy
On Wed, Feb 10, 2016 at 3:30 AM, John Baldwin wrote: > On Tuesday, February 09, 2016 05:45:38 PM Sreekanth Reddy wrote: >> Hi, >> >> While debugging more, I got one more clue, >> >> --- >> static driver_t m

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-09 Thread John Baldwin
On Tuesday, February 09, 2016 03:17:39 PM Scott Long wrote: > > > On Feb 9, 2016, at 3:00 PM, John Baldwin wrote: > > > > On Tuesday, February 09, 2016 05:45:38 PM Sreekanth Reddy wrote: > >> Hi, > >> > >> While debugging more, I got one more clue, > >> > >> ---

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-09 Thread Scott Long
> On Feb 9, 2016, at 3:00 PM, John Baldwin wrote: > > On Tuesday, February 09, 2016 05:45:38 PM Sreekanth Reddy wrote: >> Hi, >> >> While debugging more, I got one more clue, >> >> --- >> static driver_

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-09 Thread John Baldwin
On Tuesday, February 09, 2016 05:45:38 PM Sreekanth Reddy wrote: > Hi, > > While debugging more, I got one more clue, > > --- > static driver_t mps_pci_driver = { > "mpr", > mps_methods, >

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-09 Thread Sreekanth Reddy
Hi, While debugging more, I got one more clue, --- static driver_t mps_pci_driver = { "mpr", mps_methods, sizeof(struct mps_softc) }; static devclass_t mps_devclass; DRIVER_M

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-09 Thread Sreekanth Reddy
On Mon, Feb 8, 2016 at 11:58 PM, John Baldwin wrote: > On Monday, February 08, 2016 08:13:26 PM Sreekanth Reddy wrote: >> sc->facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY), M_MPR, M_ZERO|M_NOWAIT); > > M_NOWAIT can fail with NULL. Normally in an attach routine you should use a > blocking malloc (M_

Re: Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-08 Thread John Baldwin
On Monday, February 08, 2016 08:13:26 PM Sreekanth Reddy wrote: > sc->facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY), M_MPR, M_ZERO|M_NOWAIT); M_NOWAIT can fail with NULL. Normally in an attach routine you should use a blocking malloc (M_WAITOK) which will not fail with NULL. > * How can I reload t

Panic on reloading a driver with same DEVICE_PROBE() return value

2016-02-08 Thread Sreekanth Reddy
Hi, We are trying to rename our out-of-box driver from "mpslsi3" to "mpr" (which is the inbox driver name). From in-box to out-of-box driver diff is vary small. Here are the steps to reproduce this issue, 1. Replace the in-box mpr.ko file from out-of-box's mpr.ko file in /boot/kernel/ path 2. A