]> git.baikalelectronics.ru Git - kernel.git/commit
aio: add missing smp_rmb() in read_events_ring
authorJeff Moyer <jmoyer@redhat.com>
Tue, 2 Sep 2014 17:17:00 +0000 (13:17 -0400)
committerBenjamin LaHaise <bcrl@kvack.org>
Tue, 2 Sep 2014 19:20:03 +0000 (15:20 -0400)
commitf0df8b66b81dce259ae0fb659ea68c2255a36a09
treebdc814b8e0a170f1c852553230b32d888cf7fa5a
parentb1f68c2b0bc6cfed67bb13ab4a2d5ee554dd60ab
aio: add missing smp_rmb() in read_events_ring

We ran into a case on ppc64 running mariadb where io_getevents would
return zeroed out I/O events.  After adding instrumentation, it became
clear that there was some missing synchronization between reading the
tail pointer and the events themselves.  This small patch fixes the
problem in testing.

Thanks to Zach for helping to look into this, and suggesting the fix.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Cc: stable@vger.kernel.org
fs/aio.c