Linux-Next discussions
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Kees Cook <kees@kernel.org>, Kees Cook <kees+treewide@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Tao Cui <cuitao@kylinos.cn>
Subject: linux-next: manual merge of the vhost tree with the origin tree
Date: Thu, 3 Dec 2026 18:13:20 +0000	[thread overview]
Message-ID: <axGxQL8DpVhvysRk@sirena.org.uk> (raw)

[-- 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 --]

                 reply	other threads:[~2026-12-03 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axGxQL8DpVhvysRk@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=cuitao@kylinos.cn \
    --cc=kees+treewide@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mst@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox