Searched hist:"15 e26f6a3c6de2c665b4a30b9a70a902111f281f" (Results 1 – 2 of 2) sorted by relevance
/linux/drivers/block/drbd/ |
H A D | drbd_worker.c | 15e26f6a3c6de2c665b4a30b9a70a902111f281f Mon Apr 28 09:43:21 UTC 2014 Lars Ellenberg <lars.ellenberg@linbit.com> drbd: add drbd_queue_work_if_unqueued helper
We sometimes do if (list_empty(&w.list)) drbd_queue_work(&q, &w.list);
Removal (list_del_init) may happen outside all locks, after all pending work entries have been moved to an on-stack local work list.
For not dynamically allocated, but embeded, work structs, we must avoid to re-add until it really was removed.
Move that list_empty check inside the spin_lock(&q->q_lock) within the helper function, and change to list_empty_careful().
This may have been the reason for a list_add corruption inside drbd_queue_work().
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
|
H A D | drbd_int.h | 15e26f6a3c6de2c665b4a30b9a70a902111f281f Mon Apr 28 09:43:21 UTC 2014 Lars Ellenberg <lars.ellenberg@linbit.com> drbd: add drbd_queue_work_if_unqueued helper
We sometimes do if (list_empty(&w.list)) drbd_queue_work(&q, &w.list);
Removal (list_del_init) may happen outside all locks, after all pending work entries have been moved to an on-stack local work list.
For not dynamically allocated, but embeded, work structs, we must avoid to re-add until it really was removed.
Move that list_empty check inside the spin_lock(&q->q_lock) within the helper function, and change to list_empty_careful().
This may have been the reason for a list_add corruption inside drbd_queue_work().
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
|