Commit 96d185c7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] memory hotplug: only unassign assigned increments
  [S390] Change default action from reipl to stop for on_restart
  [S390] arch/s390/kernel/ipl.c: correct error detection check
  [S390] drivers/s390/block/dasd_ioctl.c: add missing kfree
  [S390] nss,initrd: kernel image and initrd must be in different segments
parents a94cc4e6 8adb4ca3
...@@ -396,17 +396,19 @@ static __init void detect_machine_facilities(void) ...@@ -396,17 +396,19 @@ static __init void detect_machine_facilities(void)
static __init void rescue_initrd(void) static __init void rescue_initrd(void)
{ {
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
unsigned long min_initrd_addr = (unsigned long) _end + (4UL << 20);
/* /*
* Move the initrd right behind the bss section in case it starts * Just like in case of IPL from VM reader we make sure there is a
* within the bss section. So we don't overwrite it when the bss * gap of 4MB between end of kernel and start of initrd.
* section gets cleared. * That way we can also be sure that saving an NSS will succeed,
* which however only requires different segments.
*/ */
if (!INITRD_START || !INITRD_SIZE) if (!INITRD_START || !INITRD_SIZE)
return; return;
if (INITRD_START >= (unsigned long) __bss_stop) if (INITRD_START >= min_initrd_addr)
return; return;
memmove(__bss_stop, (void *) INITRD_START, INITRD_SIZE); memmove((void *) min_initrd_addr, (void *) INITRD_START, INITRD_SIZE);
INITRD_START = (unsigned long) __bss_stop; INITRD_START = min_initrd_addr;
#endif #endif
} }
......
...@@ -1220,7 +1220,7 @@ static int __init reipl_fcp_init(void) ...@@ -1220,7 +1220,7 @@ static int __init reipl_fcp_init(void)
/* sysfs: create fcp kset for mixing attr group and bin attrs */ /* sysfs: create fcp kset for mixing attr group and bin attrs */
reipl_fcp_kset = kset_create_and_add(IPL_FCP_STR, NULL, reipl_fcp_kset = kset_create_and_add(IPL_FCP_STR, NULL,
&reipl_kset->kobj); &reipl_kset->kobj);
if (!reipl_kset) { if (!reipl_fcp_kset) {
free_page((unsigned long) reipl_block_fcp); free_page((unsigned long) reipl_block_fcp);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1618,7 +1618,8 @@ static struct shutdown_action vmcmd_action = {SHUTDOWN_ACTION_VMCMD_STR, ...@@ -1618,7 +1618,8 @@ static struct shutdown_action vmcmd_action = {SHUTDOWN_ACTION_VMCMD_STR,
static void stop_run(struct shutdown_trigger *trigger) static void stop_run(struct shutdown_trigger *trigger)
{ {
if (strcmp(trigger->name, ON_PANIC_STR) == 0) if (strcmp(trigger->name, ON_PANIC_STR) == 0 ||
strcmp(trigger->name, ON_RESTART_STR) == 0)
disabled_wait((unsigned long) __builtin_return_address(0)); disabled_wait((unsigned long) __builtin_return_address(0));
while (sigp(smp_processor_id(), sigp_stop) == sigp_busy) while (sigp(smp_processor_id(), sigp_stop) == sigp_busy)
cpu_relax(); cpu_relax();
...@@ -1717,7 +1718,7 @@ static void do_panic(void) ...@@ -1717,7 +1718,7 @@ static void do_panic(void)
/* on restart */ /* on restart */
static struct shutdown_trigger on_restart_trigger = {ON_RESTART_STR, static struct shutdown_trigger on_restart_trigger = {ON_RESTART_STR,
&reipl_action}; &stop_action};
static ssize_t on_restart_show(struct kobject *kobj, static ssize_t on_restart_show(struct kobject *kobj,
struct kobj_attribute *attr, char *page) struct kobj_attribute *attr, char *page)
......
...@@ -249,6 +249,7 @@ static int dasd_ioctl_reset_profile(struct dasd_block *block) ...@@ -249,6 +249,7 @@ static int dasd_ioctl_reset_profile(struct dasd_block *block)
static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp)
{ {
struct dasd_profile_info_t *data; struct dasd_profile_info_t *data;
int rc = 0;
data = kmalloc(sizeof(*data), GFP_KERNEL); data = kmalloc(sizeof(*data), GFP_KERNEL);
if (!data) if (!data)
...@@ -279,11 +280,14 @@ static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) ...@@ -279,11 +280,14 @@ static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp)
spin_unlock_bh(&block->profile.lock); spin_unlock_bh(&block->profile.lock);
} else { } else {
spin_unlock_bh(&block->profile.lock); spin_unlock_bh(&block->profile.lock);
return -EIO; rc = -EIO;
goto out;
} }
if (copy_to_user(argp, data, sizeof(*data))) if (copy_to_user(argp, data, sizeof(*data)))
return -EFAULT; rc = -EFAULT;
return 0; out:
kfree(data);
return rc;
} }
#else #else
static int dasd_ioctl_reset_profile(struct dasd_block *block) static int dasd_ioctl_reset_profile(struct dasd_block *block)
......
...@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id) ...@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id)
switch (sccb->header.response_code) { switch (sccb->header.response_code) {
case 0x0020: case 0x0020:
set_bit(id, sclp_storage_ids); set_bit(id, sclp_storage_ids);
for (i = 0; i < sccb->assigned; i++) for (i = 0; i < sccb->assigned; i++) {
sclp_unassign_storage(sccb->entries[i] >> 16); if (sccb->entries[i])
sclp_unassign_storage(sccb->entries[i] >> 16);
}
break; break;
default: default:
rc = -EIO; rc = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment