From: Roland Dreier Date: Mon, 8 Jul 2013 18:15:45 +0000 (-0700) Subject: IB/uverbs: Use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd() X-Git-Tag: v3.11-rc1~16^2~1^3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da183c7af8444cb2c1beedaa498a9359f19ff665;p=pandora-kernel.git IB/uverbs: Use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd() The macro get_unused_fd() is used to allocate a file descriptor with default flags. Those default flags (0) can be "unsafe": O_CLOEXEC must be used by default to not leak file descriptor across exec(). Replace calls to get_unused_fd() in uverbs with calls to get_unused_fd_flags(O_CLOEXEC). Inheriting uverbs fds across exec() cannot be used to do anything useful. Based on a patch/suggestion from Yann Droneaud . Signed-off-by: Roland Dreier --- Reading git-diff-tree failed