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: <Pine.LNX.4.61.0703072119290.2448@yvahk01.tjqt.qr>
Date:	Wed, 7 Mar 2007 21:20:33 +0100 (MET)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	"linux-os (Dick Johnson)" <linux-os@...logic.com>
cc:	Luong Ngo <luong.ngo@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: Sleeping thread not receive signal until it wakes up


On Mar 7 2007 08:19, linux-os (Dick Johnson) wrote:
>
>Later versions of the kernel lock the kernel when an ioctl() is
>entered. This means that if you sleep in the ioctl(), nothing
>will get scheduled.

Later versions of the kernel also have an ->unlocked_ioctl method,
which is probably better than below's approach [which is akin to
FreeBSD's DROP_GIANT/PICKUP_GIANT].

>You can do the following (possibly unsafe) in your ioctl():
>
>     int locked = kernel_locked();
>
>     ......... code
>     ......... code
>
>     if(locked)  // Before sleeping section
>        unlock_kernel();
>     .......... sleeping code
>     if(locked)  // After sleeping section
>         lock_kernel();
>
>

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