mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PATCH] driver core patches for 2.6.33-rc4
@ 2010-01-20 23:47 Greg KH
  2010-01-20 23:49 ` [PATCH 1/2] driver-core: fix devtmpfs crash on s390 Greg Kroah-Hartman
  2010-01-20 23:49 ` [PATCH 2/2] Revert "sysdev: fix prototype for memory_sysdev_class show/store functions" Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Greg KH @ 2010-01-20 23:47 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] driver-core: fix devtmpfs crash on s390
  2010-01-20 23:47 [GIT PATCH] driver core patches for 2.6.33-rc4 Greg KH
@ 2010-01-20 23:49 ` Greg Kroah-Hartman
  2010-01-20 23:49 ` [PATCH 2/2] Revert "sysdev: fix prototype for memory_sysdev_class show/store functions" Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2010-01-20 23:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Heiko Carstens, Greg Kroah-Hartman

From: Heiko Carstens <heiko.carstens@de.ibm.com>

On Mon, Jan 18, 2010 at 05:26:20PM +0530, Sachin Sant wrote:
> 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
>
> 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.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/devtmpfs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 090dd48..42ae452 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -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);
-- 
1.6.5.7


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Revert "sysdev: fix prototype for memory_sysdev_class show/store functions"
  2010-01-20 23:47 [GIT PATCH] driver core patches for 2.6.33-rc4 Greg KH
  2010-01-20 23:49 ` [PATCH 1/2] driver-core: fix devtmpfs crash on s390 Greg Kroah-Hartman
@ 2010-01-20 23:49 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2010-01-20 23:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Wu Fengguang, Andi Kleen, Zheng, Shaohui,
	Andrew Morton

This 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.

Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: "Zheng, Shaohui" <shaohui.zheng@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/memory.c |   32 ++++++++++++--------------------
 1 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index ae6b6c4..bd02505 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -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
-- 
1.6.5.7


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-20 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-20 23:47 [GIT PATCH] driver core patches for 2.6.33-rc4 Greg KH
2010-01-20 23:49 ` [PATCH 1/2] driver-core: fix devtmpfs crash on s390 Greg Kroah-Hartman
2010-01-20 23:49 ` [PATCH 2/2] Revert "sysdev: fix prototype for memory_sysdev_class show/store functions" Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome