On 03/28, Roland McGrath wrote:Please note that eligible_child() drops tasklist_lock if it returns error (ret < 0), so the "read_unlock" above is wrong. This is not right. If ret < 0, we set *retval = ret, but then return 0. We should return 1, so that the caller (do_wait) will report the error. Note again that eligible_child() has already dropped tasklist, so not only we don't return the error, we continue to run without tasklist held, this is bug. If !retval and WNOHANG, we should return -ECHILD, but with this patch we return 0. Perhaps I missed something, but personally I don't like the usage of "int *retval", imho this really complicates the code. I think it is better to use the returned values directly, but pass "&flag" to do_wait_thread(). We only need the pointer to avoid the unnecessary scanning of ->ptrace_children. Better yet, we can split do_wait_thread() into 2 functions, and do not pass the pointer at all. But I didn't read the next patch yet (will do tomorrow), perhaps I missed the point of this approach. Oleg. --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Alistair John Strachan | cpu time oddity (was Re: Linux 2.6.27-rc5) |
| Linus Torvalds | Linux 2.6.27 |
git: | |
| Jakub Narebski | Git User's Survey 2007 unfinished summary continued |
| Johannes Sixt | [PATCH 02/40] Compile some programs only conditionally. |
| Linus Torvalds | [PATCH 0/6] Initial subproject support (RFC?) |
| Linus Torvalds | I'm a total push-over.. |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Steve French | Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset |
| Simon Horman | Possible regression in HTB |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Doug Fordham | Re: Real men don't attack straw men |
| Jerome Santos | sshd.config and AllowUsers |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Treason Uncloaked | 4 hours ago | Linux kernel |
| Shared swap partition | 15 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 3 days ago | Linux kernel |
