diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2022-06-14 11:10:28 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-22 14:28:09 +0200 |
commit | c907589bb2f4aeabbecf0e5de28024d0d8a23501 (patch) | |
tree | 7dd99f56bb21096c595c3c06fd1fcb1aed74dce6 /net/lapb/lapb_in.c | |
parent | d077b9276109c79ce091af06881efc250dacc779 (diff) |
dm: fix race in dm_start_io_acct
commit 10eb3a0d517fcc83eeea4242c149461205675eb4 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions