[PATCH] get_maintainer: only use THE REST as a fallback

From: Konstantin Ryabitsev

Date: Thu Oct 08 2026 - 08:51:41 EST


THE REST matches every file in the tree via "F: *" and "F: */", so
get_maintainer.pl currently adds linux-kernel@xxxxxxxxxxxxxxx to every
patch, regardless of whether the touched files already belong to a
subsystem with its own mailing list.

Only add THE REST for a file when no other matching section provides a
mailing list for it. Files that match no section, or only sections
without an L: entry, still fall back to THE REST, so every patch keeps
reaching at least one public list.

Signed-off-by: Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx>
---
LKML has become mostly a firehose of patches that are already going to a
subsystem list. The reason is THE REST: it matches every file in the
tree, so get_maintainer.pl adds linux-kernel@xxxxxxxxxxxxxxx to every
single patch. During the week of Oct 1-7, 2026:

- LKML carried 13,641 messages (~1,950/day), 90% of which were also
sent to at least one other list;
- with ~2,100 subscribers, that is about 29 million deliveries per
week for LKML alone.

This issue came up during the 2026 Maintainer Summit and the consensus
was that "always include linux-kernel for every patch" was never the
intent.

This patch makes THE REST a fallback as initially intended: it is only
added for a file when no other matching MAINTAINERS section provides a
mailing list for it.
---
scripts/get_maintainer.pl | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 16b80a700d4a..966595c3a6de 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -959,6 +959,14 @@ sub get_maintainers {
$tvi = $end + 1;
}

+ # THE REST matches every file, so only fall back to it when no
+ # other matching section provides a mailing list for this file.
+ my ($the_rest) = grep { get_section_name($_) eq "THE REST" } keys %hash;
+ if (defined($the_rest) &&
+ grep { $_ != $the_rest && section_has_list($_) } keys %hash) {
+ delete $hash{$the_rest};
+ }
+
foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
add_categories($line, "");
if ($sections) {
@@ -1295,6 +1303,23 @@ sub find_ending_index {
return $index;
}

+sub get_section_name {
+ my ($index) = @_;
+
+ return $typevalue[find_starting_index($index)];
+}
+
+sub section_has_list {
+ my ($index) = @_;
+
+ my $start = find_starting_index($index);
+ my $end = find_ending_index($index);
+ for (my $i = $start; $i < $end; $i++) {
+ return 1 if ($typevalue[$i] =~ m/^L:/);
+ }
+ return 0;
+}
+
sub get_subsystem_name {
my ($index) = @_;


---
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
change-id: 20261008-get-maintainer-the-rest-fallback-6655e8a648d4

Best regards,
--
Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx>