Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Kamalesh Babulal
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) { > > > +

Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Miroslav Benes
On Wed, 24 Apr 2019, Josh Poimboeuf wrote: > On Wed, Apr 24, 2019 at 10:55:50AM +0200, Petr Mladek wrote: > > WARN_ON_ONCE() could not be called safely under rq lock because > > of console deadlock issues. Fortunately, simple printk_deferred() > > is enough because the warning is printed from a we

Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Josh Poimboeuf
On Wed, Apr 24, 2019 at 10:55:50AM +0200, Petr Mladek wrote: > WARN_ON_ONCE() could not be called safely under rq lock because > of console deadlock issues. Fortunately, simple printk_deferred() > is enough because the warning is printed from a well defined > location and context. > > Also klp_try

Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Petr Mladek
On Wed 2019-04-24 12:41:00, Jiri Kosina wrote: > On Wed, 24 Apr 2019, Petr Mladek wrote: > > > WARN_ON_ONCE() could not be called safely under rq lock because > > of console deadlock issues. Fortunately, simple printk_deferred() > > is enough because the warning is printed from a well defined > >

Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Jiri Kosina
On Wed, 24 Apr 2019, Petr Mladek wrote: > WARN_ON_ONCE() could not be called safely under rq lock because > of console deadlock issues. Fortunately, simple printk_deferred() > is enough because the warning is printed from a well defined > location and context. > > Also klp_try_switch_task() is ca

[PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Petr Mladek
WARN_ON_ONCE() could not be called safely under rq lock because of console deadlock issues. Fortunately, simple printk_deferred() is enough because the warning is printed from a well defined location and context. Also klp_try_switch_task() is called under klp_mutex. Therefore, the buffer for debug