[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190114152943.GA10454@infradead.org>
Date: Mon, 14 Jan 2019 07:29:43 -0800
From: Christoph Hellwig <hch@...radead.org>
To: wangbo <wdjjwb@....com>
Cc: linux-kernel@...r.kernel.org, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, wang.bo116@....com.cn,
Ondrej Zary <linux@...nbow-software.org>
Subject: Re: [PATCH] scsi: wd719x Replace GFP_KERNEL with GFP_ATOMIC in
wd719x_chip_init
On Mon, Jan 14, 2019 at 11:24:49PM +0800, wangbo wrote:
> wd719x_host_reset get spinlock first then call wd719x_chip_init,
> so replace GFP_KERNEL with GFP_ATOMIC in wd719x_chip_init.
Please move the allocation outside the lock instead. GFP_ATOMIC
DMA allocations are generally a bad idea and should be avoided where
we can.
More importantly we should never actually trigger the allocation
under the lock as far as fw_virt will always be set already
in that case.
So I think you can safely move the request firmware + allocation
+ memcpy from wd719x_chip_init to wd719x_board_found, but I'd rather
have Ondrej review that plan.
Powered by blists - more mailing lists