public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.12-rc4-mm1
Date: Sat, 14 May 2005 18:20:51 -0700	[thread overview]
Message-ID: <20050515012051.GJ9304@holomorphy.com> (raw)
In-Reply-To: <20050512033100.017958f6.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

On Thu, May 12, 2005 at 03:31:00AM -0700, Andrew Morton wrote:
> +uml-remove-elfh.patch
> +uml-critical-change-memcpy-to-memmove.patch
>  UML important updates

uml-remove-elfh looks empty.

Anyway, the real patch, of minor importance, follows in an attachment.
This is a pure bugfix, as the intention was apparent, but not carried
out, but the bug never caused exceptions or corruption. The check for
a comma following "profile=schedule" on the command line had an off by
one that caused it never to trigger. The option checking also
accidentally clobbered prof_on = SCHED_PROFILING, granted that it was
reached (which prior to dealing with that off by one, it never was).

I took the liberty of translating all of the hardcoded string length
constants to strlen(schedstr) plus the appropriate offsets for the sake
of clarity and side benefit of putting a string used only in __init in
__initdata, but left others not multiply referenced in .rodata.


-- wli

[-- Attachment #2: profile-schedule-parsing.patch --]
[-- Type: text/plain, Size: 1278 bytes --]

profile=schedule parsing is not quite what it should be.
First, str[7] is 'e', not ',', but then even if it did fall through,
prof_on = SCHED_PROFILING would be clobbered inside if (get_option(...))
So a small amount of rearrangement is done in this patch to correct it.

Index: mm1-2.6.12-rc4/kernel/profile.c
===================================================================
--- mm1-2.6.12-rc4.orig/kernel/profile.c	2005-05-14 17:09:17.000000000 -0700
+++ mm1-2.6.12-rc4/kernel/profile.c	2005-05-14 17:45:05.000000000 -0700
@@ -49,15 +49,19 @@
 
 static int __init profile_setup(char * str)
 {
+	static char __initdata schedstr[] = "schedule";
 	int par;
 
-	if (!strncmp(str, "schedule", 8)) {
+	if (!strncmp(str, schedstr, strlen(schedstr))) {
 		prof_on = SCHED_PROFILING;
-		printk(KERN_INFO "kernel schedule profiling enabled\n");
-		if (str[7] == ',')
-			str += 8;
-	}
-	if (get_option(&str,&par)) {
+		if (str[strlen(schedstr)] == ',')
+			str += strlen(schedstr) + 1;
+		if (get_option(&str, &par))
+			prof_shift = par;
+		printk(KERN_INFO
+			"kernel schedule profiling enabled (shift: %ld)\n",
+			prof_shift);
+	} else if (get_option(&str, &par)) {
 		prof_shift = par;
 		prof_on = CPU_PROFILING;
 		printk(KERN_INFO "kernel profiling enabled (shift: %ld)\n",

  parent reply	other threads:[~2005-05-15  1:21 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 10:31 2.6.12-rc4-mm1 Andrew Morton
2005-05-12 12:21 ` 2.6.12-rc4-mm1, build results compared to 2.6.12-rc3-mm3 Jan Dittmer
2005-05-13  6:19   ` Maneesh Soni
2005-05-12 12:39 ` 2.6.12-rc4-mm1 Reuben Farrelly
2005-05-12 15:09   ` 2.6.12-rc4-mm1 Andrew Morton
2005-05-14 21:19   ` 2.6.12-rc4-mm1 Andrew James Wade
2005-05-12 12:58 ` kobject_register failed for intelfb (-EACCES) (Re: 2.6.12-rc4-mm1) Alexey Dobriyan
2005-05-12 15:43   ` Greg KH
2005-05-12 15:59     ` Andrew Morton
2005-05-12 16:04       ` Greg KH
2005-05-12 16:20       ` Alexey Dobriyan
2005-05-12 18:14 ` [PATCH -mm] Print KBD and AUX irqs correctly Alexey Dobriyan
2005-05-12 21:42 ` [-mm patch] mm.h: fix page_zone compile error Adrian Bunk
2005-05-12 22:09   ` Dave Hansen
2005-05-12 22:26     ` Adrian Bunk
2005-05-13 13:26   ` Andy Whitcroft
2005-05-12 21:54 ` 2.6.12-rc4-mm1 Greg KH
2005-05-13  0:47 ` [-mm patch] drivers/cpufreq/cpufreq_conservative.c: make cpufreq_gov_dbs static Adrian Bunk
2005-05-13  7:24 ` 2.6.12-rc4-mm1 Dave Airlie
2005-05-13  7:25   ` 2.6.12-rc4-mm1 Dave Airlie
2005-05-13 14:53 ` 2.6.12-rc4-mm1 steve
2005-05-13 18:12 ` [-mm patch] kprobes: arch_supports_kretprobes cleanup Frederik Deweerdt
2005-05-13 19:40 ` 2.6.12-rc4-mm1 Johannes Stezenbach
2005-05-14 11:27 ` 2.6.12-rc4-mm1 Richard Purdie
2005-05-16 11:27   ` 2.6.12-rc4-mm2 Richard Purdie
2005-05-15  1:20 ` William Lee Irwin III [this message]
2005-05-15  1:30   ` 2.6.12-rc4-mm1 Andrew Morton
2005-05-15  9:44     ` 2.6.12-rc4-mm1 Jesper Juhl
2005-05-15  9:54       ` 2.6.12-rc4-mm1 Andrew Morton
2005-05-15  9:43 ` 2.6.12-rc4-mm1: drivers/usb/gadget/ether.c compile error Adrian Bunk
2005-05-16 15:26   ` David Brownell
2005-05-15 11:32 ` [-mm patch] arch/i386/Kconfig: SELECT_MEMORY_MODEL -> ARCH_SELECT_MEMORY_MODEL Adrian Bunk
2005-05-15 18:24   ` Dave Hansen

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=20050515012051.GJ9304@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@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