mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
- Fix error logging and check user-supplied data when injecting an error
in the versal EDAC driver -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmY3V54ACgkQEsHwGGHe VUqghQ/+I0Bw6vyu5IaEMWtDp6nzJsSHjh+O7oVxaaJxeu/MN/3CzT3Uzoej3nvn ot47enUIGKBvBKZ7JqiM44oDEHFNPLiDbXAiuhRUJM6YQCp+LrSn9TK7dQyXVGeU fp9iGrsurhuBUHyTckhm2OW7EYeXOCsW+7/ufYRJbwEeWtQ1KQD9BW3Zv/oaLFi5 reKPQNLO8Y1C4INWO115CqdgczAGvW3rACSHkEIUsU0OAkc7602flSZrlpBYHL5J 7mJbeElcTM29A81hnhO/8k/pYtkdR4hnIinjonOQeJJGbmxFVRD2s0PybUEazclO 2pubUcX0j7jiHo6l4IiNnYT1UVMdj4RoFEBpHCJ4LP6gZ/Nh9FZmaLgeJBW1v47K 0kA5MU9A61Ei3BvG6kBh/dajNx9LMpshEWAIVdZpk9WxDZmVq6Ubi5uD/FtAXgWp 7R/1QPtUMf0K2zO568J2isGj9FZJCluGcQjlFAlG7dob2BHSiVNZOxAMKAgJqLNJ ADxLtQEXu/+vVPvUgaKPj4PxWVj5t0hMFFRl7HrlAfygtFEVZpT0YlmtHLzuc2dw ONKw/sQVuuYER05sOJS5FcT5g/PN5M6dp99hByMmzdzdU/3EAArGpT73xGc/9UOk zxuo/bb9Rz1WfOKNR1w4Yem+GXejewzgk2wARvMqFz/N/uHS6Jo= =0/mm -----END PGP SIGNATURE----- Merge tag 'edac_urgent_for_v6.9_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fixes from Borislav Petkov: - Fix error logging and check user-supplied data when injecting an error in the versal EDAC driver * tag 'edac_urgent_for_v6.9_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/versal: Do not log total error counts EDAC/versal: Check user-supplied data before injecting an error EDAC/versal: Do not register for NOC errors
This commit is contained in:
commit
f462ae0edd
@ -425,7 +425,7 @@ static void handle_error(struct mem_ctl_info *mci, struct ecc_status *stat)
|
||||
convert_to_physical(priv, pinf), pinf.burstpos);
|
||||
|
||||
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
|
||||
priv->ce_cnt, 0, 0, 0, 0, 0, -1,
|
||||
1, 0, 0, 0, 0, 0, -1,
|
||||
priv->message, "");
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ static void handle_error(struct mem_ctl_info *mci, struct ecc_status *stat)
|
||||
convert_to_physical(priv, pinf), pinf.burstpos);
|
||||
|
||||
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
|
||||
priv->ue_cnt, 0, 0, 0, 0, 0, -1,
|
||||
1, 0, 0, 0, 0, 0, -1,
|
||||
priv->message, "");
|
||||
}
|
||||
|
||||
@ -865,6 +865,9 @@ static ssize_t inject_data_ue_store(struct file *file, const char __user *data,
|
||||
for (i = 0; i < NUM_UE_BITPOS; i++)
|
||||
token[i] = strsep(&pbuf, ",");
|
||||
|
||||
if (!token[0] || !token[1])
|
||||
return -EFAULT;
|
||||
|
||||
ret = kstrtou8(token[0], 0, &ue0);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -1135,8 +1138,7 @@ static int mc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
rc = xlnx_register_event(PM_NOTIFY_CB, VERSAL_EVENT_ERROR_PMC_ERR1,
|
||||
XPM_EVENT_ERROR_MASK_DDRMC_CR | XPM_EVENT_ERROR_MASK_DDRMC_NCR |
|
||||
XPM_EVENT_ERROR_MASK_NOC_CR | XPM_EVENT_ERROR_MASK_NOC_NCR,
|
||||
XPM_EVENT_ERROR_MASK_DDRMC_CR | XPM_EVENT_ERROR_MASK_DDRMC_NCR,
|
||||
false, err_callback, mci);
|
||||
if (rc) {
|
||||
if (rc == -EACCES)
|
||||
@ -1173,8 +1175,6 @@ static void mc_remove(struct platform_device *pdev)
|
||||
|
||||
xlnx_unregister_event(PM_NOTIFY_CB, VERSAL_EVENT_ERROR_PMC_ERR1,
|
||||
XPM_EVENT_ERROR_MASK_DDRMC_CR |
|
||||
XPM_EVENT_ERROR_MASK_NOC_CR |
|
||||
XPM_EVENT_ERROR_MASK_NOC_NCR |
|
||||
XPM_EVENT_ERROR_MASK_DDRMC_NCR, err_callback, mci);
|
||||
edac_mc_del_mc(&pdev->dev);
|
||||
edac_mc_free(mci);
|
||||
|
Loading…
x
Reference in New Issue
Block a user