The put_device() calls vhost_vdpa_release_dev() which calls ida_simple_remove() and frees "v". So this call to ida_simple_remove() is a use after free and a double free.
Unified · Split
| @@ -1582,7 +1582,6 @@ static int vhost_vdpa_probe(struct vdpa_device *vdpa) · 1581 unmodified lines | |||
| 1582 | 1582 | ||
| 1583 | err: | 1583 | err: |
| 1584 | put_device(&v->dev); | 1584 | put_device(&v->dev); |
| 1585 | ida_simple_remove(&vhost_vdpa_ida, v->minor); | ||
| 1586 | return r; | 1585 | return r; |
| 1587 | } | 1586 | } |
| 1588 | 1587 | ||