From 82bd3f17f4600fd374524c015826c175819f15ea Mon Sep 17 00:00:00 2001 From: Tsugikazu Shibata Date: Thu, 14 Feb 2008 14:21:34 +0900 Subject: [PATCH 01/11] Fix broken utf-8 encodings in ja_JP translation of stable_kernel_rules.txt Fix the UTF-8 broken encodings in the ja_JP version of stable_kernel_rules.txt From: Tsugikazu Shibata Signed-off-by: Greg Kroah-Hartman --- Documentation/ja_JP/stable_kernel_rules.txt | 106 ++++++++++---------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/Documentation/ja_JP/stable_kernel_rules.txt b/Documentation/ja_JP/stable_kernel_rules.txt index 17d87519e468..b3ffe870de33 100644 --- a/Documentation/ja_JP/stable_kernel_rules.txt +++ b/Documentation/ja_JP/stable_kernel_rules.txt @@ -11,69 +11,69 @@ comment or update of this file, please try to update Original(English) file at first. ================================== -これは、 +これは、 linux-2.6.24/Documentation/stable_kernel_rules.txt -の和訳です。 +の和訳です。 -翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > -翻訳日: 2007/12/30 -翻訳者: Tsugikazu Shibata -校正者: 武井伸光さん、 - かねこさん (Seiji Kaneko) - 小林 雅典さん (Masanori Kobayasi) - 野口さん (Kenji Noguchi) - 神宮信太郎さん +翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > +翻訳日: 2007/12/30 +翻訳者: Tsugikazu Shibata +校正者: 武井伸光さん、 + かねこさん (Seiji Kaneko) + 小林 雅典さん (Masanori Kobayasi) + 野口さん (Kenji Noguchi) + 神宮信太郎さん ================================== -ずっと知りたかった Linux 2.6 -stable リリースの全て +ずっと知りたかった Linux 2.6 -stable リリースの全て -"-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような -ものが受け入れられないか、についての規則- +"-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような +ものが受け入れられないか、についての規則- - - 明らかに正しく、テストされているものでなければならない。 - - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 - - ただ一個のことだけを修正しているべき。 - - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで - あるかもしれないが..." のようなものではない) - - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー - タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という - ようなものを修正しなければならない。短く言えば、重大な問題。 - - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 - "理論的には競合状態になる"ようなものは不可。 - - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー - ンアップなど) - - 対応するサブシステムメンテナが受け入れたものでなければならない。 - - Documentation/SubmittingPatches の規則に従ったものでなければならない。 + - 明らかに正しく、テストされているものでなければならない。 + - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 + - ただ一個のことだけを修正しているべき。 + - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで + あるかもしれないが..." のようなものではない) + - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー + タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という + ようなものを修正しなければならない。短く言えば、重大な問題。 + - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 + "理論的には競合状態になる"ようなものは不可。 + - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー + ンアップなど) + - 対応するサブシステムメンテナが受け入れたものでなければならない。 + - Documentation/SubmittingPatches の規則に従ったものでなければならない。 --stable ツリーにパッチを送付する手続き- +-stable ツリーにパッチを送付する手続き- - - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ - を送る。 - - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 - には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 - 日かかる場合がある。 - - もし受け取られたら、パッチは他の開発者たちのレビューのために - -stable キューに追加される。 - - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ - きではなく、代わりに security@kernel.org のアドレスに送られる。 + - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ + を送る。 + - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 + には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 + 日かかる場合がある。 + - もし受け取られたら、パッチは他の開発者たちのレビューのために + -stable キューに追加される。 + - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ + きではなく、代わりに security@kernel.org のアドレスに送られる。 -レビューサイクル- +レビューサイクル- - - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 - 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 - い限り)に送られ、linux-kernel メーリングリストにCCされる。 - - レビュー委員会は 48時間の間に ACK か NAK を出す。 - - もしパッチが委員会のメンバから却下れるか、メンテナ達やメンバが気付 - かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え - た場合には、パッチはキューから削除される。 - - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー - スに追加され、その後に新しい -stable リリースが行われる。 - - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ - カーネルチームから直接 -stable ツリーに受け付けられる。 - この手続きの詳細については kernel security チームに問い合わせること。 + - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 + 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 + い限り)に送られ、linux-kernel メーリングリストにCCされる。 + - レビュー委員会は 48時間の間に ACK か NAK を出す。 + - もしパッチが委員会のメンバから却下されるか、メンテナ達やメンバが気付 + かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え + た場合には、パッチはキューから削除される。 + - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー + スに追加され、その後に新しい -stable リリースが行われる。 + - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ + カーネルチームから直接 -stable ツリーに受け付けられる。 + この手続きの詳細については kernel security チームに問い合わせること。 -レビュー委員会- +レビュー委員会- - - この委員会は、このタスクについて活動する多くのボランティアと、少数の - 非ボランティアのカーネル開発者達で構成されている。 + - この委員会は、このタスクについて活動する多くのボランティアと、少数の + 非ボランティアのカーネル開発者達で構成されている。 From b6c24de77cbe9afe4962f0738e6444e709e83c81 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 4 Feb 2008 23:35:48 -0800 Subject: [PATCH 02/11] slabinfo: fall back from /sys/kernel/slab to /sys/slab I keep running upstream and mm kernels and the location of the slab directory is different since upstream still uses /sys/slab. This patch makes slabinfo check /sys/slab if /sys/kernel/slab is not there. Makes slabinfo work on any kernel. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Documentation/vm/slabinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 7123fee708ca..22d7e3e4d60c 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c @@ -1123,7 +1123,7 @@ void read_slab_dir(void) char *t; int count; - if (chdir("/sys/kernel/slab")) + if (chdir("/sys/kernel/slab") && chdir("/sys/slab")) fatal("SYSFS support for SLUB not active\n"); dir = opendir("."); From 7ab47050453c10da13940114dea9c7f1c6ad323f Mon Sep 17 00:00:00 2001 From: Balaji Rao Date: Sat, 9 Feb 2008 00:52:40 +0530 Subject: [PATCH 03/11] cpufreq: fix kobject reference count handling The cpufreq core should not take an extra kobject reference count for no reason, and then refuse to release it. This has been reported as keeping machines from properly powering down all the way. Signed-off-by: Balaji Rao Cc: Dave Jones Cc: Yi Yang Cc: Alan Stern Cc: Frans Pop Cc: Yinghai Lu Cc: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/cpufreq.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 64926aa990db..89a29cd93783 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1006,14 +1006,6 @@ static int __cpufreq_remove_dev (struct sys_device * sys_dev) } #endif - - if (!kobject_get(&data->kobj)) { - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); - cpufreq_debug_enable_ratelimit(); - unlock_policy_rwsem_write(cpu); - return -EFAULT; - } - #ifdef CONFIG_SMP #ifdef CONFIG_HOTPLUG_CPU From 7199677d2e919edc75d1fb8856c98cd0c1bbcfc5 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 18 Feb 2008 13:09:03 -0800 Subject: [PATCH 04/11] driver-core: fix kernel-doc function parameters Fix drivers/base/ missing kernel-doc parameters: Warning(linux-2.6.24-git12//drivers/base/driver.c:133): No description found for parameter 'drv' Warning(linux-2.6.24-git12//drivers/base/driver.c:133): No description found for parameter 'kobj' Warning(linux-2.6.24-git12//drivers/base/driver.c:133): No description found for parameter 'fmt' Warning(linux-2.6.24-git12//drivers/base/power/main.c:530): No description found for parameter 'state' Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/base/driver.c | 3 +++ drivers/base/power/main.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/base/driver.c b/drivers/base/driver.c index ba75184c653c..bf31a0170a48 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -120,6 +120,9 @@ EXPORT_SYMBOL_GPL(driver_remove_file); /** * driver_add_kobj - add a kobject below the specified driver + * @drv: requesting device driver + * @kobj: kobject to add below this driver + * @fmt: format string that names the kobject * * You really don't want to do this, this is only here due to one looney * iseries driver, go poke those developers if you are annoyed about diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index bdc03f7e8424..d6095608465a 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -523,6 +523,7 @@ static void lock_all_devices(void) /** * device_suspend - Save state and stop all devices in system. + * @state: new power management state * * Prevent new devices from being registered, then lock all devices * and suspend them. From 0763446429e46fd973f507f79900b95eb8aae2e4 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Mon, 18 Feb 2008 17:04:25 +0100 Subject: [PATCH 05/11] Driver core: Fix error handling in bus_add_driver(). - If the allocation of ->priv fails, the reference on the bus must be dropped. - If adding the kobject fails, kobject_put must be called to clean things up. Signed-off-by: Cornelia Huck Signed-off-by: Greg Kroah-Hartman --- drivers/base/bus.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 055989e94799..2d207ad30336 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -658,9 +658,10 @@ int bus_add_driver(struct device_driver *drv) pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; - + if (!priv) { + error = -ENOMEM; + goto out_put_bus; + } klist_init(&priv->klist_devices, NULL, NULL); priv->driver = drv; drv->p = priv; @@ -668,7 +669,7 @@ int bus_add_driver(struct device_driver *drv) error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, "%s", drv->name); if (error) - goto out_put_bus; + goto out_unregister; if (drv->bus->p->drivers_autoprobe) { error = driver_attach(drv); From 2952755ce364b81f904b49397f6b0004dead2c9f Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 13 Feb 2008 23:20:36 +0100 Subject: [PATCH 06/11] ide: mark "ide=reverse" option as obsolete - it is valid only if "Probe IDE PCI devices in the PCI bus order (DEPRECATED)" config option is used - Greg needs to remove pci_get_device_reverse() for PCI core changes Cc: Alan Cox Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/ide/ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 4a8952a6c3da..477833f0daf5 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1229,7 +1229,7 @@ static int __init ide_setup(char *s) if (!strcmp(s, "ide=reverse")) { ide_scan_direction = 1; printk(" : Enabled support for IDE inverse scan order.\n"); - return 1; + goto obsolete_option; } #endif From 46cdf871d9970b9252469531f9efd4a17243bb0b Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Fri, 8 Feb 2008 23:26:02 +0100 Subject: [PATCH 07/11] stable_kernel_rules: fix must already be in mainline stable_kernel_rules: fix must already be in mainline Signed-off-by: Stefan Richter Signed-off-by: Greg Kroah-Hartman --- Documentation/stable_kernel_rules.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index c815c5206e84..4cfc78835bc1 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt @@ -16,8 +16,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the race can be exploited is also provided. - It cannot contain any "trivial" fixes in it (spelling changes, whitespace cleanups, etc). - - It must be accepted by the relevant subsystem maintainer. - It must follow the Documentation/SubmittingPatches rules. + - It or an equivalent fix must already exist in Linus' tree. Quote the + respective commit ID in Linus' tree in your patch submission to -stable. Procedure for submitting patches to the -stable tree: @@ -28,7 +29,9 @@ Procedure for submitting patches to the -stable tree: queue, or a NAK if the patch is rejected. This response might take a few days, according to the developer's schedules. - If accepted, the patch will be added to the -stable queue, for review by - other developers. + other developers and by the relevant subsystem maintainer. + - If the stable@kernel.org address is added to a patch, when it goes into + Linus's tree it will automatically be emailed to the stable team. - Security patches should not be sent to this alias, but instead to the documented security@kernel.org address. From 4f808bcdf8dcf1f1ecd028f6d5c5347db4cddc54 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Tue, 19 Feb 2008 01:55:05 -0800 Subject: [PATCH 08/11] UIO: fix Greg's stupid changes This fixes two bugs with UIO that cropped up recently in -rc1 1) WARNING: at fs/sysfs/file.c:334 sysfs_open_file when trying to open a map addr/size file - complaining about missing sysfs_ops for ktype 2) Permission denied when reading uio/uio0/maps/map0/{addr,size} when files are mode S_IRUGO Also fix a typo: attr_attribute -> addr_attribute Signed-off-by: Brandon Philips Signed-off-by: Hans J. Koch Signed-off-by: Greg Kroah-Hartman --- drivers/uio/uio.c | 56 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 2a77e9d42c68..e8a01f264540 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -57,29 +57,29 @@ struct uio_map { }; #define to_map(map) container_of(map, struct uio_map, kobj) - -static ssize_t map_attr_show(struct kobject *kobj, struct kobj_attribute *attr, - char *buf) +static ssize_t map_addr_show(struct uio_mem *mem, char *buf) { - struct uio_map *map = to_map(kobj); - struct uio_mem *mem = map->mem; - - if (strncmp(attr->attr.name, "addr", 4) == 0) - return sprintf(buf, "0x%lx\n", mem->addr); - - if (strncmp(attr->attr.name, "size", 4) == 0) - return sprintf(buf, "0x%lx\n", mem->size); - - return -ENODEV; + return sprintf(buf, "0x%lx\n", mem->addr); } -static struct kobj_attribute attr_attribute = - __ATTR(addr, S_IRUGO, map_attr_show, NULL); -static struct kobj_attribute size_attribute = - __ATTR(size, S_IRUGO, map_attr_show, NULL); +static ssize_t map_size_show(struct uio_mem *mem, char *buf) +{ + return sprintf(buf, "0x%lx\n", mem->size); +} + +struct uio_sysfs_entry { + struct attribute attr; + ssize_t (*show)(struct uio_mem *, char *); + ssize_t (*store)(struct uio_mem *, const char *, size_t); +}; + +static struct uio_sysfs_entry addr_attribute = + __ATTR(addr, S_IRUGO, map_addr_show, NULL); +static struct uio_sysfs_entry size_attribute = + __ATTR(size, S_IRUGO, map_size_show, NULL); static struct attribute *attrs[] = { - &attr_attribute.attr, + &addr_attribute.attr, &size_attribute.attr, NULL, /* need to NULL terminate the list of attributes */ }; @@ -90,8 +90,28 @@ static void map_release(struct kobject *kobj) kfree(map); } +static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr, + char *buf) +{ + struct uio_map *map = to_map(kobj); + struct uio_mem *mem = map->mem; + struct uio_sysfs_entry *entry; + + entry = container_of(attr, struct uio_sysfs_entry, attr); + + if (!entry->show) + return -EIO; + + return entry->show(mem, buf); +} + +static struct sysfs_ops uio_sysfs_ops = { + .show = map_type_show, +}; + static struct kobj_type map_attr_type = { .release = map_release, + .sysfs_ops = &uio_sysfs_ops, .default_attrs = attrs, }; From ec5a42465abc585a7f8117be5eecc361490e48ce Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Wed, 20 Feb 2008 02:01:41 +0100 Subject: [PATCH 09/11] PM: Remove unbalanced mutex_unlock() from dpm_resume() Remove an unnecessary unlocking of dpm_list_mtx in the error path in drivers/base/power/main.c:dpm_suspend() . Signed-off-by: Rafael J. Wysocki Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/base/power/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index d6095608465a..cea5ed3919cd 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -479,7 +479,6 @@ static int dpm_suspend(pm_message_t state) mutex_lock(&dpm_list_mtx); if (list_empty(&dev->power.entry)) list_add(&dev->power.entry, &dpm_locked); - mutex_unlock(&dpm_list_mtx); break; } mutex_lock(&dpm_list_mtx); From 58dc3232ff77158460f79e3c1932b81e8a2a0194 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 20 Feb 2008 11:27:04 +1100 Subject: [PATCH 10/11] POWERPC: fix typo in pseries/power.c Introduced by commit 79393fc46ede43451a500a132e5de9856f5a4c83 ("kobject: convert pseries/power.c to kobj_attr interface"). sys_create_file takes a "struct attrbute *" not a "struct kobj_addribute *". arch/powerpc/platforms/pseries/power.c: In function 'apo_pm_init': arch/powerpc/platforms/pseries/power.c:78: warning: passing argument 2 of 'sysfs_create_file' from incompatible pointer type Signed-off-by: Stephen Rothwell Cc: Paul Mackerras Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/pseries/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c index e95fc1594c84..6d6266236446 100644 --- a/arch/powerpc/platforms/pseries/power.c +++ b/arch/powerpc/platforms/pseries/power.c @@ -75,7 +75,7 @@ core_initcall(pm_init); #else static int __init apo_pm_init(void) { - return (sysfs_create_file(power_kobj, &auto_poweron_attr)); + return (sysfs_create_file(power_kobj, &auto_poweron_attr.attr)); } __initcall(apo_pm_init); #endif From 120fc3d77acfd91f3521737a440d42839c475982 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 21 Feb 2008 00:33:20 +0100 Subject: [PATCH 11/11] modules: do not try to add sysfs attributes if !CONFIG_SYSFS Thanks to Alexey for the testing and the fix of the fix. Cc: Alexey Dobriyan Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- kernel/module.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 92595bad3812..901cd6ac2f11 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -987,12 +987,11 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, return ret; } - /* * /sys/module/foo/sections stuff * J. Corbet */ -#ifdef CONFIG_KALLSYMS +#if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS) static ssize_t module_sect_show(struct module_attribute *mattr, struct module *mod, char *buf) { @@ -1188,7 +1187,7 @@ static inline void add_notes_attrs(struct module *mod, unsigned int nsect, static inline void remove_notes_attrs(struct module *mod) { } -#endif /* CONFIG_KALLSYMS */ +#endif #ifdef CONFIG_SYSFS int module_add_modinfo_attrs(struct module *mod) @@ -1231,9 +1230,7 @@ void module_remove_modinfo_attrs(struct module *mod) } kfree(mod->modinfo_attrs); } -#endif -#ifdef CONFIG_SYSFS int mod_sysfs_init(struct module *mod) { int err;