lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Apr 2008 11:15:36 +0300 (EEST)
From:	Pekka J Enberg <penberg@...helsinki.fi>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
cc:	Alan Stern <stern@...land.harvard.edu>,
	linux-kernel@...r.kernel.org, dsd@...too.org,
	mdharm-usb@...-eyed-alien.net, linux-usb@...r.kernel.org,
	vegardno@....uio.no, James.Bottomley@...senPartnership.com,
	linux-scsi@...r.kernel.org, Greg KH <greg@...ah.com>,
	Matthew Wilcox <matthew@....cx>
Subject: Re: [RFC/PATCH] usb-storage: wait for device scanning before mounting
 root

Hi Stefan,

On Fri, 25 Apr 2008, Stefan Richter wrote:
> > Index: linux-2.6/drivers/scsi/scsi_scan.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/scsi/scsi_scan.c
> > +++ linux-2.6/drivers/scsi/scsi_scan.c
> > @@ -1802,6 +1802,7 @@ static int do_scan_async(void *_data)
> >   struct async_scan_data *data = _data;
> >   do_scsi_scan_host(data->shost);
> >   scsi_finish_async_scan(data);
> > +	complete_root_scan();
> >  	return 0;
> >  }
> >  
> > @@ -1823,6 +1824,7 @@ void scsi_scan_host(struct Scsi_Host *sh
> >   	return;
> >   }
> > 
> > +	begin_root_scan();
> >   p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no);
> >   if (unlikely(IS_ERR(p)))
> >    do_scan_async(data);
> 
> Looks like you want complete_root_scan() after IS_ERR(p).  Are there any other
> thread exit paths which don't call complete_root_scan() yet?

No, we call complete_root_scan() in do_scan_sync() which is either called 
asynchronously from the kernel thread or synchronously on IS_ERR(p).

On Fri, 25 Apr 2008, Stefan Richter wrote:
> Besides, can't you use the generic async scan facility of the SCSI stack for
> your purpose?  If not, can it be extended to make it usable?

So you mean drivers/scsi/scsi_scan.c, right? We probably can and 
should so I'll take a look.

		Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ