Drop SCSI core dev->dma_mask check
Status from this message: Applied to 7.3/scsi-staging, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | dma-mapping: make dma_max_mapping_size() return 0 for no DMA capabilitykernel/ | +3 | 6 replies | |
| 2/2 | scsi: core: Drop dev->dma_mask check in evaluating max_sectorsdrivers/ | +2 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Robin Murphy | Christoph Hellwig |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] Drop SCSI core dev->dma_mask check
In commit be8fcd4a8217 ("scsi: sas: Skip opt_sectors when DMA reports no real optimization hint"), the check for dev->dma_mask prior to calling dma_opt_mapping_size() was dropped.
However, it is not safe to do so, as dma_opt_mapping_size() -> dma_max_mapping_size() may try to dereference dev->dma_mask.
We just don't hit such a path as no SCSI HBA driver which has dev->dma_mask unset would use the SAS transport.
Fix that issue by adding a dev->dma_mask check indma_max_mapping_size().
The dev->dma_mask check in scsi_add_host_with_dma() can then be also dropped.
John Garry (2):
dma-mapping: make dma_max_mapping_size() return 0 for no DMA
capability
scsi: core: Drop dev->dma_mask check in evaluating max_sectors
drivers/scsi/hosts.c | 6 ++---- kernel/dma/mapping.c | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.7