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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Sep 2013 14:26:45 +0800
From:	Lei Wen <>
To:	Peter Zijlstra <>, Ingo Molnar <>,,,
Subject: Question regarding list_for_each_entry_safe usage in move_one_task

Hi Peter,

I find one list API usage may not be correct in current fair.c code.
In move_one_task function, it may iterate through whole cfs_tasks
list to get one task to move.

But in dequeue_task(), it would delete one task node from list
without the lock protection. So that we could see from
list_for_each_entry_safe API definitoin:

#define list_for_each_entry_safe(pos, n, head, member)
        for (pos = list_entry((head)->next, typeof(*pos), member),      \
                n = list_entry(pos->, typeof(*pos),
member); \
             &pos->member != (head);                                    \
             pos = n, n = list_entry(n->, typeof(*n), member))

As this task node may be listed in the middle of this queue chain, it
may lead to error of searching for the next node when iterating.

Would this be possible to happen? Please help to comment it.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists