Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-14 Thread Martin K. Petersen
> "Doug" == Douglas Gilbert writes: Doug> In this post: Doug> http://www.spinics.net/lists/linux-scsi/msg97124.html the author Doug> shows some kernel infrastructure complaining about a sleep in an Doug> invalid context. Remove offending call to vmalloc(). Instead of Doug> using kzalloc() wh

Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-09 Thread Bart Van Assche
On 05/31/2016 02:15 PM, Douglas Gilbert wrote: In this post: http://www.spinics.net/lists/linux-scsi/msg97124.html the author shows some kernel infrastructure complaining about a sleep in an invalid context. Remove offending call to vmalloc(). Instead of using kzalloc() which reviewers didn't lik

Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-09 Thread Christoph Hellwig
Oh well, not a fan og the casting, but as this is an important fix let's get it in for now: Acked-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/ma

Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-08 Thread Douglas Gilbert
On 2016-06-08 04:57 PM, Douglas Gilbert wrote: On 2016-06-07 09:55 PM, Christoph Hellwig wrote: +static int p_fill_from_dev_buffer(struct scsi_cmnd *scp, const void *arr, + int arr_len, unsigned int off_dst) +{ +int act_len, n; +struct scsi_data_buffer *sdb = scsi_in(scp

Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-07 Thread Douglas Gilbert
On 2016-06-07 09:55 PM, Christoph Hellwig wrote: +static int p_fill_from_dev_buffer(struct scsi_cmnd *scp, const void *arr, + int arr_len, unsigned int off_dst) +{ + int act_len, n; + struct scsi_data_buffer *sdb = scsi_in(scp); + off_t skip = off

Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-07 Thread Christoph Hellwig
> +static int p_fill_from_dev_buffer(struct scsi_cmnd *scp, const void *arr, > + int arr_len, unsigned int off_dst) > +{ > + int act_len, n; > + struct scsi_data_buffer *sdb = scsi_in(scp); > + off_t skip = off_dst; Why off_t which is a signed value instea

Re: [PATCH v2] scsi_debug: fix sleep in invalid context

2016-06-06 Thread Martin K. Petersen
> "Doug" == Douglas Gilbert writes: Doug> In this post: Doug> http://www.spinics.net/lists/linux-scsi/msg97124.html the author Doug> shows some kernel infrastructure complaining about a sleep in an Doug> invalid context. Remove offending call to vmalloc(). Instead of Doug> using kzalloc() wh

[PATCH v2] scsi_debug: fix sleep in invalid context

2016-05-31 Thread Douglas Gilbert
In this post: http://www.spinics.net/lists/linux-scsi/msg97124.html the author shows some kernel infrastructure complaining about a sleep in an invalid context. Remove offending call to vmalloc(). Instead of using kzalloc() which reviewers didn't like, use a bucket system (64 bytes on the stack) an