Skip to content

Commit

Permalink
misc: ibmvmc: Use GFP_ATOMIC under spin lock
Browse files Browse the repository at this point in the history
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: 0eca353 ("misc: IBM Virtual Management Channel Driver (VMC)")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Jul 7, 2018
1 parent 5faecb0 commit 97b715b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/ibmvmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 97b715b

Please sign in to comment.