mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert
Add handler for fatal errors. Moves device into error state where it stops responding until the guest resets it. Guest can send illegal requests where scsi command and usb packet transfer directions are inconsistent. Use the new usb_msd_fatal_error() function instead of assert() in that case. Reported-by: Qiang Liu <cyruscyliu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Qiang Liu <cyruscyliu@gmail.com> Message-Id: <20220830063827.813053-3-kraxel@redhat.com>
This commit is contained in:
parent
cea5aa8569
commit
12b69878fc
3 changed files with 31 additions and 1 deletions
|
@ -40,6 +40,7 @@ struct MSDState {
|
|||
bool removable;
|
||||
bool commandlog;
|
||||
SCSIDevice *scsi_dev;
|
||||
bool needs_reset;
|
||||
};
|
||||
|
||||
typedef struct MSDState MSDState;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue