Benjamin Marzinski 10eb3a0d51 dm: fix race in dm_start_io_acct
After commit 82f6cdcc3676c ("dm: switch dm_io booleans over to proper
flags") dm_start_io_acct stopped atomically checking and setting
was_accounted, which turned into the DM_IO_ACCOUNTED flag. This opened
the possibility for a race where IO accounting is started twice for
duplicate bios. To remove the race, check the flag while holding the
io->lock.

Fixes: 82f6cdcc3676c ("dm: switch dm_io booleans over to proper flags")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
2022-06-15 11:51:41 -04:00
..
2022-06-03 10:25:56 -07:00
2022-06-08 14:04:14 -04:00
2022-05-05 17:31:35 -04:00
2022-05-05 17:31:35 -04:00
2022-05-27 15:49:30 -07:00
2022-05-27 15:49:30 -07:00
2022-06-08 14:04:14 -04:00
2022-06-08 14:04:14 -04:00
2022-06-15 11:51:41 -04:00
2022-06-08 14:04:14 -04:00
2022-05-22 23:07:21 -07:00
2022-05-22 23:07:22 -07:00
2022-03-08 15:16:54 -08:00
2022-05-22 23:07:21 -07:00
2022-03-08 15:16:54 -08:00
2019-03-12 10:15:18 -07:00
2022-05-22 23:07:21 -07:00
2022-05-22 23:07:21 -07:00
2022-05-22 23:07:21 -07:00
2022-03-08 15:16:54 -08:00