public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pratyush Yadav <pratyush@kernel•org>
To: Mark Brown <broonie@kernel•org>
Cc: Mike Rapoport <rppt@kernel•org>,
	 Andrew Morton <akpm@linux-foundation•org>,
	 Pasha Tatashin <pasha.tatashin@soleen•com>,
	Pratyush Yadav <pratyush@kernel•org>,
	 Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	 Linux Next Mailing List <linux-next@vger•kernel.org>,
	 Luca Boccassi <luca.boccassi@gmail•com>
Subject: Re: linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree
Date: Tue, 26 May 2026 16:30:12 +0200	[thread overview]
Message-ID: <2vxzjysq451n.fsf@kernel.org> (raw)
In-Reply-To: <ahWlYXNjGUbkKoHy@sirena.org.uk> (Mark Brown's message of "Tue, 26 May 2026 14:51:29 +0100")

Hi Mark,

On Tue, May 26 2026, Mark Brown wrote:

> Hi all,
>
> Today's linux-next merge of the liveupdate tree got a conflict in:
>
>   kernel/liveupdate/luo_session.c
>
> between commit:
>
>   da7f658ccc8da ("liveupdate: validate session type before performing operation")
>
> from the liveupdate-fixes tree and commit:
>
>   d6b3d47bdaf89 ("liveupdate: add LIVEUPDATE_SESSION_GET_NAME ioctl")
>
> from the liveupdate 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.

Thanks! I did foresee this and was planning to send a fixup that we can
meld into "liveupdate: add LIVEUPDATE_SESSION_GET_NAME ioctl".

I suppose one option is to wait for "liveupdate: validate session type
before performing operation" to land into v7.1-rc6 and then rebase the
liveupdate/next branch on top of it and fix the conflict ourselves. This
gives around 2 weeks for the rebased branch to soak into linux-next
until we send the PR. But I am not sure if this is enough time or if we
should just let Linus deal with this...

>
> diff --cc kernel/liveupdate/luo_session.c
> index 74c39d93d45a1,1caaa7886ec6d..0000000000000
> --- a/kernel/liveupdate/luo_session.c
> +++ b/kernel/liveupdate/luo_session.c
> @@@ -293,15 -306,9 +306,16 @@@ union ucmd_buffer 
>   	struct liveupdate_session_finish finish;
>   	struct liveupdate_session_preserve_fd preserve;
>   	struct liveupdate_session_retrieve_fd retrieve;
> + 	struct liveupdate_session_get_name get_name;
>   };
>   
>  +/* Type of sessions the ioctl applies to. */
>  +enum luo_ioctl_type {
>  +	LUO_IOCTL_INCOMING,
>  +	LUO_IOCTL_OUTGOING,
>  +	LUO_IOCTL_ALL,
>  +};
>  +
>   struct luo_ioctl_op {
>   	unsigned int size;
>   	unsigned int min_size;
> @@@ -323,30 -328,15 +337,32 @@@
>   
>   static const struct luo_ioctl_op luo_session_ioctl_ops[] = {
>   	IOCTL_OP(LIVEUPDATE_SESSION_FINISH, luo_session_finish,
>  -		 struct liveupdate_session_finish, reserved),
>  +		 struct liveupdate_session_finish, reserved, LUO_IOCTL_INCOMING),
>   	IOCTL_OP(LIVEUPDATE_SESSION_PRESERVE_FD, luo_session_preserve_fd,
>  -		 struct liveupdate_session_preserve_fd, token),
>  +		 struct liveupdate_session_preserve_fd, token, LUO_IOCTL_OUTGOING),
>   	IOCTL_OP(LIVEUPDATE_SESSION_RETRIEVE_FD, luo_session_retrieve_fd,
>  -		 struct liveupdate_session_retrieve_fd, token),
>  +		 struct liveupdate_session_retrieve_fd, token, LUO_IOCTL_INCOMING),
> + 	IOCTL_OP(LIVEUPDATE_SESSION_GET_NAME, luo_session_get_name,
>  -		 struct liveupdate_session_get_name, name),
> ++		 struct liveupdate_session_get_name, name, LUO_IOCTL_OUTGOING),

FWIW, this resolution is wrong. It should be LUO_IOCTL_ALL here.

>   };
>   
>  +static bool luo_ioctl_type_valid(struct luo_session *session,
>  +				 const struct luo_ioctl_op *op)
>  +{
>  +	switch (op->type) {
>  +	case LUO_IOCTL_INCOMING:
>  +		/* Retrieved is only set on incoming sessions */
>  +		return session->retrieved;
>  +	case LUO_IOCTL_OUTGOING:
>  +		return !session->retrieved;
>  +	case LUO_IOCTL_ALL:
>  +		return true;
>  +	}
>  +
>  +	/* Catch-all. */
>  +	return false;
>  +}
>  +
>   static long luo_session_ioctl(struct file *filep, unsigned int cmd,
>   			      unsigned long arg)
>   {
>

-- 
Regards,
Pratyush Yadav

  reply	other threads:[~2026-05-26 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 13:51 linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree Mark Brown
2026-05-26 14:30 ` Pratyush Yadav [this message]
2026-05-26 14:36   ` Mark Brown

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=2vxzjysq451n.fsf@kernel.org \
    --to=pratyush@kernel$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=broonie@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=luca.boccassi@gmail$(echo .)com \
    --cc=pasha.tatashin@soleen$(echo .)com \
    --cc=rppt@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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