This patch fixes a potential MBO leak in case function aim_read()
exits right after the MBO has been fetched from kfifo and before
it has been saved to the variable stacked_mbo.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(!channel->dev))))
return -ERESTARTSYS;
}
+ channel->stacked_mbo = mbo;
start_copy:
/* make sure we don't submit to gone devices */
if (count < mbo->processed_length) {
channel->mbo_offs = copied;
- channel->stacked_mbo = mbo;
} else {
most_put_mbo(mbo);
channel->mbo_offs = 0;