Re: [PATCH] scsi: Fix a use after free in st_open

2021-03-15 Thread Martin K. Petersen
On Wed, 10 Mar 2021 22:46:36 -0800, Lv Yunlong wrote: > In st_open, if STp->in_use is true, STp will be freed by > scsi_tape_put(). However, STp is still used by DEBC_printk() > after. It is better to DEBC_printk() before scsi_tape_put(). Applied to 5.12/scsi-fixes, thanks! [1/1] scsi: Fix a use

Re: [PATCH] scsi: Fix a use after free in st_open

2021-03-11 Thread Kai Mäkisara (Kolumbus)
> On 11. Mar 2021, at 8.46, Lv Yunlong wrote: > > In st_open, if STp->in_use is true, STp will be freed by > scsi_tape_put(). However, STp is still used by DEBC_printk() > after. It is better to DEBC_printk() before scsi_tape_put(). > > Signed-off-by: Lv Yunlong Acked-by: Kai Mäkisara > -

[PATCH] scsi: Fix a use after free in st_open

2021-03-10 Thread Lv Yunlong
In st_open, if STp->in_use is true, STp will be freed by scsi_tape_put(). However, STp is still used by DEBC_printk() after. It is better to DEBC_printk() before scsi_tape_put(). Signed-off-by: Lv Yunlong --- drivers/scsi/st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d