From: Johan Hedberg <johan.hedberg@gmail.com>
To: Vishal Agarwal <vishal.agarwal@stericsson.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Temporary keys should be retained during connection
Date: Thu, 5 Apr 2012 13:19:57 +0300 [thread overview]
Message-ID: <20120405101957.GB32212@x220> (raw)
In-Reply-To: <1333546839-28218-1-git-send-email-vishal.agarwal@stericsson.com>
Hi Vishal,
On Wed, Apr 04, 2012, Vishal Agarwal wrote:
> @@ -1330,10 +1330,10 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
>
> mgmt_new_link_key(hdev, key, persistent);
>
> - if (!persistent) {
> - list_del(&key->list);
> - kfree(key);
> - }
> + if (persistent)
> + conn->temp_link_key = false;
> + else
> + conn->temp_link_key = true;
The hci_add_link_key function can be called with conn == NULL so you
need to take this into account before dereferencing it.
Johan
next prev parent reply other threads:[~2012-04-05 10:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 13:40 [PATCH] Bluetooth: Temporary keys should be retained during connection Vishal Agarwal
2012-04-05 10:19 ` Johan Hedberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-04 11:45 Vishal Agarwal
2012-04-04 11:53 ` Johan Hedberg
2012-04-04 12:14 ` vishal agarwal
2012-04-04 12:22 ` Johan Hedberg
2012-04-04 12:32 ` vishal agarwal
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=20120405101957.GB32212@x220 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=vishal.agarwal@stericsson.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.