mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
kwork/notifier: initialize the work handler
kworker dqueue corruption if the garbage in work->worker handler Change-Id: Ice5e66e8ed080a7539d5fe02f946a66794cbda7d Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -257,6 +257,10 @@ int work_notifier_setup(FAR struct work_notifier_s *info)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Initialize the work structure */
|
||||||
|
|
||||||
|
memset(¬ifier->work, 0, sizeof(notifier->work));
|
||||||
|
|
||||||
/* Duplicate the notification info */
|
/* Duplicate the notification info */
|
||||||
|
|
||||||
memcpy(¬ifier->info, info, sizeof(struct work_notifier_s));
|
memcpy(¬ifier->info, info, sizeof(struct work_notifier_s));
|
||||||
|
|||||||
Reference in New Issue
Block a user