]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm: set DMF_SUSPENDED* _before_ clearing DMF_NOFLUSH_SUSPENDING
authorMike Snitzer <snitzer@redhat.com>
Tue, 2 Aug 2016 17:07:20 +0000 (13:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:10:52 +0000 (18:10 +0200)
commitd22601e240e5f54a17fe2ac883c2b10e04024e69
tree12d1e71865e4ed3319483abdf01c647f7bf69a81
parenta92fb431febc96c97e2ee539fe1dce865720181b
dm: set DMF_SUSPENDED* _before_ clearing DMF_NOFLUSH_SUSPENDING

commit eaf9a7361f47727b166688a9f2096854eef60fbe upstream.

Otherwise, there is potential for both DMF_SUSPENDED* and
DMF_NOFLUSH_SUSPENDING to not be set during dm_suspend() -- which is
definitely _not_ a valid state.

This fix, in conjuction with "dm rq: fix the starting and stopping of
blk-mq queues", addresses the potential for request-based DM multipath's
__multipath_map() to see !dm_noflush_suspending() during suspend.

Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm.c