]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "[PATCH] fix Data Acess error in dup_fd"
authorLinus Torvalds <torvalds@woody.osdl.org>
Tue, 14 Nov 2006 23:20:51 +0000 (15:20 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Tue, 14 Nov 2006 23:20:51 +0000 (15:20 -0800)
commitb384f2630f4f2915edd974c0e0d8cb4f7c72aa62
treeb07590ec50da7d079b1c2852ccc79cbcd8fb2cce
parent780b6a912f00d7b45d6d9a44569074b6e99813e7
Revert "[PATCH] fix Data Acess error in dup_fd"

This reverts commit 3ea7a001ea4e9bb549f0b1b8bbcb1a1e6b763fdc.

Sergey Vlasov points out (and Vadim Lobanov concurs) that the bug it was
supposed to fix must be some unrelated memory corruption, and the "fix"
actually causes more problems:

  "However, the new code does not look safe in all cases.  If some other
   task has opened more files while dup_fd() released oldf->file_lock, the
   new code will update open_files to the new larger value.  But newf was
   allocated with the old smaller value of open_files, therefore subsequent
   accesses to newf may try to write into unallocated memory."

so revert it.

Cc: Sharyathi Nagesh <sharyath@in.ibm.com>
Cc: Sergey Vlasov <vsu@altlinux.ru>
Cc: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/fork.c