fix null pointer dereference for ERP requests
Subsystems (3)
Stefan Haberland
maintainercover fix null pointer dereference for ERP requests
Hi Jens,
pleas apply the following patch that fixes a null pointer derefernce in the DASD driver.
Stefan Haberland (1):
s390/dasd: fix null pointer dereference for ERP requests
drivers/s390/block/dasd.c | 6 ++++++ 1 file changed, 6 insertions(+)
Signature · 1 line
2.17.1
Stefan Haberland
maintainerPATCH 1/1 s390/dasd: fix null pointer dereference for ERP requests
When requeueing all requests on the device request queue to the blocklayer we might get to an ERP (error recovery) request that is a copy of an original CQR.
Those requests do not have blocklayer request information or a pointer to the dasd_queue set. When trying to access those data it will lead to a null pointer dereference in dasd_requeue_all_requests().
Fix by checking if the request is an ERP request that can simply be ignored. The blocklayer request will be requeued by the original CQR that is on the device queue right behind the ERP request.
--- drivers/s390/block/dasd.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/s390/block/dasd.c +6 -0
@@ -2980,6 +2980,12 @@ static int _dasd_requeue_request(struct dasd_ccw_req *cqr)if (!block)return -EINVAL ; +/* +* If the request is an ERP request there is nothing to requeue. +* This will be done with the remaining original request. +*/ +if (cqr->refers) +return 0 ;spin_lock_irq (&cqr->dq->lock); req = (struct request *) cqr->callback_data;blk_mq_requeue_request (req, false);
Signature · 1 line
2.17.1
Quoted 4 lines · Stefan Haberland
Hi Jens,
pleas apply the following patch that fixes a null pointer derefernce in the DASD driver.
Applied, thanks.
Signature · 1 line
Jens Axboe