Skip to content

Commit

Permalink
USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
Browse files Browse the repository at this point in the history
If swap is on a UAS device, we could recurse into the driver by using
GFP_KERNEL.  Using GFP_NOIO ensures we won't.

Reported-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Matthew Wilcox authored and Greg Kroah-Hartman committed Dec 15, 2010
1 parent 89dc290 commit 0b83ae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/storage/uas.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static void uas_do_work(struct work_struct *work)
struct scsi_pointer *scp = (void *)cmdinfo;
struct scsi_cmnd *cmnd = container_of(scp,
struct scsi_cmnd, SCp);
uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_KERNEL);
uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_NOIO);
}
}

Expand Down

0 comments on commit 0b83ae9

Please sign in to comment.