Messages in this thread Patch in this message | | | From | Zach Brown <> | Subject | [Patch] Add smp_mb__after_clear_bit() to unlock_kiocb() | Date | Mon, 12 Sep 2005 16:43:44 -0700 (PDT) |
| |
Add smp_mb__after_clear_bit() to unlock_kiocb()
AIO's use of wait_on_bit_lock()/wake_up_bit() forgot to add a barrier between clearing its lock bit and calling wake_up_bit() so wake_up_bit()'s unlocked waitqueue_active() can race. This puts AIO's use in line with the others and the comment above wake_up_bit().
Please apply.
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Index: 2.6.13-git12-mb-lock-kiocb/fs/aio.c =================================================================== --- 2.6.13-git12-mb-lock-kiocb.orig/fs/aio.c +++ 2.6.13-git12-mb-lock-kiocb/fs/aio.c @@ -562,6 +562,7 @@ static inline void lock_kiocb(struct kio static inline void unlock_kiocb(struct kiocb *iocb) { kiocbClearLocked(iocb); + smp_mb__after_clear_bit(); wake_up_bit(&iocb->ki_flags, KIF_LOCKED); } Signed-off-by: Zach Brown <zach.brown@oracle.com> aio.c | 1 + 1 files changed, 1 insertion(+) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |