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: <CAG0bkvKTFqbhHh=MRdLQnHJpEs4agiZX+05spdkK_zu5-W+rAA@mail.gmail.com>
Date:	Fri, 6 Mar 2015 14:04:53 +0530
From:	Naveen Kumar Parna <pnaveenkos@...il.com>
To:	Michal Hocko <mhocko@...e.cz>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Synchronization mechanism between wait_for_completion_interruptible_timeout()
 & complete()

Thanks Michal.

Now I am clearing x->done to zero before
wait_for_completion_interruptible_timeout.

On Thu, Mar 5, 2015 at 6:53 PM, Michal Hocko <mhocko@...e.cz> wrote:
> On Wed 04-03-15 18:46:43, Naveen Kumar Parna wrote:
>> Hello,
>>
>> I have a question regarding the synchronization mechanism between
>> wait_for_completion_interruptible_timeout() & complete(). I used
>> complete() API in the ISR Tx interrupt path and
>> wait_for_completion_interruptible_timeout() in struct file_operations
>> .write method.
>>
>> Let assume a scenario in which Tx interrupt occurred and ISR called
>> complete() API before any process actually blocked at write method on
>> wait_for_completion_interruptible_timeout().
>>
>> After a few milli seconds, a process called write() API. Does it gets
>> blocked on wait_for_completion_interruptible_timeout() for completion
>> of a specific task to be signaled from new Tx interrupt?
>
> No, see do_wait_for_common resp. complete and x->done handling.
>
> --
> Michal Hocko
> SUSE Labs
--
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