tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: device module auto loading fix



On Wed Apr 01 2009 at 11:08:20 +0200, Adam Hamsik wrote:
> Hi,
> 
> >Hi folks,
> >
> >I tried to look at issue reported by nicholas (kernel panic during  
> >cd boot).
> >And I found that there areat least two bugs which lead to this panic.
> >
> >1) [bc]dev_open
> >
> >In spec_open [1] we try to open device and when open function fails  
> >with
> >ENXIO which means that device was not found in a list, we try to  
> >autoload
> >it. Problem is that wecan get ENXIO even when driver is already  
> >present in
> >kernel. This is issue reported by nicholas. Attached diff adds new  
> >only in
> >kernel errno ENODEVSW which is reported by [bc]dev_open routine when
> >[bc]dev_lookup function fails.
> >
> >To be clear here I do not need to add new errno, what I need is  
> >distinguish
> >between error in bdev_lookup and device open routine.
> >
> 
> I haven't received any comments to this patch. I would like to commit  
> this patch
> soon so if you have any pleas speak up.

Did you audit all existing callers and make sure the pseudo-errno
doesn't get passed to unexpected places, e.g. userspace?  IMHO adding
an unexpected failure mode to a public interface is not a good idea.


Home | Main Index | Thread Index | Old Index