driver core patches for 2.6.33-rc4
Subsystems (2)
PATCH 1/1 driver core patches for 2.6.33-rc4
Here are two 2.6.33-rc4 patches for the driver core:
They fix:
- s390 boot oops with devtmpfs
- revert a patch that was sent by Andrew that should not have been merged into your tree yet as the api has not changed in your tree, it is coming in the .34 merge. This fixes a build error in your current tree.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git/
All of these patches have been in the linux-next and mm trees.
The patches will be sent as a follow-on to this message to lkml for people to see.
thanks,
greg k-h
------------
drivers/base/devtmpfs.c | 3 ++- drivers/base/memory.c | 32 ++++++++++++-------------------- 2 files changed, 14 insertions(+), 21 deletions(-)
---------------
Greg Kroah-Hartman (1):
Revert "sysdev: fix prototype for memory_sysdev_class show/store functions"
Heiko Carstens (1):
driver-core: fix devtmpfs crash on s390
PATCH 1/2 driver-core: fix devtmpfs crash on s390
From: Heiko Carstens <[email protected]>
Quoted 37 lines · Sachin Sant
Hello Heiko,
Today while trying to boot next-20100118 i came across the following Oops :
Brought up 4 CPUs
Unable to handle kernel pointer dereference at virtual kernel address 0000000000 543000 Oops: 0004 #1 SMP Modules linked in: CPU: 0 Not tainted 2.6.33-rc4-autotest-next-20100118-5-default #1 Process swapper (pid: 1, task: 00000000fd792038, ksp: 00000000fd797a30) Krnl PSW : 0704200180000000 00000000001eb0b8 (shmem_parse_options+0xc0/0x328) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3 Krnl GPRS: 000000000054388a 000000000000003d 0000000000543836 000000000000003d 0000000000000000 0000000000483f28 0000000000536112 00000000fd797d00 00000000fd4ba100 0000000000000100 0000000000483978 0000000000543832 0000000000000000 0000000000465958 00000000001eb0b0 00000000fd797c58 Krnl Code: 00000000001eb0aa: c0e5000994f1 brasl %r14,31da8c 00000000001eb0b0: b9020022 ltgr %r2,%r2 00000000001eb0b4: a784010b brc 8,1eb2ca >00000000001eb0b8: 92002000 mvi 0(%r2),0 00000000001eb0bc: a7080000 lhi %r0,0 00000000001eb0c0: 41902001 la %r9,1(%r2) 00000000001eb0c4: b9040016 lgr %r1,%r6 00000000001eb0c8: b904002b lgr %r2,%r11 Call Trace:(<
00000000fd797c50>0xfd797c50)
<00000000001eb5da>shmem_fill_super+0x13a/0x25c
<0000000000228cfa>get_sb_single+0xbe/0xdc
<000000000034ffc0>dev_get_sb+0x2c/0x38
<000000000066c602>devtmpfs_init+0x46/0xc0
<000000000066c53e>driver_init+0x22/0x60
<000000000064d40a>kernel_init+0x24e/0x3d0
<000000000010a7ea>kernel_thread_starter+0x6/0xc
<000000000010a7e4>kernel_thread_starter+0x0/0xc
Quoted 3 lines
I never tried to boot a kernel with DEVTMPFS enabled on a s390 box. So am wondering if this is supported or not ? If you think this is supported i will send a mail to community on this.
There is nothing arch specific to devtmpfs. This part crashes because the kernel tries to modify the data read-only section which is write protected on s390.
--- drivers/base/devtmpfs.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/base/devtmpfs.c +2 -1
@@ -354,6 +354,7 @@ int __init devtmpfs_init(void) {int err;struct vfsmount *mnt; +char options[] ="mode=0755" ; err =register_filesystem (&dev_fs_type);if (err) {
@@ -362,7 +363,7 @@ int __init devtmpfs_init(void)return err; } - mnt =kern_mount_data (&dev_fs_type,"mode=0755" ); + mnt =kern_mount_data (&dev_fs_type, options);if (IS_ERR (mnt)) { err =PTR_ERR (mnt);printk (KERN_ERR "devtmpfs: unable to create devtmpfs %i\n" , err);
Signature · 1 line
1.6.5.7
PATCH 2/2 Revert "sysdev: fix prototype for memory_sysdev_class show/store functions"
In reply to Greg KHThis reverts commit 8ff410daa009c4b44be445ded5b0cec00abc0426
It should not have been sent to Linus's tree yet, as it depends on changes that are queued up in my driver-core for the .34 kernel merge.
--- drivers/base/memory.c | 32 ++++++++++++-------------------- 1 files changed, 12 insertions(+), 20 deletions(-)
drivers/base/memory.c +12 -20
@@ -309,19 +309,17 @@ static SYSDEV_ATTR(removable, 0444, show_mem_removable, NULL);* Block size attribute stuff */ static ssize_t -print_block_size (struct sysdev_class *class, -struct sysdev_class_attribute *class_attr, -char *buf) +print_block_size (struct class *class,char *buf) {return sprintf (buf,"%#lx\n" , (unsigned long )PAGES_PER_SECTION *PAGE_SIZE ); } -static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); +static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL);static int block_size_init (void ) {return sysfs_create_file (&memory_sysdev_class.kset.kobj, - &attr_block_size_bytes.attr); + &class_attr_block_size_bytes.attr); }/*
@@ -332,9 +330,7 @@ static int block_size_init(void)*/ #ifdef CONFIG_ARCH_MEMORY_PROBE static ssize_t -memory_probe_store (struct sysdev_class *class, -struct sysdev_class_attribute *class_attr, -const char *buf,size_t count) +memory_probe_store (struct class *class,const char *buf,size_t count) {u64 phys_addr;int nid;
@@ -350,12 +346,12 @@ memory_probe_store(struct sysdev_class *class,return count; } -static SYSDEV_CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); +static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);static int memory_probe_init (void ) {return sysfs_create_file (&memory_sysdev_class.kset.kobj, - &attr_probe.attr); + &class_attr_probe.attr); }#else static inline int memory_probe_init (void )
@@ -371,9 +367,7 @@ static inline int memory_probe_init(void)/* Soft offline a page */ static ssize_t -store_soft_offline_page (struct sysdev_class *class, -struct sysdev_class_attribute *class_attr, -const char *buf,size_t count) +store_soft_offline_page (struct class *class,const char *buf,size_t count) {int ret;u64 pfn;
@@ -390,9 +384,7 @@ store_soft_offline_page(struct sysdev_class *class,/* Forcibly offline a page, including killing processes. */ static ssize_t -store_hard_offline_page (struct sysdev_class *class, -struct sysdev_class_attribute *class_attr, -const char *buf,size_t count) +store_hard_offline_page (struct class *class,const char *buf,size_t count) {int ret;u64 pfn;
@@ -405,18 +397,18 @@ store_hard_offline_page(struct sysdev_class *class,return ret ? ret : count; } -static SYSDEV_CLASS_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page); -static SYSDEV_CLASS_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page); +static CLASS_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page); +static CLASS_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page);static __init int memory_fail_init (void ) {int err; err =sysfs_create_file (&memory_sysdev_class.kset.kobj, - &attr_soft_offline_page.attr); + &class_attr_soft_offline_page.attr);if (!err) err =sysfs_create_file (&memory_sysdev_class.kset.kobj, - &attr_hard_offline_page.attr); + &class_attr_hard_offline_page.attr);return err; }#else
Signature · 1 line
1.6.5.7