On Thursday 10 January 2008, Dragos Carp wrote:

> --- a/drivers/spi/mpc52xx_psc_spi.c
> +++ b/drivers/spi/mpc52xx_psc_spi.c
> @@ -534,10 +534,10 @@ static int __exit mpc52xx_psc_spi_do_remove(struct
> device *dev)
>  
>         flush_workqueue(mps->workqueue);

Between here ...

>         destroy_workqueue(mps->workqueue);
> -       spi_unregister_master(master);
>         free_irq(mps->irq, mps);
>         if (mps->psc)
>                 iounmap(mps->psc);

... and here, drivers can submit I/O requests.  Which will then
be completely lost!!

Can you provide a proper shutdown sequence for this driver?

ISTR that some other adapters grab an extra reference to the
adapter so that they can unregister first (getting rid of
the spi_device children, unbinding their drivers, and ensuring
no more incoming requests) and then clean up resources stored
with the driver, and then finally spi_master_put().

- Dave


> +       spi_unregister_master(master);
>  
>         return 0;
>  }
> 
> 
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to