diff options
author | Roland Dreier <roland@purestorage.com> | 2013-07-08 20:15:45 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-07-08 20:15:45 +0200 |
commit | da183c7af8444cb2c1beedaa498a9359f19ff665 (patch) | |
tree | a7e7450e8c200fa5ad5a8d92a4da94d8c5292cef /include/rdma | |
parent | IB/core: Fix error return code in add_port() (diff) | |
download | linux-da183c7af8444cb2c1beedaa498a9359f19ff665.tar.xz linux-da183c7af8444cb2c1beedaa498a9359f19ff665.zip |
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 <ydroneaud@opteya.com>.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma')
0 files changed, 0 insertions, 0 deletions