Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,stable@vger.kernel.org,sashal@kernel.org,
	joe@perches.com,oleg@redhat.com,akpm@linux-foundation.org
Subject: + get_maintainer-lazy-load-json-pp-only-when-json-is-used.patch added to mm-nonmm-hotfixes-unstable branch
Date: Fri, 30 Oct 2026 08:58:18 -0700	[thread overview]
Message-ID: <20261030155819.12F2D1F000C1@smtp.kernel.org> (raw)


The patch titled
     Subject: get_maintainer: lazy load JSON::PP only when --json is used
has been added to the -mm mm-nonmm-hotfixes-unstable branch.  Its filename is
     get_maintainer-lazy-load-json-pp-only-when-json-is-used.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/get_maintainer-lazy-load-json-pp-only-when-json-is-used.patch

This patch will later appear in the mm-nonmm-hotfixes-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Oleg Nesterov <oleg@redhat.com>
Subject: get_maintainer: lazy load JSON::PP only when --json is used
Date: Fri, 30 Oct 2026 16:43:48 +0100

After commit 09d8b39563e8 ("get_maintainer: add --json output mode"),
I can no longer use get_maintainer.pl; it fails at compile time if
JSON::PP is not installed even when --json is not requested.

This module is only needed with the --json option. Use "require" to
load this module dynamically inside the "if ($json)" block instead.

Link: https://lore.kernel.org/auS7NOsyw7pJ7rbF@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Joe Perches <joe@perches.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: <stable@vger.kernel.org>
---

 scripts/get_maintainer.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/get_maintainer.pl~get_maintainer-lazy-load-json-pp-only-when-json-is-used
+++ a/scripts/get_maintainer.pl
@@ -21,7 +21,6 @@ use Cwd;
 use File::Find;
 use File::Spec::Functions;
 use open qw(:std :encoding(UTF-8));
-use JSON::PP;
 
 my $cur_path = fastgetcwd() . '/';
 my $lk_path = "./";
@@ -685,6 +684,7 @@ if ($json) {
     $result{web} = \@web if ($web);
     $result{bug} = \@bug if ($bug);
 
+    require JSON::PP;
     my $json_encoder = JSON::PP->new->canonical->utf8;
     print($json_encoder->encode(\%result) . "\n");
 } else {
_

Patches currently in -mm which might be from oleg@redhat.com are

get_maintainer-lazy-load-json-pp-only-when-json-is-used.patch
proc-use-pid_has_task-in-proc_inode_is_dead.patch


                 reply	other threads:[~2026-10-30 15:58 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=20261030155819.12F2D1F000C1@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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