Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
modules: do not try to add sysfs attributes if !CONFIG_SYSFS
POWERPC: fix typo in pseries/power.c
PM: Remove unbalanced mutex_unlock() from dpm_resume()
UIO: fix Greg's stupid changes
stable_kernel_rules: fix must already be in mainline
ide: mark "ide=reverse" option as obsolete
Driver core: Fix error handling in bus_add_driver().
driver-core: fix kernel-doc function parameters
cpufreq: fix kobject reference count handling
slabinfo: fall back from /sys/kernel/slab to /sys/slab
Fix broken utf-8 encodings in ja_JP translation of stable_kernel_rules.txt

+109 -93
+53 -53
Documentation/ja_JP/stable_kernel_rules.txt
··· 11 11 file at first. 12 12 13 13 ================================== 14 - これは、 14 + これは、 15 15 linux-2.6.24/Documentation/stable_kernel_rules.txt 16 - の和訳です。 16 + の和訳です。 17 17 18 - 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 19 - 翻訳日: 2007/12/30 20 - 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> 21 - 校正者: 武井伸光さん、<takei at webmasters dot gr dot jp> 22 - かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> 23 - 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> 24 - 野口さん (Kenji Noguchi) <tokyo246 at gmail dot com> 25 - 神宮信太郎さん <jin at libjingu dot jp> 18 + 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 19 + 翻訳日: 2007/12/30 20 + 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> 21 + 校正者: 武井伸光さん、<takei at webmasters dot gr dot jp> 22 + かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> 23 + 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> 24 + 野口さん (Kenji Noguchi) <tokyo246 at gmail dot com> 25 + 神宮信太郎さん <jin at libjingu dot jp> 26 26 ================================== 27 27 28 - ずっと知りたかった Linux 2.6 -stable リリースの全て 28 + ずっと知りたかった Linux 2.6 -stable リリースの全て 29 29 30 - "-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような 31 - ものが受け入れられないか、についての規則- 30 + "-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような 31 + ものが受け入れられないか、についての規則- 32 32 33 - - 明らかに正しく、テストされているものでなければならない。 34 - - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 35 - - ただ一個のことだけを修正しているべき。 36 - - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで 37 - あるかもしれないが..." のようなものではない) 38 - - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー 39 - タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という 40 - ようなものを修正しなければならない。短く言えば、重大な問題。 41 - - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 42 - "理論的には競合状態になる"ようなものは不可。 43 - - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー 44 - ンアップなど) 45 - - 対応するサブシステムメンテナが受け入れたものでなければならない。 46 - - Documentation/SubmittingPatches の規則に従ったものでなければならない。 33 + - 明らかに正しく、テストされているものでなければならない。 34 + - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 35 + - ただ一個のことだけを修正しているべき。 36 + - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで 37 + あるかもしれないが..." のようなものではない) 38 + - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー 39 + タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という 40 + ようなものを修正しなければならない。短く言えば、重大な問題。 41 + - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 42 + "理論的には競合状態になる"ようなものは不可。 43 + - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー 44 + ンアップなど) 45 + - 対応するサブシステムメンテナが受け入れたものでなければならない。 46 + - Documentation/SubmittingPatches の規則に従ったものでなければならない。 47 47 48 - -stable ツリーにパッチを送付する手続き- 48 + -stable ツリーにパッチを送付する手続き- 49 49 50 - - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ 51 - を送る。 52 - - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 53 - には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 54 - 日かかる場合がある。 55 - - もし受け取られたら、パッチは他の開発者たちのレビューのために 56 - -stable キューに追加される。 57 - - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ 58 - きではなく、代わりに security@kernel.org のアドレスに送られる。 50 + - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ 51 + を送る。 52 + - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 53 + には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 54 + 日かかる場合がある。 55 + - もし受け取られたら、パッチは他の開発者たちのレビューのために 56 + -stable キューに追加される。 57 + - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ 58 + きではなく、代わりに security@kernel.org のアドレスに送られる。 59 59 60 - レビューサイクル- 60 + レビューサイクル- 61 61 62 - - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 63 - 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 64 - い限り)に送られ、linux-kernel メーリングリストにCCされる。 65 - - レビュー委員会は 48時間の間に ACK か NAK を出す。 66 - - もしパッチが委員会のメンバから却下れるか、メンテナ達やメンバが気付 67 - かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え 68 - た場合には、パッチはキューから削除される。 69 - - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー 70 - スに追加され、その後に新しい -stable リリースが行われる。 71 - - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ 72 - カーネルチームから直接 -stable ツリーに受け付けられる。 73 - この手続きの詳細については kernel security チームに問い合わせること。 62 + - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 63 + 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 64 + い限り)に送られ、linux-kernel メーリングリストにCCされる。 65 + - レビュー委員会は 48時間の間に ACK か NAK を出す。 66 + - もしパッチが委員会のメンバから却下されるか、メンテナ達やメンバが気付 67 + かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え 68 + た場合には、パッチはキューから削除される。 69 + - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー 70 + スに追加され、その後に新しい -stable リリースが行われる。 71 + - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ 72 + カーネルチームから直接 -stable ツリーに受け付けられる。 73 + この手続きの詳細については kernel security チームに問い合わせること。 74 74 75 - レビュー委員会- 75 + レビュー委員会- 76 76 77 - - この委員会は、このタスクについて活動する多くのボランティアと、少数の 78 - 非ボランティアのカーネル開発者達で構成されている。 77 + - この委員会は、このタスクについて活動する多くのボランティアと、少数の 78 + 非ボランティアのカーネル開発者達で構成されている。 79 79
+5 -2
Documentation/stable_kernel_rules.txt
··· 16 16 race can be exploited is also provided. 17 17 - It cannot contain any "trivial" fixes in it (spelling changes, 18 18 whitespace cleanups, etc). 19 - - It must be accepted by the relevant subsystem maintainer. 20 19 - It must follow the Documentation/SubmittingPatches rules. 20 + - It or an equivalent fix must already exist in Linus' tree. Quote the 21 + respective commit ID in Linus' tree in your patch submission to -stable. 21 22 22 23 23 24 Procedure for submitting patches to the -stable tree: ··· 29 28 queue, or a NAK if the patch is rejected. This response might take a few 30 29 days, according to the developer's schedules. 31 30 - If accepted, the patch will be added to the -stable queue, for review by 32 - other developers. 31 + other developers and by the relevant subsystem maintainer. 32 + - If the stable@kernel.org address is added to a patch, when it goes into 33 + Linus's tree it will automatically be emailed to the stable team. 33 34 - Security patches should not be sent to this alias, but instead to the 34 35 documented security@kernel.org address. 35 36
+1 -1
Documentation/vm/slabinfo.c
··· 1123 1123 char *t; 1124 1124 int count; 1125 1125 1126 - if (chdir("/sys/kernel/slab")) 1126 + if (chdir("/sys/kernel/slab") && chdir("/sys/slab")) 1127 1127 fatal("SYSFS support for SLUB not active\n"); 1128 1128 1129 1129 dir = opendir(".");
+5 -4
drivers/base/bus.c
··· 658 658 pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); 659 659 660 660 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 661 - if (!priv) 662 - return -ENOMEM; 663 - 661 + if (!priv) { 662 + error = -ENOMEM; 663 + goto out_put_bus; 664 + } 664 665 klist_init(&priv->klist_devices, NULL, NULL); 665 666 priv->driver = drv; 666 667 drv->p = priv; ··· 669 668 error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, 670 669 "%s", drv->name); 671 670 if (error) 672 - goto out_put_bus; 671 + goto out_unregister; 673 672 674 673 if (drv->bus->p->drivers_autoprobe) { 675 674 error = driver_attach(drv);
+3
drivers/base/driver.c
··· 120 120 121 121 /** 122 122 * driver_add_kobj - add a kobject below the specified driver 123 + * @drv: requesting device driver 124 + * @kobj: kobject to add below this driver 125 + * @fmt: format string that names the kobject 123 126 * 124 127 * You really don't want to do this, this is only here due to one looney 125 128 * iseries driver, go poke those developers if you are annoyed about
+1 -1
drivers/base/power/main.c
··· 479 479 mutex_lock(&dpm_list_mtx); 480 480 if (list_empty(&dev->power.entry)) 481 481 list_add(&dev->power.entry, &dpm_locked); 482 - mutex_unlock(&dpm_list_mtx); 483 482 break; 484 483 } 485 484 mutex_lock(&dpm_list_mtx); ··· 522 523 523 524 /** 524 525 * device_suspend - Save state and stop all devices in system. 526 + * @state: new power management state 525 527 * 526 528 * Prevent new devices from being registered, then lock all devices 527 529 * and suspend them.
-8
drivers/cpufreq/cpufreq.c
··· 1006 1006 } 1007 1007 #endif 1008 1008 1009 - 1010 - if (!kobject_get(&data->kobj)) { 1011 - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); 1012 - cpufreq_debug_enable_ratelimit(); 1013 - unlock_policy_rwsem_write(cpu); 1014 - return -EFAULT; 1015 - } 1016 - 1017 1009 #ifdef CONFIG_SMP 1018 1010 1019 1011 #ifdef CONFIG_HOTPLUG_CPU
+1 -1
drivers/ide/ide.c
··· 1229 1229 if (!strcmp(s, "ide=reverse")) { 1230 1230 ide_scan_direction = 1; 1231 1231 printk(" : Enabled support for IDE inverse scan order.\n"); 1232 - return 1; 1232 + goto obsolete_option; 1233 1233 } 1234 1234 #endif 1235 1235
+38 -18
drivers/uio/uio.c
··· 57 57 }; 58 58 #define to_map(map) container_of(map, struct uio_map, kobj) 59 59 60 - 61 - static ssize_t map_attr_show(struct kobject *kobj, struct kobj_attribute *attr, 62 - char *buf) 60 + static ssize_t map_addr_show(struct uio_mem *mem, char *buf) 63 61 { 64 - struct uio_map *map = to_map(kobj); 65 - struct uio_mem *mem = map->mem; 66 - 67 - if (strncmp(attr->attr.name, "addr", 4) == 0) 68 - return sprintf(buf, "0x%lx\n", mem->addr); 69 - 70 - if (strncmp(attr->attr.name, "size", 4) == 0) 71 - return sprintf(buf, "0x%lx\n", mem->size); 72 - 73 - return -ENODEV; 62 + return sprintf(buf, "0x%lx\n", mem->addr); 74 63 } 75 64 76 - static struct kobj_attribute attr_attribute = 77 - __ATTR(addr, S_IRUGO, map_attr_show, NULL); 78 - static struct kobj_attribute size_attribute = 79 - __ATTR(size, S_IRUGO, map_attr_show, NULL); 65 + static ssize_t map_size_show(struct uio_mem *mem, char *buf) 66 + { 67 + return sprintf(buf, "0x%lx\n", mem->size); 68 + } 69 + 70 + struct uio_sysfs_entry { 71 + struct attribute attr; 72 + ssize_t (*show)(struct uio_mem *, char *); 73 + ssize_t (*store)(struct uio_mem *, const char *, size_t); 74 + }; 75 + 76 + static struct uio_sysfs_entry addr_attribute = 77 + __ATTR(addr, S_IRUGO, map_addr_show, NULL); 78 + static struct uio_sysfs_entry size_attribute = 79 + __ATTR(size, S_IRUGO, map_size_show, NULL); 80 80 81 81 static struct attribute *attrs[] = { 82 - &attr_attribute.attr, 82 + &addr_attribute.attr, 83 83 &size_attribute.attr, 84 84 NULL, /* need to NULL terminate the list of attributes */ 85 85 }; ··· 90 90 kfree(map); 91 91 } 92 92 93 + static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr, 94 + char *buf) 95 + { 96 + struct uio_map *map = to_map(kobj); 97 + struct uio_mem *mem = map->mem; 98 + struct uio_sysfs_entry *entry; 99 + 100 + entry = container_of(attr, struct uio_sysfs_entry, attr); 101 + 102 + if (!entry->show) 103 + return -EIO; 104 + 105 + return entry->show(mem, buf); 106 + } 107 + 108 + static struct sysfs_ops uio_sysfs_ops = { 109 + .show = map_type_show, 110 + }; 111 + 93 112 static struct kobj_type map_attr_type = { 94 113 .release = map_release, 114 + .sysfs_ops = &uio_sysfs_ops, 95 115 .default_attrs = attrs, 96 116 }; 97 117
+2 -5
kernel/module.c
··· 987 987 return ret; 988 988 } 989 989 990 - 991 990 /* 992 991 * /sys/module/foo/sections stuff 993 992 * J. Corbet <corbet@lwn.net> 994 993 */ 995 - #ifdef CONFIG_KALLSYMS 994 + #if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS) 996 995 static ssize_t module_sect_show(struct module_attribute *mattr, 997 996 struct module *mod, char *buf) 998 997 { ··· 1187 1188 static inline void remove_notes_attrs(struct module *mod) 1188 1189 { 1189 1190 } 1190 - #endif /* CONFIG_KALLSYMS */ 1191 + #endif 1191 1192 1192 1193 #ifdef CONFIG_SYSFS 1193 1194 int module_add_modinfo_attrs(struct module *mod) ··· 1230 1231 } 1231 1232 kfree(mod->modinfo_attrs); 1232 1233 } 1233 - #endif 1234 1234 1235 - #ifdef CONFIG_SYSFS 1236 1235 int mod_sysfs_init(struct module *mod) 1237 1236 { 1238 1237 int err;