Skip to content

Commit

Permalink
MDEV-29443: prevent uring access to galera sst /notify scripts
Browse files Browse the repository at this point in the history
The resources like uring in MariaDB aren't intended for spawned
processes so we restrict access using the io_uring_ring_dontfork
liburing library call.
  • Loading branch information
grooverdan committed Sep 5, 2022
1 parent 9fefd44 commit fd8dbe0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tpool/aio_liburing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ class aio_uring final : public tpool::aio
}
throw std::runtime_error("aio_uring()");
}
if (io_uring_ring_dontfork(&uring_) != 0)
{
my_printf_error(ER_UNKNOWN_ERROR,
"io_uring_dontfork() failed with errno %d (continuing)",
ME_ERROR_LOG | ME_WARNING, errno);
}

thread_= std::thread(thread_routine, this);
}
Expand Down

0 comments on commit fd8dbe0

Please sign in to comment.