From: Loic Poulain <loic.poulain@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v5 2/2] Bluetooth: hci_intel: Add platform driver
Date: Wed, 26 Aug 2015 10:46:46 +0200 [thread overview]
Message-ID: <55DD7CF6.60004@intel.com> (raw)
In-Reply-To: <1F9EE4AD-6337-461E-9AA7-C809423D307F@holtmann.org>
Hi Marcel,
>>
>> @@ -100,6 +190,13 @@ static int intel_close(struct hci_uart *hu)
>>
>> BT_DBG("hu %p", hu);
>>
>> + intel_set_power(hu, false);
>> +
>> + spin_lock(&intel_device_list_lock);
>> + if (intel_device_exists(intel->idev))
>> + intel->idev->hu = NULL;
>
> Why are you checking here if it exists? Just set idev->hu = NULL unconditionally.
If I'm not wrong, idev could have been freed due to pdev removing.
So we don't want to deref idev unconditionally.
We always need to check intel->idev.
Regards,
Loic
--
Intel Open Source Technology Center
http://oss.intel.com/
next prev parent reply other threads:[~2015-08-26 8:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 10:21 [PATCH v5 1/2] Bluetooth: hci_intel: Add Intel baudrate configuration support Loic Poulain
2015-08-25 10:21 ` [PATCH v5 2/2] Bluetooth: hci_intel: Add platform driver Loic Poulain
2015-08-25 15:23 ` Marcel Holtmann
2015-08-26 8:46 ` Loic Poulain [this message]
2015-08-25 15:15 ` [PATCH v5 1/2] Bluetooth: hci_intel: Add Intel baudrate configuration support Marcel Holtmann
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=55DD7CF6.60004@intel.com \
--to=loic.poulain@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).