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]
Message-ID: <d82e647a0901300159g79680ed4h778ebb591861578c@mail.gmail.com>
Date:	Fri, 30 Jan 2009 17:59:04 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	kay.sievers@...y.org, greg@...ah.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] driver core: remove polling for driver_probe_done(v2)

2009/1/30 Arjan van de Ven <arjan@...radead.org>:
> On Fri, 30 Jan 2009 10:31:42 +0800
> tom.leiming@...il.com wrote:
>
>> From: Ming Lei <tom.leiming@...il.com>
>>
>> This patch renames driver_probe_done to driver_wait_probe_done,
>> and make it wait on condition of probing done to remove
>> polling for it in fs initialization. Also add
>> driver_wait_probe_done_and_dev_appear(name) to allow callers
>> to wait until all probing is done AND until the device @name
>> exists.
>
>>  /**
>> + * driver_wait_probe_done_and_dev_appear
>> + * wait until the probe sequence is finished _and_ the dev @name
>> appears.
>
> Hi,
>
> sorry to be the bad guy, but I think you turned the "either one" into a
> "both".... so this isn't going to work ;(

IMHO, it will msleep if either one is ture, so we turn this into
return( not sleep) if both are false.
( eg, A||B->C   <=>  ~C->~A&&~B )   :-)

           while (driver_probe_done() != 0 ||
                  (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
                  msleep(100);
 here:
      driver_probe_done() == 0  &&  name_to_dev_t(saved_root_name)

===>

driver_wait_probe_done_and_dev_appear(name)
{
         if (driver_probe_done() == 0 &&
                  (ROOT_DEV = name_to_dev_t(saved_root_name)))
                  return;
         else
                  schedule();
}

Thanks!

>
> unless I'm just too tired and miss something subtle, but I am pretty
> sure DeMorgan does not work this way :)
>
>
> --
> Arjan van de Ven        Intel Open Source Technology Centre
> For development, discussion and tips for power savings,
> visit http://www.lesswatts.org
>



-- 
Lei Ming
--
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