linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez PATCH v1] bluetooth: fix passkey uninitialized when used
@ 2020-02-18 11:05 Howard Chung
  2020-02-18 17:48 ` Nick Desaulniers
  2020-02-18 21:20 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Howard Chung @ 2020-02-18 11:05 UTC (permalink / raw)
  To: linux-bluetooth, marcel
  Cc: chromeos-bluetooth-upstreaming, howardchung, David S. Miller,
	Johan Hedberg, netdev, linux-kernel, Jakub Kicinski,
	clang-built-linux

From: "howardchung@google.com" <howardchung@google.com>

This issue cause a warning here
https://groups.google.com/forum/#!topic/clang-built-linux/kyRKCjRsGoU

Signed-off-by: Howard Chung <howardchung@google.com>
---

 net/bluetooth/smp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 50e0ac692ec4..fa40de69e487 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -2179,10 +2179,12 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
 		 */
 		if (hci_find_ltk(hcon->hdev, &hcon->dst, hcon->dst_type,
 				 hcon->role)) {
+			/* Set passkey to 0. The value can be any number since
+			 * it'll be ignored anyway.
+			 */
 			err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst,
 							hcon->type,
-							hcon->dst_type,
-							passkey, 1);
+							hcon->dst_type, 0, 1);
 			if (err)
 				return SMP_UNSPECIFIED;
 			set_bit(SMP_FLAG_WAIT_USER, &smp->flags);
-- 
2.25.0.265.gbab2e86ba0-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-18 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 11:05 [Bluez PATCH v1] bluetooth: fix passkey uninitialized when used Howard Chung
2020-02-18 17:48 ` Nick Desaulniers
2020-02-18 21:20 ` Marcel Holtmann

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).