Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: manual merge of the vhost tree with the origin tree
@ 2026-12-03 18:13 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2026-12-03 18:13 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Kees Cook, Kees Cook, Linux Kernel Mailing List,
	Linux Next Mailing List, Tao Cui

[-- Attachment #1: Type: text/plain, Size: 2423 bytes --]

Hi all,

Today's linux-next merge of the vhost tree got a conflict in:

  drivers/vhost/vhost.c

between commit:

  0af298e62e5cf ("treewide: refresh kmalloc_obj() conversions")

from the origin tree and commit:

  d0795719d43ea ("vhost: account the per-device kernel allocations to memcg")

from the vhost tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/vhost/vhost.c
index 241a2e2a6e248,662db163d4a95..0000000000000
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@@ -526,10 -526,14 +526,14 @@@ static long vhost_dev_alloc_iovecs(stru
  
  	for (i = 0; i < dev->nvqs; ++i) {
  		vq = dev->vqs[i];
- 		vq->indirect = kmalloc_objs(*vq->indirect, UIO_MAXIOV);
- 		vq->log = kmalloc_objs(*vq->log, dev->iov_limit);
- 		vq->heads = kmalloc_objs(*vq->heads, dev->iov_limit);
- 		vq->nheads = kmalloc_objs(*vq->nheads, dev->iov_limit);
+ 		vq->indirect = kmalloc_objs(*vq->indirect, UIO_MAXIOV,
+ 					    GFP_KERNEL_ACCOUNT);
+ 		vq->log = kmalloc_objs(*vq->log, dev->iov_limit,
+ 				       GFP_KERNEL_ACCOUNT);
+ 		vq->heads = kmalloc_objs(*vq->heads, dev->iov_limit,
+ 					 GFP_KERNEL_ACCOUNT);
+ 		vq->nheads = kmalloc_array(dev->iov_limit, sizeof(*vq->nheads),
+ 					   GFP_KERNEL_ACCOUNT);
  		if (!vq->indirect || !vq->log || !vq->heads || !vq->nheads)
  			goto err_nomem;
  	}
@@@ -2052,7 -2056,8 +2056,8 @@@ static long vhost_set_memory(struct vho
  		return -E2BIG;
  	if (max_iotlb_entries <= 0)
  		return -EINVAL;
- 	newmem = kvzalloc_flex(*newmem, regions, mem.nregions);
+ 	newmem = kvzalloc_flex(*newmem, regions, mem.nregions,
+ 			       GFP_KERNEL_ACCOUNT);
  	if (!newmem)
  		return -ENOMEM;
  
@@@ -3423,7 -3428,7 +3428,7 @@@ EXPORT_SYMBOL_GPL(vhost_disable_notify)
  struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type)
  {
  	/* Make sure all padding within the structure is initialized. */
- 	struct vhost_msg_node *node = kzalloc_obj(*node);
+ 	struct vhost_msg_node *node = kzalloc_obj(*node, GFP_KERNEL_ACCOUNT);
  	if (!node)
  		return NULL;
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-03 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 18:13 linux-next: manual merge of the vhost tree with the origin tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox