From: Marcel Holtmann Date: Mon, 16 Mar 2015 23:05:44 +0000 (-0700) Subject: Bluetooth: Fix length for Read Local OOB Extended Data respone packet X-Git-Tag: v4.1-rc1~128^2~204^2~19 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5425f98e863ac5e4798a186475d4a8d95a2c08e8;p=karo-tx-linux.git Bluetooth: Fix length for Read Local OOB Extended Data respone packet The length of the respone packet for Read Local OOB Extended Data command has a calculation error. In case LE Secure Connections support is not enabled, the actual response is shorter. Keep this in mind and update the value accordingly. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 32c2c75c0888..7fa3c4b8384b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -6388,7 +6388,7 @@ static int read_local_oob_ext_data(struct sock *sk, struct hci_dev *hdev, hci_dev_unlock(hdev); err = mgmt_cmd_complete(sk, hdev->id, MGMT_OP_READ_LOCAL_OOB_EXT_DATA, - MGMT_STATUS_SUCCESS, rp, rp_len); + MGMT_STATUS_SUCCESS, rp, sizeof(*rp) + eir_len); done: kfree(rp);