Re: [PATCH] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-26 Thread Vaibhav Jain
Thanks for reviewing this patch Fred, Frederic Barrat writes: >> >> afu_result = cxl_vphb_error_detected(afu, state); >> >> -cxl_context_detach_all(afu); >> -cxl_ops->afu_deactivate_mode(afu, afu->current_mode); >> -

Re: [PATCH] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-25 Thread Frederic Barrat
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index c79ba1c699ad..28c28bceb063 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1932,14 +1935,20 @@ static pci_ers_result_t cxl_pci_error_detected(struct pci_dev *pdev, * * In slot_reset, free

[PATCH] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-24 Thread Vaibhav Jain
Within cxl module, iteration over array 'adapter->slices' may be racy at few points as it might be simultaneously read during an EEH and its contents being set to NULL while driver is being unloaded or unbound from the adapter. This might result in a NULL pointer to 'struct afu' being