summaryrefslogtreecommitdiff
path: root/net/dns_resolver
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-02-04 16:47:07 +0100
committerMarcel Holtmann <marcel@holtmann.org>2021-02-04 18:11:23 +0100
commit10888140f09c3472146dc206accd0cfa051d0ed4 (patch)
tree5e784cf17090a15ea1ee2381b8fac67842988c36 /net/dns_resolver
parent8564baa3cf986b2f61af93128161b9cf25d4139f (diff)
Bluetooth: btusb: fix excessive stack usage
Enlarging the size of 'struct btmtk_hci_wmt_cmd' makes it no longer fit on the kernel stack, as seen from this compiler warning: drivers/bluetooth/btusb.c:3365:12: error: stack frame size of 1036 bytes in function 'btusb_mtk_hci_wmt_sync' [-Werror,-Wframe-larger-than=] Change the function to dynamically allocate the buffer instead. As there are other sleeping functions called from the same location, using GFP_KERNEL should be fine here, and the runtime overhead should not matter as this is rarely called. Unfortunately, I could not figure out why the message size is increased in the previous patch. Using dynamic allocation means any size is possible now, but there is still a range check that limits the total size (including the five-byte header) to 255 bytes, so whatever was intended there is now undone. Fixes: 48c13301e6ba ("Bluetooth: btusb: Fine-tune mt7663 mechanism.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/dns_resolver')
0 files changed, 0 insertions, 0 deletions