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-next>] [day] [month] [year] [list]
Date:	Thu, 24 Jan 2008 03:01:53 +0800
From:	"Wang Nan" <wn.at.lkml@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Can any one tell me why cond_resched in do_select?

Hi, everyone.
I have a question regarding to select system call's code. In
do_select() function, after check each fd in the set, do_select() call
cond_resched(). That line, according to my view, is to reduce the
system freeze time when do the busy querying. But before the call,
when entering into the big loop, do_select call
set_current_state(TASK_INTERRUPTIBLE). Then, if the reschedule really
taken up, the current process will not return unless it catch a
signal, or one of already registered fd send an event.
I've tried in UML. If I replace the cond_resched() into schedule(),
when sys_select() called, the process halt just like I've said.
I don't think there is a bug because this code exist so long time and
no really bad thing happened. I just want to know that, since no
schedule() allowed here, can we delete the useless line?
Thank you.
--
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