Bug 225157 - sytem crashes on dma_map_sg()
sytem crashes on dma_map_sg()
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Prarit Bhargava
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2007-01-29 09:58 EST by Eli Cohen
Modified: 2008-03-14 01:30 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-14 01:30:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eli Cohen 2007-01-29 09:58:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060601 Firefox/ (Ubuntu-edgy)

Description of problem:
When calling dma_map_sg() for a region more than 1 GB the kernel panics. To workaround this problem, need to call multiple times dma_map_sg() with a single entry rather than calling once with multiple entries.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. call dma_map_sg() with several entries for more than 1 GB

Actual Results:

Expected Results:

Additional info:
Here are the specs agian since I am not sure I put then correctly:
component: kernel, IOMMU
arch: ia64
chipset HP

Please forward to HP.
Comment 1 Bjorn Helgaas 2007-01-29 11:11:44 EST
This happens because sba_alloc_range(), which is called in the dma_map_sg()
path, panics instead of returning an allocation failure.

I think this was originally done because some drivers didn't check the
return code of dma_map_sg().  But it looks like most other IOTLB drivers
return failure instead of panicking, and it shouldn't be hard to fix 
sba_iommu.c to do the same thing.  Then it's "just" a question of
testing the supported drivers to make sure they have the right error
Comment 2 Ra P. 2007-02-14 10:09:44 EST
Rather than fail the request, maybe it is better to fall back on registering
multiple chunks as if dma_map_single was called multiple times.
Comment 3 Bjorn Helgaas 2007-02-14 14:15:19 EST
If the device can directly address all the buffers in the sglist,
we could bypass the IOMMU.  This has some effect on performance, so
would have to be evaluated.  You win some by not having to set up the
IOMMU mappings, but you also lose the benefit of coalescing many
sglist buffers into a few.

But for devices that can't reach all the buffers (e.g., 32-bit cards),
we can't bypass the IOMMU, so we have to either panic or return failure.
Comment 4 Luming Yu 2007-08-15 02:15:40 EDT
Are there any update on this issue?
What is the upstream status?
Is there any patch needs to be back ported?
Comment 5 Luming Yu 2008-03-14 01:30:21 EDT
Since __no__ update for these bug for about half year. Closing it...

Note You need to log in before you can comment on or make changes to this bug.