Skip to content

Commit c8b5d57

Browse files
hcahcaVasily Gorbik
authored andcommitted
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: Mete Durlu <meted@linux.ibm.com> Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent b20c821 commit c8b5d57

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/s390/kernel/diag.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ EXPORT_SYMBOL(diag8c);
245245

246246
int diag224(void *ptr)
247247
{
248+
unsigned long addr = __pa(ptr);
248249
int rc = -EOPNOTSUPP;
249250

250251
diag_stat_inc(DIAG_STAT_X224);
@@ -253,7 +254,7 @@ int diag224(void *ptr)
253254
"0: lhi %0,0x0\n"
254255
"1:\n"
255256
EX_TABLE(0b,1b)
256-
: "+d" (rc) :"d" (0), "d" (ptr) : "memory");
257+
: "+d" (rc) :"d" (0), "d" (addr) : "memory");
257258
return rc;
258259
}
259260
EXPORT_SYMBOL(diag224);

0 commit comments

Comments
 (0)