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] [day] [month] [year] [list]
Date:	Sat, 23 Jul 2011 09:23:37 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	KOBAYASHI Yoshitake <yoshitake.kobayashi@...hiba.co.jp>
cc:	linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	viro@...iv.linux.org.uk, dchinner@...hat.com, npiggin@...nel.dk,
	hch@....de, arnd@...db.de
Subject: Re: [PATCH 3.0-rt1] ipc/mqueue: add a critical section to avoid a
 deadlock

On Sat, 23 Jul 2011, KOBAYASHI Yoshitake wrote:

> (Repost for v3.0-rt1 and changed the distination addreses)
> I have tested the following patch on v3.0-rt1 with PREEMPT_RT_FULL.
> In POSIX message queue, if a sender process uses SCHED_FIFO and
> has a higher priority than a receiver process, the sender will
> be stuck at ipc/mqueue.c:452
> 
>   452                 while (ewp->state == STATE_PENDING)
>   453                         cpu_relax();
> 
> Description of the problem
>  (receiver process)
>    1. receiver changes sender's state to STATE_PENDING (mqueue.c:846)
>    2. wake up sender process and "switch to sender" (mqueue.c:847)
>       Note: This context switch only happens in PREEMPT_RT_FULL kernel.
>  (sender process)
>    3. sender check the own state in above loop (mqueue.c:452-453)
>    *. receiver will never wake up and cannot change sender's state to
>       STATE_READY because sender has higher priority

Good catch! Queued for -rt2.

Thanks,

	tglx
--
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