Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Matvey Kovalev <matvey.kovalev@ispras.ru>,
	linux-cifs@vger.kernel.org, lvc-project@linuxtesting.org,
	Namjae Jeon <linkinjeon@kernel.org>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steve French <smfrench@gmail.com>, Tom Talpey <tom@talpey.com>
Subject: Re: [PATCH] fix error code overwriting in smb2_get_info_filesystem()
Date: Fri, 26 Sep 2025 14:28:04 +0200	[thread overview]
Message-ID: <7ef2a9a1-c1c6-42be-bfa8-65ce6a0a33d6@web.de> (raw)
In-Reply-To: <20250925121255.1407-1-matvey.kovalev@ispras.ru>

…
> ++ b/fs/smb/server/smb2pdu.c
> @@ -5628,7 +5628,8 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
>  
>  		if (!work->tcon->posix_extensions) {
>  			pr_err("client doesn't negotiate with SMB3.1.1 POSIX Extensions\n");
> -			rc = -EOPNOTSUPP;
> +			path_put(&path);
> +			return -EOPNOTSUPP;
>  		} else {
>  			info = (struct filesystem_posix_info *)(rsp->Buffer);
>  			info->OptimalTransferSize = cpu_to_le32(stfs.f_bsize);
…

How do you think about to avoid duplicate source code another bit?
https://elixir.bootlin.com/linux/v6.17-rc7/source/fs/smb/server/smb2pdu.c#L5437-L5653
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.17-rc7#n532

Would you like to choose a more appropriate subsystem specification?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc7#n646

Regards,
Markus

      parent reply	other threads:[~2025-09-26 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25 12:12 [PATCH] fix error code overwriting in smb2_get_info_filesystem() Matvey Kovalev
2025-09-25 14:18 ` Namjae Jeon
2025-09-26 12:28 ` Markus Elfring [this message]

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=7ef2a9a1-c1c6-42be-bfa8-65ce6a0a33d6@web.de \
    --to=markus.elfring@web.de \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=matvey.kovalev@ispras.ru \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.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