Message ID | 20230728194016.91196-2-yuxuan.luo@canonical.com |
---|---|
State | New |
Headers | show |
Series | CVE-2023-2269 | expand |
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index bcb282f110531..477e616a21c74 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1435,11 +1435,12 @@ static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_s hc->new_map = NULL; } - param->flags &= ~DM_INACTIVE_PRESENT_FLAG; - - __dev_status(hc->md, param); md = hc->md; up_write(&_hash_lock); + + param->flags &= ~DM_INACTIVE_PRESENT_FLAG; + __dev_status(md, param); + if (old_map) { dm_sync_table(md); dm_table_destroy(old_map);