Skip to content
  • Helge Deller's avatar
    parisc: Fix crash when calling PDC_PAT_MEM PDT firmware function · f520e552
    Helge Deller authored
    Commit c9c2877d ("parisc: Add Page Deallocation Table (PDT) support")
    introduced the pdc_pat_mem_read_pd_pdt() firmware helper function, which
    crashed the system because it trashed the stack if the
    pdc_pat_mem_read_pd_retinfo struct was located on the stack (and which is
    in size less than the required 32 64-bit values).
    
    Fix it by using the pdc_result struct instead when calling firmware and copy
    the return values back into the result struct when finished sucessfully.
    
    While debugging this code I noticed that the pdc_type wasn't set correctly
    either, so let's fix that too.
    
    Fixes: c9c2877d
    
     ("parisc: Add Page Deallocation Table (PDT) support")
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    f520e552