Bluetooth: Allocate struct inquiry_entry with GFP_KERNEL
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: Allocate struct inquiry_entry with GFP_KERNEL
The allocation of inquiry cache entries is triggered as a result of processing HCI events. Since the processing is done in the context of a workqueue, there is no needed to allocate with GFP_ATOMIC in that case. Switch it to GFP_KERNEL.
Signed-off-by Marcel Holtmann <[email protected]>
--- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_core.c +1 -1
@@ -2088,7 +2088,7 @@ u32 hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, }/* Entry not in the cache. Add new one. */ - ie =kzalloc (sizeof (struct inquiry_entry ),GFP_ATOMIC ); + ie =kzalloc (sizeof (struct inquiry_entry ),GFP_KERNEL );if (!ie) { flags |=MGMT_DEV_FOUND_CONFIRM_NAME ; goto done;
Signature · 1 line
1.9.3
Johan Hedberg
AppliedHi Marcel,
Quoted 9 lines · Marcel Holtmann
The allocation of inquiry cache entries is triggered as a result of processing HCI events. Since the processing is done in the context of a workqueue, there is no needed to allocate with
GFP_ATOMICin that case. Switch it toGFP_KERNEL.Signed-off-by Marcel Holtmann <[email protected]>--- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to bluetooth-next. Thanks.
Johan