linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* handling Fixes tags on rebased trees
       [not found] ` <yq1h7jijnxu.fsf@ca-mkp.ca.oracle.com>
@ 2021-05-06  9:39   ` Dan Carpenter
  2021-05-06  9:49     ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-05-06  9:39 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: stable, Sasha Levin, Bart Van Assche, Stephen Rothwell,
	Andrew Morton, linux-kernel

It turns that rebasing without updating the Fixes tag is sort of common.
I wrote a script to find the invalid tags from the last month and have
include the output below.  Two of the patches are in -mm and presumably
Andrew is going fold the Fixes commit into the original commit when
these are sent upstream so those aren't a real issue.

We could probably try catching rebased trees when they are merged in
linux-next?  I'll play with this and see if it works.  But we're going
to end up missing some.  Maybe we need a file with a mapping of rebased
hashes which has something like:

28252e08649f 0df68ce4c26a ("iscv: Prepare ptdump for vm layout dynamic addresses")
42ae341756da d338ae6ff2d8 ("userfaultfd: add minor fault registration mode")

regards,
dan carpenter

#!/usr/bin/perl

open HASHES, '-|', 'git log --since="1 month ago" --grep="Fixes:" --pretty=format:"%h"' or die $@;

my $hash;
while (defined($hash = <HASHES>)) {
    chomp($hash);
    my @commit_msg=`git show --pretty="%b" -s $hash`;

    foreach my $line (@commit_msg) {
        if ($line =~ /^Fixes: ([0-9a-f]*?) /) {
            my $fix_hash = $1;
            if (system("git merge-base --is-ancestor $fix_hash linux-next")) {
                print "$hash $line";
            }
        }
    }
}
close HASHES;

Here is the output, of invalid fixes tag in the last month.

28252e08649f Fixes: e9efb21fe352 ("riscv: Prepare ptdump for vm layout dynamic addresses")
42ae341756da Fixes: f2bf15fb0969 ("userfaultfd: add minor fault registration mode")
eda5613016da Fixes: 5b109cc1cdcc ("hugetlb/userfaultfd: forbid huge pmd sharing when uffd enabled")
85021fe9d800 Fixes: 1ace37b873c2 ("drm/amdgpu/display: Implement functions to let DC allocate GPU memory")
caa93d9bd2d7 Fixes: 855b35ea96c4 ("usb: common: move function's kerneldoc next to its definition")
0f66f043d0dc Fixes: cabcebc31de4 ("cifsd: introduce SMB3 kernel server")
3ada5c1c27ca Fixes: 788b6f45c1d2 ("cifsd: add server-side procedures for SMB3")
0e672f306a28 Fixes: 6788fa154546 ("veth: allow enabling NAPI even without XDP")
aec00aa04b11 Fixes: 830027e2cb55 ("KEYS: trusted: Add generic trusted keys framework")
ef32e0513a13 Fixes: 67982dfa59de ("usb: cdns3: imx: add power lost support for system resume")


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: handling Fixes tags on rebased trees
  2021-05-06  9:39   ` handling Fixes tags on rebased trees Dan Carpenter
@ 2021-05-06  9:49     ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-05-06  9:49 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Martin K. Petersen, stable, Sasha Levin, Bart Van Assche,
	Stephen Rothwell, Andrew Morton, linux-kernel

On Thu, May 06, 2021 at 12:39:41PM +0300, Dan Carpenter wrote:
> It turns that rebasing without updating the Fixes tag is sort of common.
> I wrote a script to find the invalid tags from the last month and have
> include the output below.  Two of the patches are in -mm and presumably
> Andrew is going fold the Fixes commit into the original commit when
> these are sent upstream so those aren't a real issue.
> 
> We could probably try catching rebased trees when they are merged in
> linux-next?  I'll play with this and see if it works.  But we're going
> to end up missing some.  Maybe we need a file with a mapping of rebased
> hashes which has something like:
> 
> 28252e08649f 0df68ce4c26a ("iscv: Prepare ptdump for vm layout dynamic addresses")
> 42ae341756da d338ae6ff2d8 ("userfaultfd: add minor fault registration mode")

I thought Stephen's scripts already catch the "this commit isn't in the
tree" issue?  I use them when I take patches, so that logic came from
somewhere :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-06  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210504184635.GT21598@kadam>
     [not found] ` <yq1h7jijnxu.fsf@ca-mkp.ca.oracle.com>
2021-05-06  9:39   ` handling Fixes tags on rebased trees Dan Carpenter
2021-05-06  9:49     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).