From: nick <xerofoify@gmail.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Network Development <netdev@vger.kernel.org>,
Kalle Valo <kvalo@qca.qualcomm.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
linux-kernel@vger.kernel.org,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath:Release resources for structure pointer, ar if error pointing device in the function, ath10k_core_register_work
Date: Tue, 03 Mar 2015 13:21:06 -0500 [thread overview]
Message-ID: <54F5FB92.6090702@gmail.com> (raw)
In-Reply-To: <CA+BoTQnNgNd4V9FN5SON387s7XuowFSDgrFUjZTn9Qm-sJ+NbQ@mail.gmail.com>
On 2015-03-03 01:40 AM, Michal Kazior wrote:
> On 3 March 2015 at 03:36, Nicholas Krause <xerofoify@gmail.com> wrote:
>> Releases resources and deregisters the stucture pointer ar passed by the caller to the function, ath10k_core_register_work
>> if unable to probe the structure pointer successfully with a call to ath10k_core_probe_fw. Further more if this happerns
>> we must first jump to the label err for the goto statement required to jump to handle this particular error in the function,
>> ath10k_core_register_work. After we are in the correct error section we must free the resources for the structure pointer,ar
>> with a call to the function, ath10k_core_unregister to free resources allocated for the structure pointer,ar.
>>
>> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
>> ---
>> drivers/net/wireless/ath/ath10k/core.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
>> index 310e12b..8b2ca25 100644
>> --- a/drivers/net/wireless/ath/ath10k/core.c
>> +++ b/drivers/net/wireless/ath/ath10k/core.c
>> @@ -1307,9 +1307,7 @@ err_unregister_mac:
>> err_release_fw:
>> ath10k_core_free_firmware_files(ar);
>> err:
>> - /* TODO: It's probably a good idea to release device from the driver
>> - * but calling device_release_driver() here will cause a deadlock.
>> - */
>> + ath10k_core_unregister(ar);
>> return;
>> }
>
> Did you test this? This will deadlock. ath10k_core_unregister() tries
> to cancel ar->register_work. This won't work if you call it from the
> worker itself. Moreover if I ignore the deadlock
> ath10k_core_unregister() would do nothing else in this context because
> ATH10K_FLAG_CORE_REGISTERED wouldn't be even set.
>
> If you're interested in dealing with this TODO I suggest you read
> through the original thread which led to the current state of affairs:
>
> http://www.spinics.net/lists/linux-wireless/msg124004.html
>
>
> Michał
>
Michal,
Thanks for the info and the thread related to this issue. After reading it I was wondering if we can test my
patch on actual hardware using this driver with my patch included in order to see what issues are still there.
I don't have the hardware lying around for this but if someone can test my patch out and see where there are
still deadlock issues or other bugs to my patch I am certain I will be able to figure this out.
Thanks,
Nick
P.S. I am a student so my budget for test hardware is a little thin. :(
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
prev parent reply other threads:[~2015-03-03 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 2:36 [PATCH] ath:Release resources for structure pointer, ar if error pointing device in the function, ath10k_core_register_work Nicholas Krause
2015-03-03 6:40 ` Michal Kazior
2015-03-03 18:21 ` nick [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F5FB92.6090702@gmail.com \
--to=xerofoify@gmail.com \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).