From: liguang <lig.fnst@cn.fujitsu.com>
To: viro@zeniv.linux.org.uk, oleg@redhat.com, edumazet@google.com,
linux-kernel@vger.kernel.org
Cc: liguang <lig.fnst@cn.fujitsu.com>
Subject: [PATCH 2/2] task_work: check callback if it's NULL
Date: Thu, 14 Mar 2013 15:57:45 +0800 [thread overview]
Message-ID: <1363247865-3531-2-git-send-email-lig.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1363247865-3531-1-git-send-email-lig.fnst@cn.fujitsu.com>
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
kernel/task_work.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/task_work.c b/kernel/task_work.c
index 0bf4258..f458b08 100644
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -75,7 +75,8 @@ void task_work_run(void)
do {
next = work->next;
- work->func(work);
+ if (unlikely(work->func))
+ work->func(work);
work = next;
cond_resched();
} while (work);
--
1.7.2.5
next prev parent reply other threads:[~2013-03-14 7:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 7:57 [PATCH 1/2] task_work: make FIFO task_work list liguang
2013-03-14 7:57 ` liguang [this message]
2013-03-14 14:43 ` [PATCH 2/2] task_work: check callback if it's NULL Oleg Nesterov
2013-03-15 0:20 ` li guang
2013-03-15 1:01 ` Li Zefan
2013-03-15 1:26 ` li guang
2013-03-15 1:43 ` Li Zefan
2013-03-15 2:29 ` li guang
2013-03-14 14:40 ` [PATCH 1/2] task_work: make FIFO task_work list Oleg Nesterov
2013-03-15 0:16 ` li guang
2013-03-15 14:34 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363247865-3531-2-git-send-email-lig.fnst@cn.fujitsu.com \
--to=lig.fnst@cn.fujitsu.com \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®