Message ID | f6bedf84258006261fd2bb632e13d1d1904cda93.1481220077.git.jpoimboe@redhat.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Thu 2016-12-08 12:08:34, Josh Poimboeuf wrote: > klp_patch_object()'s callers already ensure that the object is loaded, > so its call to klp_is_object_loaded() is unnecessary. > > This will also make it possible to move the patching code into a > separate file. Fair enough. > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr
On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > klp_patch_object()'s callers already ensure that the object is loaded, > so its call to klp_is_object_loaded() is unnecessary. > > This will also make it possible to move the patching code into a > separate file. > > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Miroslav
On Thursday 08 December 2016 11:38 PM, Josh Poimboeuf wrote: > klp_patch_object()'s callers already ensure that the object is loaded, > so its call to klp_is_object_loaded() is unnecessary. > > This will also make it possible to move the patching code into a > separate file. > > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 2dbd355..47ed643 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -467,9 +467,6 @@ static int klp_patch_object(struct klp_object *obj) if (WARN_ON(obj->patched)) return -EINVAL; - if (WARN_ON(!klp_is_object_loaded(obj))) - return -EINVAL; - klp_for_each_func(obj, func) { ret = klp_patch_func(func); if (ret) {
klp_patch_object()'s callers already ensure that the object is loaded, so its call to klp_is_object_loaded() is unnecessary. This will also make it possible to move the patching code into a separate file. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> --- kernel/livepatch/core.c | 3 --- 1 file changed, 3 deletions(-)