Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b4a8a78 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds
Browse files

[PATCH] kexec warning fix



This fixes a couple of compiler warnings, and adds paranoia checks as well.

Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3171a030
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -995,7 +995,8 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
	image = xchg(dest_image, image);

out:
	xchg(&kexec_lock, 0); /* Release the mutex */
	locked = xchg(&kexec_lock, 0); /* Release the mutex */
	BUG_ON(!locked);
	kimage_free(image);

	return result;
@@ -1061,7 +1062,8 @@ void crash_kexec(struct pt_regs *regs)
			machine_crash_shutdown(&fixed_regs);
			machine_kexec(kexec_crash_image);
		}
		xchg(&kexec_lock, 0);
		locked = xchg(&kexec_lock, 0);
		BUG_ON(!locked);
	}
}