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>] [day] [month] [year] [list]
Date:	Fri, 21 Oct 2011 16:25:30 +0200
From:	Frank Heckenbach <f.heckenbach@...soft.de>
To:	linux-kernel@...r.kernel.org
Subject: Can I call kthread_should_stop() from
	user-space tasks?

Hi,

is it permissible to call kthread_should_stop() from normal
user-space tasks (looking at kthread.c I suppose not), and if not,
is there a way to find out whether the current task is a kthread?

Reason I'm asking, I have a function that's called from both
kthreads and user-space tasks which calls
wait_event_interruptible(). If it's a kthread I want to add
"|| kthread_should_stop()" to the condition so it can be stopped
with kthread_stop() while waiting, but of course I don't want to
break user-space tasks by calling kthread_should_stop() if it's
invalid.
--
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