summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-02-26 10:20:47 -0800
committerJakub Kicinski <kuba@kernel.org>2026-02-26 10:23:00 -0800
commit0314e382cf02983eb3c33ac537ad9701e7858bc9 (patch)
tree3f74249b7d05f4e08542675a4dc0f173a2aa43b9 /drivers/bluetooth
parent4916f2e2f3fc9aef289fcd07949301e5c29094c2 (diff)
parentb9c8fc2caea6ff7e45c6942de8fee53515c66b34 (diff)
downloadlinux-next-0314e382cf02983eb3c33ac537ad9701e7858bc9.tar.gz
linux-next-0314e382cf02983eb3c33ac537ad9701e7858bc9.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-7.0-rc2). Conflicts: tools/testing/selftests/drivers/net/hw/rss_ctx.py 19c3a2a81d2b ("selftests: drv-net: rss: Generate unique ports for RSS context tests") ce5a0f4612db ("selftests: drv-net: rss_ctx: test RSS contexts persist after ifdown/up") include/net/inet_connection_sock.h 858d2a4f67ff6 ("tcp: fix potential race in tcp_v6_syn_recv_sock()") fcd3d039fab69 ("tcp: make tcp_v{4,6}_send_check() static") https://lore.kernel.org/aZ8PSFLzBrEU3I89@sirena.org.uk drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c 69050f8d6d075 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types") bf4afc53b77ae ("Convert 'alloc_obj' family to use the new default GFP_KERNEL argument") 8a96b9144f18a ("net/mlx5e: Alloc xsk channel param out of mlx5e_open_xsk()") Adjacent changes: net/netfilter/ipvs/ip_vs_ctl.c c59bd9e62e06 ("ipvs: use more counters to avoid service lookups") bf4afc53b77a ("Convert 'alloc_obj' family to use the new default GFP_KERNEL argument") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bpa10x.c2
-rw-r--r--drivers/bluetooth/btintel.c2
-rw-r--r--drivers/bluetooth/btintel_pcie.c8
-rw-r--r--drivers/bluetooth/btmrvl_debugfs.c2
-rw-r--r--drivers/bluetooth/btmrvl_main.c4
-rw-r--r--drivers/bluetooth/btmtk.c2
-rw-r--r--drivers/bluetooth/btrsi.c2
-rw-r--r--drivers/bluetooth/btrtl.c6
-rw-r--r--drivers/bluetooth/btusb.c4
-rw-r--r--drivers/bluetooth/hci_ag6xx.c2
-rw-r--r--drivers/bluetooth/hci_aml.c2
-rw-r--r--drivers/bluetooth/hci_ath.c2
-rw-r--r--drivers/bluetooth/hci_bcm.c2
-rw-r--r--drivers/bluetooth/hci_bcsp.c2
-rw-r--r--drivers/bluetooth/hci_h4.c2
-rw-r--r--drivers/bluetooth/hci_h5.c4
-rw-r--r--drivers/bluetooth/hci_intel.c2
-rw-r--r--drivers/bluetooth/hci_ldisc.c2
-rw-r--r--drivers/bluetooth/hci_ll.c2
-rw-r--r--drivers/bluetooth/hci_mrvl.c2
-rw-r--r--drivers/bluetooth/hci_qca.c28
-rw-r--r--drivers/bluetooth/hci_vhci.c2
-rw-r--r--drivers/bluetooth/virtio_bt.c2
23 files changed, 46 insertions, 42 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index e305d04aac9d..2ae38a321c4b 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -284,7 +284,7 @@ static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
switch (hci_skb_pkt_type(skb)) {
case HCI_COMMAND_PKT:
- dr = kmalloc(sizeof(*dr), GFP_KERNEL);
+ dr = kmalloc_obj(*dr);
if (!dr) {
usb_free_urb(urb);
return -ENOMEM;
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 9d29ab811f80..246b6205c5e0 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -871,7 +871,7 @@ struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
bt_dev_info(hdev, "regmap: Init R%x-W%x region", opcode_read,
opcode_write);
- ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index eaf5de46a702..37b744e35bc4 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1665,7 +1665,7 @@ static int btintel_pcie_setup_txq_bufs(struct btintel_pcie_data *data,
struct data_buf *buf;
/* Allocate the same number of buffers as the descriptor */
- txq->bufs = kmalloc_array(txq->count, sizeof(*buf), GFP_KERNEL);
+ txq->bufs = kmalloc_objs(*buf, txq->count);
if (!txq->bufs)
return -ENOMEM;
@@ -1709,7 +1709,7 @@ static int btintel_pcie_setup_rxq_bufs(struct btintel_pcie_data *data,
struct data_buf *buf;
/* Allocate the same number of buffers as the descriptor */
- rxq->bufs = kmalloc_array(rxq->count, sizeof(*buf), GFP_KERNEL);
+ rxq->bufs = kmalloc_objs(*buf, rxq->count);
if (!rxq->bufs)
return -ENOMEM;
@@ -2191,7 +2191,7 @@ btintel_pcie_get_recovery(struct pci_dev *pdev, struct device *dev)
return data;
}
- data = kzalloc(struct_size(data, name, name_len), GFP_ATOMIC);
+ data = kzalloc_flex(*data, name, name_len, GFP_ATOMIC);
if (!data)
return NULL;
@@ -2306,7 +2306,7 @@ static void btintel_pcie_reset(struct hci_dev *hdev)
if (test_and_set_bit(BTINTEL_PCIE_RECOVERY_IN_PROGRESS, &data->flags))
return;
- removal = kzalloc(sizeof(*removal), GFP_ATOMIC);
+ removal = kzalloc_obj(*removal, GFP_ATOMIC);
if (!removal)
return;
diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c
index 32329a2e526f..9b3e768c09f4 100644
--- a/drivers/bluetooth/btmrvl_debugfs.c
+++ b/drivers/bluetooth/btmrvl_debugfs.c
@@ -144,7 +144,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev)
if (!hdev->debugfs)
return;
- dbg = kzalloc(sizeof(*dbg), GFP_KERNEL);
+ dbg = kzalloc_obj(*dbg);
priv->debugfs_data = dbg;
if (!dbg) {
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index e26b07a9387d..d6f0ad0b4b6e 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -710,13 +710,13 @@ struct btmrvl_private *btmrvl_add_card(void *card)
{
struct btmrvl_private *priv;
- priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv) {
BT_ERR("Can not allocate priv");
goto err_priv;
}
- priv->adapter = kzalloc(sizeof(*priv->adapter), GFP_KERNEL);
+ priv->adapter = kzalloc_obj(*priv->adapter);
if (!priv->adapter) {
BT_ERR("Allocate buffer for btmrvl_adapter failed!");
goto err_adapter;
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index a8c520dc09e1..fa7533578f85 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -537,7 +537,7 @@ static int btmtk_usb_submit_wmt_recv_urb(struct hci_dev *hdev)
if (!urb)
return -ENOMEM;
- dr = kmalloc(sizeof(*dr), GFP_KERNEL);
+ dr = kmalloc_obj(*dr);
if (!dr) {
usb_free_urb(urb);
return -ENOMEM;
diff --git a/drivers/bluetooth/btrsi.c b/drivers/bluetooth/btrsi.c
index 6c1f584c8a33..c68dd2fba01c 100644
--- a/drivers/bluetooth/btrsi.c
+++ b/drivers/bluetooth/btrsi.c
@@ -112,7 +112,7 @@ static int rsi_hci_attach(void *priv, struct rsi_proto_ops *ops)
struct hci_dev *hdev;
int err = 0;
- h_adapter = kzalloc(sizeof(*h_adapter), GFP_KERNEL);
+ h_adapter = kzalloc_obj(*h_adapter);
if (!h_adapter)
return -ENOMEM;
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 5603b282f9bc..62f9d4df3a4f 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -524,7 +524,7 @@ static int btrtl_parse_section(struct hci_dev *hdev,
break;
}
- subsec = kzalloc(sizeof(*subsec), GFP_KERNEL);
+ subsec = kzalloc_obj(*subsec);
if (!subsec)
return -ENOMEM;
subsec->opcode = opcode;
@@ -828,7 +828,7 @@ static int rtl_download_firmware(struct hci_dev *hdev,
struct sk_buff *skb;
struct hci_rp_read_local_version *rp;
- dl_cmd = kmalloc(sizeof(*dl_cmd), GFP_KERNEL);
+ dl_cmd = kmalloc_obj(*dl_cmd);
if (!dl_cmd)
return -ENOMEM;
@@ -1077,7 +1077,7 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,
u8 key_id;
u8 reg_val[2];
- btrtl_dev = kzalloc(sizeof(*btrtl_dev), GFP_KERNEL);
+ btrtl_dev = kzalloc_obj(*btrtl_dev);
if (!btrtl_dev) {
ret = -ENOMEM;
goto err_alloc;
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index fcec8e589e81..a1c5eb993e47 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2071,7 +2071,7 @@ static struct urb *alloc_ctrl_urb(struct hci_dev *hdev, struct sk_buff *skb)
if (!urb)
return ERR_PTR(-ENOMEM);
- dr = kmalloc(sizeof(*dr), GFP_KERNEL);
+ dr = kmalloc_obj(*dr);
if (!dr) {
usb_free_urb(urb);
return ERR_PTR(-ENOMEM);
@@ -4059,7 +4059,7 @@ static int btusb_probe(struct usb_interface *intf,
return -ENODEV;
}
- data = kzalloc(sizeof(*data), GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ag6xx.c b/drivers/bluetooth/hci_ag6xx.c
index 94588676510f..3729d956782d 100644
--- a/drivers/bluetooth/hci_ag6xx.c
+++ b/drivers/bluetooth/hci_ag6xx.c
@@ -36,7 +36,7 @@ static int ag6xx_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- ag6xx = kzalloc(sizeof(*ag6xx), GFP_KERNEL);
+ ag6xx = kzalloc_obj(*ag6xx);
if (!ag6xx)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_aml.c b/drivers/bluetooth/hci_aml.c
index 4981c82d634d..959d9e67b669 100644
--- a/drivers/bluetooth/hci_aml.c
+++ b/drivers/bluetooth/hci_aml.c
@@ -541,7 +541,7 @@ static int aml_open(struct hci_uart *hu)
return -EOPNOTSUPP;
}
- aml_data = kzalloc(sizeof(*aml_data), GFP_KERNEL);
+ aml_data = kzalloc_obj(*aml_data);
if (!aml_data)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c
index 8d2b5e7f0d6a..fa679ad0acdf 100644
--- a/drivers/bluetooth/hci_ath.c
+++ b/drivers/bluetooth/hci_ath.c
@@ -101,7 +101,7 @@ static int ath_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- ath = kzalloc(sizeof(*ath), GFP_KERNEL);
+ ath = kzalloc_obj(*ath);
if (!ath)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 9286a5f40f55..1a4fc3882fd2 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -448,7 +448,7 @@ static int bcm_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- bcm = kzalloc(sizeof(*bcm), GFP_KERNEL);
+ bcm = kzalloc_obj(*bcm);
if (!bcm)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index 591abe6d63dd..b386f91d8b46 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -716,7 +716,7 @@ static int bcsp_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- bcsp = kzalloc(sizeof(*bcsp), GFP_KERNEL);
+ bcsp = kzalloc_obj(*bcsp);
if (!bcsp)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index ec017df8572c..07cc2a79a77b 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -44,7 +44,7 @@ static int h4_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
+ h4 = kzalloc_obj(*h4);
if (!h4)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 96e20a66ecd1..cfdf75dc2847 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -222,7 +222,7 @@ static int h5_open(struct hci_uart *hu)
if (hu->serdev) {
h5 = serdev_device_get_drvdata(hu->serdev);
} else {
- h5 = kzalloc(sizeof(*h5), GFP_KERNEL);
+ h5 = kzalloc_obj(*h5);
if (!h5)
return -ENOMEM;
}
@@ -1069,7 +1069,7 @@ static int h5_btrtl_resume(struct h5 *h5)
if (test_bit(H5_WAKEUP_DISABLE, &h5->flags)) {
struct h5_btrtl_reprobe *reprobe;
- reprobe = kzalloc(sizeof(*reprobe), GFP_KERNEL);
+ reprobe = kzalloc_obj(*reprobe);
if (!reprobe)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index f7570c2eaa46..c31105b91e47 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -384,7 +384,7 @@ static int intel_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- intel = kzalloc(sizeof(*intel), GFP_KERNEL);
+ intel = kzalloc_obj(*intel);
if (!intel)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 2b28515de92c..71c1997a0f73 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -491,7 +491,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
if (tty->ops->write == NULL)
return -EOPNOTSUPP;
- hu = kzalloc(sizeof(*hu), GFP_KERNEL);
+ hu = kzalloc_obj(*hu);
if (!hu) {
BT_ERR("Can't allocate control structure");
return -ENFILE;
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 6f4e25917b86..91acf24f1ef5 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -114,7 +114,7 @@ static int ll_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- ll = kzalloc(sizeof(*ll), GFP_KERNEL);
+ ll = kzalloc_obj(*ll);
if (!ll)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c
index 8767522ec4c6..516b8f74c434 100644
--- a/drivers/bluetooth/hci_mrvl.c
+++ b/drivers/bluetooth/hci_mrvl.c
@@ -64,7 +64,7 @@ static int mrvl_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- mrvl = kzalloc(sizeof(*mrvl), GFP_KERNEL);
+ mrvl = kzalloc_obj(*mrvl);
if (!mrvl)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index c511546f793e..bb9f002aa85e 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -585,7 +585,7 @@ static int qca_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- qca = kzalloc(sizeof(*qca), GFP_KERNEL);
+ qca = kzalloc_obj(*qca);
if (!qca)
return -ENOMEM;
@@ -1057,7 +1057,7 @@ static void qca_controller_memdump(struct work_struct *work)
}
if (!qca_memdump) {
- qca_memdump = kzalloc(sizeof(*qca_memdump), GFP_ATOMIC);
+ qca_memdump = kzalloc_obj(*qca_memdump, GFP_ATOMIC);
if (!qca_memdump) {
mutex_unlock(&qca->hci_memdump_lock);
return;
@@ -2046,19 +2046,23 @@ retry:
}
out:
- if (ret && retries < MAX_INIT_RETRIES) {
- bt_dev_warn(hdev, "Retry BT power ON:%d", retries);
+ if (ret) {
qca_power_shutdown(hu);
- if (hu->serdev) {
- serdev_device_close(hu->serdev);
- ret = serdev_device_open(hu->serdev);
- if (ret) {
- bt_dev_err(hdev, "failed to open port");
- return ret;
+
+ if (retries < MAX_INIT_RETRIES) {
+ bt_dev_warn(hdev, "Retry BT power ON:%d", retries);
+ if (hu->serdev) {
+ serdev_device_close(hu->serdev);
+ ret = serdev_device_open(hu->serdev);
+ if (ret) {
+ bt_dev_err(hdev, "failed to open port");
+ return ret;
+ }
}
+ retries++;
+ goto retry;
}
- retries++;
- goto retry;
+ return ret;
}
/* Setup bdaddr */
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 2fef08254d78..2762eacf7f20 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -640,7 +640,7 @@ static int vhci_open(struct inode *inode, struct file *file)
{
struct vhci_data *data;
- data = kzalloc(sizeof(*data), GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 6f1a37e85c6a..76d61af8a275 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -275,7 +275,7 @@ static int virtbt_probe(struct virtio_device *vdev)
return -EINVAL;
}
- vbt = kzalloc(sizeof(*vbt), GFP_KERNEL);
+ vbt = kzalloc_obj(*vbt);
if (!vbt)
return -ENOMEM;