mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	john stultz <johnstul@us.ibm.com>
Subject: Re: [PATCH] timekeeping fix mismerge
Date: Mon, 14 May 2007 12:25:02 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0705141218390.6739@woody.linux-foundation.org> (raw)
In-Reply-To: <1179133802.22481.327.camel@localhost.localdomain>



On Mon, 14 May 2007, Thomas Gleixner wrote:
>
> The time keeping code move to kernel/time/timekeeping.c broke the
> clocksource resume logic patch. Fix it up and move the
> clocksource_resume() call to the appropriate place.

Yeah, looks obvious enough. It had just enough context in the *wrong* 
place, that the patch would continue to apply if you used the default 
(insane) GNU patch semantics, because GNU patch defaults to --fuzz=2, and 
is thus ok if it can find even just a single line around the patch that is 
valid.

So it looks like Andrew's patch-application scripts happily added the 
"clocksource_resume()" to an insane place, because the one-line context 
was

>  
> +	clocksource_resume();
> +
>  	write_seqlock_irqsave(&xtime_lock, flags);

ie an empty line and a single write_seqlock_irqsave(). And those two lines 
could be found elsewhere in the wrong file.

There's a real reason I consider GNU patch defaults to be totally insane.

I personally use much stricter rules, but what happens is that Andrew's 
scripts will apply the patch to the wrong place, and then the diff gets 
*re-generated*, so by the time I see it, I see a nice diff that applies 
with no fuzz at all.

I don't think re-generating the diff is wrong, and in fact I think you 
have to do it, but I think Andrew should use "--fuzz=0" or at least 
"--fuzz=1" instead of the default 2. Yeah, it obviously causes more patch 
application failures, and it can be very irritating if *most* of those 
patches would have applied cleanly and correctly with --fuzz=2, but 
--fuzz=2 really is very dangerous. It literally just needed two lines to 
match in the wrong place (and as mentioned, those two lines can be 
trivial, like in the example - totally empty, even!)

		Linus

  parent reply	other threads:[~2007-05-14 19:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14  9:10 Thomas Gleixner
2007-05-14 18:58 ` Andrew Morton
2007-05-14 19:17   ` Thomas Gleixner
2007-05-14 19:25 ` Linus Torvalds [this message]
2007-05-14 20:33   ` Andrew Morton

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=alpine.LFD.0.98.0705141218390.6739@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®