lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()
On Wed, Apr 24, 2019 at 08:48:58PM +0200, Miroslav Benes wrote:
> On Wed, 24 Apr 2019, Josh Poimboeuf wrote:
>
[...]
> > > ret = save_stack_trace_tsk_reliable(task, &trace);
> > > - WARN_ON_ONCE(ret == -ENOSYS);
> > > + if (ret == -ENOSYS) {
> > > + if (!enosys_warned) {
> > > + printk_deferred(KERN_WARNING "%s: save_stack_trace_tsk_reliable() not supported on this architecture.\n",
> > > + __func__);
> > > + enosys_warned = 1;
> > > + }
> > > + return ret;
> > > + }
> >
> > We already have a similar printk in patch 1, so is this warning really
> > needed?
>
> I don't think so. pr_warn() in klp_enable_patch() should be enough in my
> opinion.
>
> However,
>
> if (ret == -ENOSYS)
> return ret;
>
> would be justified, wouldn't it?
>

Probably an one line comment on why we return, will be helpful.

--
Kamalesh

\
 
 \ /
  Last update: 2019-04-25 05:32    [W:0.064 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site