Commit c8b5d574 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik
Browse files

s390/diag: add missing virt_to_phys() translation to diag224()



Diagnose 224 expects a physical address, but all users pass a virtual
address. Translate the address to fix this.

Reported-by: default avatarMete Durlu <meted@linux.ibm.com>
Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent b20c8216
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ EXPORT_SYMBOL(diag8c);

int diag224(void *ptr)
{
	unsigned long addr = __pa(ptr);
	int rc = -EOPNOTSUPP;

	diag_stat_inc(DIAG_STAT_X224);
@@ -253,7 +254,7 @@ int diag224(void *ptr)
		"0:	lhi	%0,0x0\n"
		"1:\n"
		EX_TABLE(0b,1b)
		: "+d" (rc) :"d" (0), "d" (ptr) : "memory");
		: "+d" (rc) :"d" (0), "d" (addr) : "memory");
	return rc;
}
EXPORT_SYMBOL(diag224);