On 2021/1/21 21:36, Jason Gunthorpe wrote: > On Thu, Jan 21, 2021 at 01:33:42PM +0000, liweihang wrote: > >> We need to allocate memory while spin_lock is hold, how about using GFP_KERNEL or >> GFP_NOWAIT? > > You should try hard not to do that. Convert he spinlock to a mutex, > for instance. > > Jason > But what if some kernel users call ib_post_send() when holding a spinlock? Thanks Weihang