lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Mar 2013 15:57:45 +0800
From:	liguang <lig.fnst@...fujitsu.com>
To:	viro@...iv.linux.org.uk, oleg@...hat.com, edumazet@...gle.com,
	linux-kernel@...r.kernel.org
Cc:	liguang <lig.fnst@...fujitsu.com>
Subject: [PATCH 2/2] task_work: check callback if it's NULL

Signed-off-by: liguang <lig.fnst@...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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ