]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] sanitize unshare_files/reset_files_struct
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 Apr 2008 09:31:30 +0000 (05:31 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Apr 2008 13:23:59 +0000 (09:23 -0400)
commit3b1253880b7a9e6db54b943b2d40bcf2202f58ab
tree5301be7b4d4310faa8db5a0d027b81421e36570e
parentfd8328be874f4190a811c58cd4778ec2c74d2c05
[PATCH] sanitize unshare_files/reset_files_struct

* let unshare_files() give caller the displaced files_struct
* don't bother with grabbing reference only to drop it in the
  caller if it hadn't been shared in the first place
* in that form unshare_files() is trivially implemented via
  unshare_fd(), so we eliminate the duplicate logics in fork.c
* reset_files_struct() is not just only called for current;
  it will break the system if somebody ever calls it for anything
  else (we can't modify ->files of somebody else).  Lose the
  task_struct * argument.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exec.c
include/linux/file.h
include/linux/fs.h
kernel/exit.c
kernel/fork.c