mirror of
https://github.com/AuxXxilium/redpill-lkm5.git
synced 2024-11-23 15:01:01 +07:00
smart_shim: fix hibernation
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
d2d97c3790
commit
bd1cb390b3
@ -684,8 +684,10 @@ static int handle_hdio_drive_cmd_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
//Before we execute ioctl we need to save the original header as ioctl will override it (they share buffer)
|
||||
u8 req_header[HDIO_DRIVE_CMD_HDR_OFFSET];
|
||||
if(unlikely(copy_from_user(req_header, buff_ptr, HDIO_DRIVE_CMD_HDR_OFFSET) != 0)) {
|
||||
if (buff_ptr != NULL) {
|
||||
pr_loc_err("Expected to copy HDIO_DRIVE_CMD header of %d bytes from %p - it failed", HDIO_DRIVE_CMD_HDR_OFFSET,
|
||||
buff_ptr);
|
||||
}
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user