Re: [PATCH 1/4] Bluetooth: coredump: Fix skb leak in hci_devcd_append() stub
From: Zijun Hu
Date: Mon Sep 14 2026 - 13:45:18 EST
On 9/14/2026 9:57 PM, Luiz Augusto von Dentz wrote:
>> static inline int hci_devcd_append(struct hci_dev *hdev, struct sk_buff *skb)
>> {
>> + kfree_skb(skb);
> I don't think freeing it here is a good idea; in fact I think the bug
Agree, but freeing it here is the simplest fix.
> must be fixed in the caller so it properly frees all clones, etc,
> actually it may need to check if hci_devcd_init fails and stops
> cloning and calling hci_devcd_append as a result.
It would require a persistent variable to track whether a devcoredump collection failure has ever occurred,
for every devcoredump packet reported by the controller.