scsi: sg: sg_read(): simplify reading ->pack_id of userland sg_io_hdr_t
We don't need to allocate a temporary buffer and read the entire structure in it, only to fetch a single field and free what we'd allocated. Just use get_user() and be done with it... Link: https://lore.kernel.org/r/20191017193925.25539-4-viro@ZenIV.linux.org.ukSigned-off-by: NAl Viro <viro@zeniv.linux.org.uk> Acked-by: NDouglas Gilbert <dgilbert@interlog.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Showing
想要评论请 注册 或 登录