Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-11 Thread Martin K. Petersen
Johannes, > If the list search in sg_get_rq_mark() fails to find a valid request, > we return a bogus element. This then can later lead to a GPF in > sg_remove_scat(). > > So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case > the list search doesn't find a valid request.

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-11 Thread Martin K. Petersen
Johannes, > If the list search in sg_get_rq_mark() fails to find a valid request, > we return a bogus element. This then can later lead to a GPF in > sg_remove_scat(). > > So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case > the list search doesn't find a valid request.

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Douglas Gilbert
On 2017-05-10 03:53 AM, Johannes Thumshirn wrote: If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Douglas Gilbert
On 2017-05-10 03:53 AM, Johannes Thumshirn wrote: If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Hannes Reinecke
On 05/10/2017 09:53 AM, Johannes Thumshirn wrote: > If the list search in sg_get_rq_mark() fails to find a valid request, we > return a bogus element. This then can later lead to a GPF in sg_remove_scat(). > > So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the > list

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Hannes Reinecke
On 05/10/2017 09:53 AM, Johannes Thumshirn wrote: > If the list search in sg_get_rq_mark() fails to find a valid request, we > return a bogus element. This then can later lead to a GPF in sg_remove_scat(). > > So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the > list

[PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Johannes Thumshirn
If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search doesn't find a valid request. Signed-off-by: Johannes

[PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Johannes Thumshirn
If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search doesn't find a valid request. Signed-off-by: Johannes