[lkml]   [2015]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into the iterant API
On 06/05, Petr Mladek wrote:
> [*] In fact, there was a bug in the original code. It tried to process
> a non-existing signal when the system was freezing. See the common
> check for pending signal and freezing.

And another bug afaics:

> - case SIGSTOP:
> - jffs2_dbg(1, "%s(): SIGSTOP received\n",
> - __func__);
> - set_current_state(TASK_STOPPED);
> - schedule();
> - break;

This is obviously racy, we can miss SIGCONT.

Still I personally dislike the new kthread_sigaction() API. I agree,
a couple if signal helpers for kthreads make sense. Say,

void kthread_do_signal_stop(void)
if (current->jobctl & JOBCTL_STOP_DEQUEUED)


and probably even "int kthread_signal_deque(void)".

But personally I do not think kthread_do_signal() makes a lot of sense...


 \ /
  Last update: 2015-06-07 00:01    [W:0.285 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site