mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/boot/stage3.c: Fix [-Wnull-dereference] warning
Fix 'volatile' qualifier warning, indirection of non-volatile null pointer will be deleted, not trap. Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Richie Buturla <richie@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
8e315c4401
commit
bed1bc8676
@@ -525,8 +525,12 @@ void start(void)
|
||||
*(unsigned long long *)INITRD_START = _stage3_parms.initrd_addr;
|
||||
*(unsigned long long *)INITRD_SIZE = _stage3_parms.initrd_len;
|
||||
|
||||
/* store address of new kernel to 0 to be able to start it */
|
||||
*(unsigned long long *)0 = _stage3_parms.load_psw;
|
||||
/*
|
||||
* store address of new kernel to 0 to be able to start it.
|
||||
* -fno-delete-null-pointer-checks allows us to dereference 0 here,
|
||||
* which otherwise would be an UB.
|
||||
*/
|
||||
*(volatile unsigned long long *)0 = _stage3_parms.load_psw;
|
||||
|
||||
kdump_stage3();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user