From: Al Viro Date: Sat, 26 Jul 2008 20:01:20 +0000 (-0400) Subject: [PATCH] fix RLIM_NOFILE handling X-Git-Tag: v2.6.27-rc1~73^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e1e018ecc6f7bfd10fc75b3ff9715cc8164e0a2;p=pandora-kernel.git [PATCH] fix RLIM_NOFILE handling * dup2() should return -EBADF on exceeded sysctl_nr_open * dup() should *not* return -EINVAL even if you have rlimit set to 0; it should get -EMFILE instead. Check for orig_start exceeding rlimit taken to sys_fcntl(). Failing expand_files() in dup{2,3}() now gets -EMFILE remapped to -EBADF. Consequently, remaining checks for rlimit are taken to expand_files(). Signed-off-by: Al Viro --- Reading git-diff-tree failed