Re: [PATCH] sym53c8xx_2: Avoid calling __sym_mfree with irqs disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 25, 2010 at 11:21:17AM -0600, James Bottomley wrote:
> On Thu, 2010-03-25 at 18:05 +0100, Stefan Bader wrote:
> > The following patch was tested and seemed to avoid the warning. Howver
> > I am not completely sure that none of the later functions need to be
> > protected with spinlocks. Though it feels ok. But maybe someone can do
> > some sanity checking.
> 
> So, I'm afraid you're right, the patch as is won't work ... the problem
> is that __sym_mfree_dma does list manipulation and for safety that has
> to be under a lock.
> 
> The inception of this problem is that ARM needs a sleeping function on
> DMA free but nothing else does so, on every platform that sym2 is
> supported, this warning is bogus.

Oh good, I'm glad you wrote this, it saves me the typing ;-)

> One way of getting rid of it might be to undef SYM_MEM_FREE_UNUSED which
> will prevent the free routines actually from releasing memory ...
> another might be to drop the lock and reacquire it around the free ...
> but that's sitting in a list traversal function so it may expose us to
> list races again, so really the whole of the freeing routines would have
> to be re-written to be list safe under lock ...

The solution I'd suggest is to take out the WARN_ON in the x86 code.
It's never going to cause trouble on x86.

The real solution is to use DMA pools, but my supply of tuits is quite
limited these days, and converting sym2 to modern APIs isn't high on
my priority list.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux