Messages in this thread |  | | Date | Tue, 21 Nov 2017 11:04:24 +0100 | From | Petr Mladek <> | Subject | Re: [PATCH v4 2/2] livepatch: force transition to finish |
| |
On Mon 2017-11-20 16:57:19, Miroslav Benes wrote: > On Wed, 15 Nov 2017, Miroslav Benes wrote: > > > If a task sleeps in a set of patched functions uninterruptedly, it could > > block the whole transition indefinitely. Thus it may be useful to clear > > its TIF_PATCH_PENDING to allow the process to finish. > > > > Admin can do that now by writing to force sysfs attribute in livepatch > > sysfs directory. TIF_PATCH_PENDING is then cleared for all tasks and the > > transition can finish successfully. > > > > Important note! Administrator should not use this feature without a > > clearance from a patch distributor. It must be checked that by doing so > > the consistency model guarantees are not violated. > > > > Signed-off-by: Miroslav Benes <mbenes@suse.cz> > > While working on "immediate" removal, I realized we had the similar > problem here with modules removal. There is no way out of the rabbit hole. > > If a patch is forced, we obviously cannot say there is no task sleeping in > the old code. This could be disastrous if such old module is then removed > (either we disabled it and we want to rmmod it, or there is a new "atomic > replace" patch and we want to remove the old one).
> We need something like the following (at least as a starting point)
Great catch! The proposed solution looks good to me. And as already mentioned, it might be worth updating the documentation.
For the whole patchset, including this fixup:
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards, Petr
|  |