Skip to content

Commit a0aff75

Browse files
author
Paolo Abeni
committed
Merge tag 'for-net-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_event: Fix connection regression between LE and non-LE adapters - Fix error code in chan_alloc_skb_cb() * tag 'for-net-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_event: Fix connection regression between LE and non-LE adapters Bluetooth: Fix error code in chan_alloc_skb_cb() ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2 parents c9cb135 + f6685a9 commit a0aff75

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/net/bluetooth/hci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ enum {
683683
#define HCI_ERROR_REMOTE_POWER_OFF 0x15
684684
#define HCI_ERROR_LOCAL_HOST_TERM 0x16
685685
#define HCI_ERROR_PAIRING_NOT_ALLOWED 0x18
686-
#define HCI_ERROR_UNSUPPORTED_REMOTE_FEATURE 0x1e
686+
#define HCI_ERROR_UNSUPPORTED_REMOTE_FEATURE 0x1a
687687
#define HCI_ERROR_INVALID_LL_PARAMS 0x1e
688688
#define HCI_ERROR_UNSPECIFIED 0x1f
689689
#define HCI_ERROR_ADVERTISING_TIMEOUT 0x3c

net/bluetooth/6lowpan.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,11 +825,16 @@ static struct sk_buff *chan_alloc_skb_cb(struct l2cap_chan *chan,
825825
unsigned long hdr_len,
826826
unsigned long len, int nb)
827827
{
828+
struct sk_buff *skb;
829+
828830
/* Note that we must allocate using GFP_ATOMIC here as
829831
* this function is called originally from netdev hard xmit
830832
* function in atomic context.
831833
*/
832-
return bt_skb_alloc(hdr_len + len, GFP_ATOMIC);
834+
skb = bt_skb_alloc(hdr_len + len, GFP_ATOMIC);
835+
if (!skb)
836+
return ERR_PTR(-ENOMEM);
837+
return skb;
833838
}
834839

835840
static void chan_suspend_cb(struct l2cap_chan *chan)

0 commit comments

Comments
 (0)