]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
global/global_init: do first transport connection after setuid() 38558/head
authorRoman Penyaev <rpenyaev@suse.de>
Tue, 30 Apr 2019 15:43:01 +0000 (17:43 +0200)
committerBrad Hubbard <bhubbard@redhat.com>
Mon, 14 Dec 2020 02:08:14 +0000 (12:08 +1000)
commit5f7aaf074e3d0372f8d0fb5a1b721f440a9c028f
tree0e6739281e3814302d51dbbbdbcb01eb71da4d90
parent869ae1df551f5e9b56f4c696bfa6a04313d7e175
global/global_init: do first transport connection after setuid()

uverbs kernel module forbids access to a file descriptor after credentials
change, that leads to -EACCESS on each following ibv_*() call.

Why it matters?  Infiniband transport stops working after the following
syscalls:

  o setuid()
  o fork()

Originally the problem was described here [1] and here [2].

This patch targets only setuid() syscall and moves the first transport
initialization after setuid() has been done.

fork() is used to daemonize ceph services (when systemd is not used
for any reason) and probably the easiest way is to rip the whole lagacy
daemonization code out, so this patch does not target this problem.

[1] https://tracker.ceph.com/issues/39238
[2] https://www.spinics.net/lists/ceph-devel/msg45083.html

Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
(cherry picked from commit 02c0a20a09fc8f678d0f9caf7f580b3dbc1f0f91)
src/global/global_init.cc