Re: [PATCH v4 1/7] soc: qcom: pdr: protect locator_addr with the main mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/11/2024 8:34 AM, Dmitry Baryshkov wrote:
> @@ -133,11 +133,13 @@ static int pdr_register_listener(struct pdr_handle *pdr,
>  	req.enable = enable;
>  	strscpy(req.service_path, pds->service_path, sizeof(req.service_path));
>  
> +	mutex_lock(&pdr->lock);
>  	ret = qmi_send_request(&pdr->notifier_hdl, &pds->addr,
>  			       &txn, SERVREG_REGISTER_LISTENER_REQ,
>  			       SERVREG_REGISTER_LISTENER_REQ_LEN,
>  			       servreg_register_listener_req_ei,
>  			       &req);
> +	mutex_unlock(&pdr->lock);
>  	if (ret < 0) {
>  		qmi_txn_cancel(&txn);
>  		return ret;
> 

Hi Dmitry,

What is the reason for taking the pdr lock here? The addr struct passed
into qmi_send_request is from the pdr_service. I think this is different
from the pdr_handle we are protecting in the other parts of the patch.

Thanks,
Chris




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux