提交 97b715b6 编写于 作者: W Wei Yongjun 提交者: Greg Kroah-Hartman

misc: ibmvmc: Use GFP_ATOMIC under spin lock

The function alloc_dma_buffer() is called from ibmvmc_add_buffer(),
in which a spin lock be held here, so we should use GFP_ATOMIC when
a lock is held.

Fixes: 0eca353e ("misc: IBM Virtual Management Channel Driver (VMC)")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NBryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5faecb01
......@@ -273,7 +273,7 @@ static void *alloc_dma_buffer(struct vio_dev *vdev, size_t size,
dma_addr_t *dma_handle)
{
/* allocate memory */
void *buffer = kzalloc(size, GFP_KERNEL);
void *buffer = kzalloc(size, GFP_ATOMIC);
if (!buffer) {
*dma_handle = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册