> -----Original Message----- > From: Ma, WenwuX <[email protected]> > Sent: Saturday, September 25, 2021 1:23 AM > To: [email protected] > Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang, > Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Yang, YvonneX > <[email protected]>; Ma, WenwuX <[email protected]>; [email protected] > Subject: [PATCH v2] examples/vhost: fix use-after-free on drain vhost > > When a vdev is removed in destroy_device function, > the corresponding vhost TX buffer will also be freed, > but the vhost TX buffer may still be used in the > drain_vhost function, which will cause an error of > heap-use-after-free. Therefore, before accessing > vhost TX buffer, we need to check whether the vdev > has been removed, if so, let's skip this vdev. > > Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path") > Cc: [email protected] > > Signed-off-by: Wenwu Ma <[email protected]> > ---
Reviewed-by: Chenbo Xia <[email protected]>

