Livepatching changes for 5.20

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEESH4wyp42V4tXvYsjUqAMR0iAlPIFAmLrqJgACgkQUqAMR0iA
 lPIiexAAr+EUDm28lbQARZqZTuTDZsI40HBun4fj6MU31hPOVXW94gejTMLQNj1w
 DNWSRkf5C8mOKVuLkSv2h8PE+7dtwhRiN0qJgymHxrl/EdrngqrqpzN+UjRfCc0G
 AdGgItdznGtsVX6CVO4NbUza/ixapAOKe9FRXzK9LNukr9DoXiV4UoxOEERFZFj8
 mIJ+9p5kx1LqoP4+3yuUtGowyfJEYYhvPDukx1kjfxzszwIwlAZQhKwKC5jgzNWf
 zbOxj3GwP44c8DFmUyRtWeY8wnpLrztBOM26cFWQunLtXtanFbj5SHPGWiB+35bR
 +/FySJjOR75b5tyEBwdb8oqbLsg7n/XyybgYGDs5s5ZM/yeGyUlghQGBXsWJ3NTk
 r1QGB58Dodu2dW2aT24xfow/Nfe1xt/rq4mLypvSY2Q7+IHvX1TpYiaUGfRY44k/
 uLKjwRUCOPbaanaH73JiZ92tq9cAUFj6WhLf5mgtzqoe6hR/pc9hrzmOYE5/8ttX
 0knJc0VkQoCJhPtCZk7Voh4xHWMng5MSUzwEvp2wEd7y+KrURr3b2buEhbTPxmvf
 VEaGZMwvHqGN5c/gjaCxCmb+rsDQ/WeTK9cugAzDKXntLEi0EPM3Jk2NjIw4a3Qv
 MzexGDCH++94p5EEJxStoC8dbVTdl5EVzC9t5zQC1oiaoSLJOQw=
 =dvik
 -----END PGP SIGNATURE-----

Merge tag 'livepatching-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching

Pull livepatching update from Petr Mladek:

 - Make a selftest more reliable

* tag 'livepatching-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
  selftests/livepatch: better synchronize test_klp_callbacks_busy
This commit is contained in:
Linus Torvalds 2022-08-06 09:19:42 -07:00
commit 033a94412b

View File

@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "block_transition (default=false)");
static void busymod_work_func(struct work_struct *work);
static DECLARE_WORK(work, busymod_work_func);
static DECLARE_COMPLETION(busymod_work_started);
static void busymod_work_func(struct work_struct *work)
{
pr_info("%s enter\n", __func__);
complete(&busymod_work_started);
while (READ_ONCE(block_transition)) {
/*
@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init(void)
pr_info("%s\n", __func__);
schedule_work(&work);
/*
* To synchronize kernel messages, hold the init function from
* exiting until the work function's entry message has printed.
*/
wait_for_completion(&busymod_work_started);
if (!block_transition) {
/*
* Serialize output: print all messages from the work