Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2014-01-20 Thread Yann Droneaud
Hi, Le lundi 13 janvier 2014 à 10:30 +0100, Yann Droneaud a écrit : > Le lundi 13 janvier 2014 à 10:06 +1100, Benjamin Herrenschmidt a écrit : > > On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote: > > > Macro get_unused_fd() is used to allocate a file descriptor with > > > default flags.

Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2014-01-20 Thread Yann Droneaud
Hi, Le lundi 13 janvier 2014 à 10:30 +0100, Yann Droneaud a écrit : Le lundi 13 janvier 2014 à 10:06 +1100, Benjamin Herrenschmidt a écrit : On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote: Macro get_unused_fd() is used to allocate a file descriptor with default flags. Those

Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2014-01-13 Thread Yann Droneaud
Hi Benjamin, Le lundi 13 janvier 2014 à 10:06 +1100, Benjamin Herrenschmidt a écrit : > On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote: > > 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

Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2014-01-13 Thread Yann Droneaud
Hi Benjamin, Le lundi 13 janvier 2014 à 10:06 +1100, Benjamin Herrenschmidt a écrit : On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote: 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

Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2014-01-12 Thread Benjamin Herrenschmidt
On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote: > 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(). > > Instead of macro

Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2014-01-12 Thread Benjamin Herrenschmidt
On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote: 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(). Instead of macro get_unused_fd(),

[PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2013-07-02 Thread Yann Droneaud
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(). Instead of macro get_unused_fd(), functions anon_inode_getfd() or get_unused_fd_flags() should be

[PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()

2013-07-02 Thread Yann Droneaud
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(). Instead of macro get_unused_fd(), functions anon_inode_getfd() or get_unused_fd_flags() should be