Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Browse files Browse the repository at this point in the history
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] KVM: Read buffer overflow
  [S390] kernel: Storing machine flags early in lowcore
  • Loading branch information
Linus Torvalds committed Aug 7, 2009
2 parents ff1649f + 53cb780 commit 9cf9d28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions arch/s390/kernel/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ static noinline __init void detect_machine_type(void)
machine_flags |= MACHINE_FLAG_KVM;
else
machine_flags |= MACHINE_FLAG_VM;

/* Store machine flags for setting up lowcore early */
S390_lowcore.machine_flags = machine_flags;
}

static __init void early_pgm_check_handler(void)
Expand Down
7 changes: 4 additions & 3 deletions arch/s390/kvm/sigp.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
unsigned long *reg)
{
struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
struct kvm_s390_local_interrupt *li;
struct kvm_s390_local_interrupt *li = NULL;
struct kvm_s390_interrupt_info *inti;
int rc;
u8 tmp;
Expand All @@ -189,9 +189,10 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
return 2; /* busy */

spin_lock(&fi->lock);
li = fi->local_int[cpu_addr];
if (cpu_addr < KVM_MAX_VCPUS)
li = fi->local_int[cpu_addr];

if ((cpu_addr >= KVM_MAX_VCPUS) || (li == NULL)) {
if (li == NULL) {
rc = 1; /* incorrect state */
*reg &= SIGP_STAT_INCORRECT_STATE;
kfree(inti);
Expand Down

0 comments on commit 9cf9d28

Please sign in to comment.