diff options
| author | Mauro Carvalho Chehab <[email protected]> | 2021-08-05 14:28:43 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2021-08-05 14:28:43 +0000 |
| commit | 9c3a0f285248899dfa81585bc5d5bc9ebdb8fead (patch) | |
| tree | 908decd51fbb0e1c774444b002e3b89dee3fae26 /drivers/net/virtio_net.c | |
| parent | media: venus: venc: add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM co... (diff) | |
| parent | Linux 5.14-rc4 (diff) | |
| download | kernel-9c3a0f285248899dfa81585bc5d5bc9ebdb8fead.tar.gz kernel-9c3a0f285248899dfa81585bc5d5bc9ebdb8fead.zip | |
Merge tag 'v5.14-rc4' into media_tree
Linux 5.14-rc4
* tag 'v5.14-rc4': (948 commits)
Linux 5.14-rc4
pipe: make pipe writes always wake up readers
Revert "perf map: Fix dso->nsinfo refcounting"
mm/memcg: fix NULL pointer dereference in memcg_slab_free_hook()
slub: fix unreclaimable slab stat for bulk free
mm/migrate: fix NR_ISOLATED corruption on 64-bit
mm: memcontrol: fix blocking rstat function called from atomic cgroup1 thresholding code
ocfs2: issue zeroout to EOF blocks
ocfs2: fix zero out valid data
lib/test_string.c: move string selftest in the Runtime Testing menu
gve: Update MAINTAINERS list
arch: Kconfig: clean up obsolete use of HAVE_IDE
can: esd_usb2: fix memory leak
can: ems_usb: fix memory leak
can: usb_8dev: fix memory leak
can: mcba_usb_start(): add missing urb->transfer_dma initialization
can: hi311x: fix a signedness bug in hi3110_cmd()
MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver
scsi: fas216: Fix fall-through warning for Clang
scsi: acornscsi: Fix fall-through warning for clang
...
Diffstat (limited to 'drivers/net/virtio_net.c')
| -rw-r--r-- | drivers/net/virtio_net.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8a58a2f013af..56c3f8519093 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1771,6 +1771,7 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd, { struct scatterlist *sgs[4], hdr, stat; unsigned out_num = 0, tmp; + int ret; /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)); @@ -1790,7 +1791,12 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd, sgs[out_num] = &stat; BUG_ON(out_num + 1 > ARRAY_SIZE(sgs)); - virtqueue_add_sgs(vi->cvq, sgs, out_num, 1, vi, GFP_ATOMIC); + ret = virtqueue_add_sgs(vi->cvq, sgs, out_num, 1, vi, GFP_ATOMIC); + if (ret < 0) { + dev_warn(&vi->vdev->dev, + "Failed to add sgs for command vq: %d\n.", ret); + return false; + } if (unlikely(!virtqueue_kick(vi->cvq))) return vi->ctrl->status == VIRTIO_NET_OK; |
