Linux-Bluetooth Archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
@ 2024-03-19 15:46 Johan Hovold
  2024-03-19 15:46 ` [PATCH 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Johan Hovold @ 2024-03-19 15:46 UTC (permalink / raw
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Zhengping Jiang, linux-bluetooth, linux-kernel, Johan Hovold

Qualcomm Bluetooth controllers can be registered either from a serdev
driver or from the Bluetooth line discipline. In the latter case, the
HCI UART serdev pointer is NULL, something which the driver needs to
handle without crashing.

This series fixes one such issue at setup() time which incidentally
masked a similar crash at suspend. Fix this in two separate patches so
that the latter issue is address in pre-6.2 stable kernels.

Johan


Johan Hovold (2):
  Bluetooth: qca: fix NULL-deref on non-serdev suspend
  Bluetooth: qca: fix NULL-deref on non-serdev setup

 drivers/bluetooth/hci_qca.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend
  2024-03-19 15:46 [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup Johan Hovold
@ 2024-03-19 15:46 ` Johan Hovold
  2024-03-19 16:35   ` Bluetooth: qca: fix NULL-deref on non-serdev setup bluez.test.bot
  2024-03-19 15:46 ` [PATCH 2/2] " Johan Hovold
  2024-04-22 12:51 ` [PATCH 0/2] " Johan Hovold
  2 siblings, 1 reply; 18+ messages in thread
From: Johan Hovold @ 2024-03-19 15:46 UTC (permalink / raw
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Zhengping Jiang, linux-bluetooth, linux-kernel, Johan Hovold,
	stable

Qualcomm ROME controllers can be registered from the Bluetooth line
discipline and in this case the HCI UART serdev pointer is NULL.

Add the missing sanity check to prevent a NULL-pointer dereference when
wakeup() is called for a non-serdev controller during suspend.

Just return true for now to restore the original behaviour and address
the crash with pre-6.2 kernels, which do not have commit e9b3e5b8c657
("Bluetooth: hci_qca: only assign wakeup with serial port support") that
causes the crash to happen already at setup() time.

Fixes: c1a74160eaf1 ("Bluetooth: hci_qca: Add device_may_wakeup support")
Cc: stable@vger.kernel.org      # 5.13
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/bluetooth/hci_qca.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index c73481c57741..84f728943962 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1672,6 +1672,9 @@ static bool qca_wakeup(struct hci_dev *hdev)
 	struct hci_uart *hu = hci_get_drvdata(hdev);
 	bool wakeup;
 
+	if (!hu->serdev)
+		return true;
+
 	/* BT SoC attached through the serial bus is handled by the serdev driver.
 	 * So we need to use the device handle of the serdev driver to get the
 	 * status of device may wakeup.
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-03-19 15:46 [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup Johan Hovold
  2024-03-19 15:46 ` [PATCH 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
@ 2024-03-19 15:46 ` Johan Hovold
  2024-04-22 12:51 ` [PATCH 0/2] " Johan Hovold
  2 siblings, 0 replies; 18+ messages in thread
From: Johan Hovold @ 2024-03-19 15:46 UTC (permalink / raw
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Zhengping Jiang, linux-bluetooth, linux-kernel, Johan Hovold,
	stable

Qualcomm ROME controllers can be registered from the Bluetooth line
discipline and in this case the HCI UART serdev pointer is NULL.

Add the missing sanity check to prevent a NULL-pointer dereference when
setup() is called for a non-serdev controller.

Fixes: e9b3e5b8c657 ("Bluetooth: hci_qca: only assign wakeup with serial port support")
Cc: stable@vger.kernel.org      # 6.2
Cc: Zhengping Jiang <jiangzp@google.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/bluetooth/hci_qca.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 84f728943962..6a69a7f9ef64 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1960,8 +1960,10 @@ static int qca_setup(struct hci_uart *hu)
 		qca_debugfs_init(hdev);
 		hu->hdev->hw_error = qca_hw_error;
 		hu->hdev->cmd_timeout = qca_cmd_timeout;
-		if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
-			hu->hdev->wakeup = qca_wakeup;
+		if (hu->serdev) {
+			if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
+				hu->hdev->wakeup = qca_wakeup;
+		}
 	} else if (ret == -ENOENT) {
 		/* No patch/nvm-config found, run with original fw/config */
 		set_bit(QCA_ROM_FW, &qca->flags);
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* RE: Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-03-19 15:46 ` [PATCH 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
@ 2024-03-19 16:35   ` bluez.test.bot
  0 siblings, 0 replies; 18+ messages in thread
From: bluez.test.bot @ 2024-03-19 16:35 UTC (permalink / raw
  To: linux-bluetooth, johan+linaro

[-- Attachment #1: Type: text/plain, Size: 1697 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=836459

---Test result---

Test Summary:
CheckPatch                    PASS      1.37 seconds
GitLint                       PASS      0.68 seconds
SubjectPrefix                 PASS      0.26 seconds
BuildKernel                   PASS      28.52 seconds
CheckAllWarning               PASS      31.44 seconds
CheckSparse                   PASS      37.17 seconds
CheckSmatch                   PASS      100.28 seconds
BuildKernel32                 PASS      28.14 seconds
TestRunnerSetup               PASS      519.52 seconds
TestRunner_l2cap-tester       PASS      20.20 seconds
TestRunner_iso-tester         PASS      30.52 seconds
TestRunner_bnep-tester        PASS      4.81 seconds
TestRunner_mgmt-tester        FAIL      108.33 seconds
TestRunner_rfcomm-tester      PASS      7.41 seconds
TestRunner_sco-tester         PASS      15.08 seconds
TestRunner_ioctl-tester       PASS      7.89 seconds
TestRunner_mesh-tester        PASS      5.91 seconds
TestRunner_smp-tester         PASS      6.93 seconds
TestRunner_userchan-tester    PASS      5.04 seconds
IncrementalBuild              PASS      32.26 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2

Failed Test Cases
LL Privacy - Add Device 7 (AL is full)               Failed       0.202 seconds


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-03-19 15:46 [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup Johan Hovold
  2024-03-19 15:46 ` [PATCH 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
  2024-03-19 15:46 ` [PATCH 2/2] " Johan Hovold
@ 2024-04-22 12:51 ` Johan Hovold
  2024-04-22 13:04   ` quic_zijuhu
  2 siblings, 1 reply; 18+ messages in thread
From: Johan Hovold @ 2024-04-22 12:51 UTC (permalink / raw
  To: Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Zhengping Jiang, linux-bluetooth, linux-kernel

Hi Luiz,

On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
> Qualcomm Bluetooth controllers can be registered either from a serdev
> driver or from the Bluetooth line discipline. In the latter case, the
> HCI UART serdev pointer is NULL, something which the driver needs to
> handle without crashing.
> 
> This series fixes one such issue at setup() time which incidentally
> masked a similar crash at suspend. Fix this in two separate patches so
> that the latter issue is address in pre-6.2 stable kernels.

> Johan Hovold (2):
>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
>   Bluetooth: qca: fix NULL-deref on non-serdev setup

Could you pick these up for 6.9 or 6.10?

The patches are marked for stable backport and only privileged users can
set the N_HCI line discipline these days (even if I'm not sure about
pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.

Johan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 12:51 ` [PATCH 0/2] " Johan Hovold
@ 2024-04-22 13:04   ` quic_zijuhu
  2024-04-22 13:20     ` Johan Hovold
  0 siblings, 1 reply; 18+ messages in thread
From: quic_zijuhu @ 2024-04-22 13:04 UTC (permalink / raw
  To: Johan Hovold, Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Zhengping Jiang, linux-bluetooth, linux-kernel

On 4/22/2024 8:51 PM, Johan Hovold wrote:
> Hi Luiz,
> 
> On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
>> Qualcomm Bluetooth controllers can be registered either from a serdev
>> driver or from the Bluetooth line discipline. In the latter case, the
>> HCI UART serdev pointer is NULL, something which the driver needs to
>> handle without crashing.
>>
>> This series fixes one such issue at setup() time which incidentally
>> masked a similar crash at suspend. Fix this in two separate patches so
>> that the latter issue is address in pre-6.2 stable kernels.
> 
>> Johan Hovold (2):
>>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
>>   Bluetooth: qca: fix NULL-deref on non-serdev setup
> 
> Could you pick these up for 6.9 or 6.10?
> 
> The patches are marked for stable backport and only privileged users can
> set the N_HCI line discipline these days (even if I'm not sure about
> pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
> 
> Johan
> 
Hi johan,
could you share the patch links for me to review. i can
't find them now

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:04   ` quic_zijuhu
@ 2024-04-22 13:20     ` Johan Hovold
  2024-04-22 13:30       ` quic_zijuhu
  2024-04-22 13:44       ` Luiz Augusto von Dentz
  0 siblings, 2 replies; 18+ messages in thread
From: Johan Hovold @ 2024-04-22 13:20 UTC (permalink / raw
  To: quic_zijuhu
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, Zhengping Jiang,
	linux-bluetooth, linux-kernel

On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
> On 4/22/2024 8:51 PM, Johan Hovold wrote:
> > On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:

> >> Johan Hovold (2):
> >>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
> >>   Bluetooth: qca: fix NULL-deref on non-serdev setup
> > 
> > Could you pick these up for 6.9 or 6.10?
> > 
> > The patches are marked for stable backport and only privileged users can
> > set the N_HCI line discipline these days (even if I'm not sure about
> > pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.

> could you share the patch links for me to review. i can
> 't find them now

Sure, but you should bookmark lore.kernel.org in your browser as you can
search the archives there yourself:

	https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/

Johan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:20     ` Johan Hovold
@ 2024-04-22 13:30       ` quic_zijuhu
  2024-04-22 13:43         ` Johan Hovold
  2024-04-22 13:44       ` Luiz Augusto von Dentz
  1 sibling, 1 reply; 18+ messages in thread
From: quic_zijuhu @ 2024-04-22 13:30 UTC (permalink / raw
  To: Johan Hovold
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, Zhengping Jiang,
	linux-bluetooth, linux-kernel

On 4/22/2024 9:20 PM, Johan Hovold wrote:
> On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
>> On 4/22/2024 8:51 PM, Johan Hovold wrote:
>>> On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
> 
>>>> Johan Hovold (2):
>>>>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
>>>>   Bluetooth: qca: fix NULL-deref on non-serdev setup
>>>
>>> Could you pick these up for 6.9 or 6.10?
>>>
>>> The patches are marked for stable backport and only privileged users can
>>> set the N_HCI line discipline these days (even if I'm not sure about
>>> pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
> 
>> could you share the patch links for me to review. i can
>> 't find them now
> 
> Sure, but you should bookmark lore.kernel.org in your browser as you can
> search the archives there yourself:
> 
> 	https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/
> 
> Johan
NAK for your [PATCH 1/2] since the null checking is redundant with your
[PATCH 2/2].
NAK for your [PATCH 2/2], since it is same with my earlier fix
https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
my new patchset for btattach tool still has this change.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:30       ` quic_zijuhu
@ 2024-04-22 13:43         ` Johan Hovold
  2024-04-22 13:53           ` quic_zijuhu
  0 siblings, 1 reply; 18+ messages in thread
From: Johan Hovold @ 2024-04-22 13:43 UTC (permalink / raw
  To: quic_zijuhu
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, Zhengping Jiang,
	linux-bluetooth, linux-kernel

On Mon, Apr 22, 2024 at 09:30:28PM +0800, quic_zijuhu wrote:
> On 4/22/2024 9:20 PM, Johan Hovold wrote:
> > On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
> >> On 4/22/2024 8:51 PM, Johan Hovold wrote:
> >>> On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
> > 
> >>>> Johan Hovold (2):
> >>>>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
> >>>>   Bluetooth: qca: fix NULL-deref on non-serdev setup
> >>>
> >>> Could you pick these up for 6.9 or 6.10?
> >>>
> >>> The patches are marked for stable backport and only privileged users can
> >>> set the N_HCI line discipline these days (even if I'm not sure about
> >>> pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
> > 
> >> could you share the patch links for me to review. i can
> >> 't find them now
> > 
> > Sure, but you should bookmark lore.kernel.org in your browser as you can
> > search the archives there yourself:
> > 
> > 	https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/

> NAK for your [PATCH 1/2] since the null checking is redundant with your
> [PATCH 2/2].

I explained in the cover letter why it is split up like this. If you
don't bother reading, then we will not bother listening to you.

> NAK for your [PATCH 2/2], since it is same with my earlier fix
> https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
> my new patchset for btattach tool still has this change.

The fix does not depend on your btattach series, which has also been
rejected.

You clearly have some learning to do on how to interact with the kernel
community and to write proper commit messages and patches. If you start
listening to feedback and try not to piss everyone off perhaps you can
even get your patches merged one day. [1][2]

Johan

[1] https://lore.kernel.org/linux-bluetooth/fbe5722b-1e45-4ccb-a050-20a473a823c8@quicinc.com/T/#m8e495666a71eb0e7ae54c82554dfff1fc96983e7
[2] https://lore.kernel.org/linux-bluetooth/1713563327-19694-1-git-send-email-quic_zijuhu@quicinc.com/T/#med0610646a8fd8b3c8586abca9895b124b2d2534

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:20     ` Johan Hovold
  2024-04-22 13:30       ` quic_zijuhu
@ 2024-04-22 13:44       ` Luiz Augusto von Dentz
  2024-04-22 13:51         ` Johan Hovold
  1 sibling, 1 reply; 18+ messages in thread
From: Luiz Augusto von Dentz @ 2024-04-22 13:44 UTC (permalink / raw
  To: Johan Hovold
  Cc: quic_zijuhu, Marcel Holtmann, Zhengping Jiang, linux-bluetooth,
	linux-kernel

Hi Johan,

On Mon, Apr 22, 2024 at 9:20 AM Johan Hovold <johan@kernel.org> wrote:
>
> On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
> > On 4/22/2024 8:51 PM, Johan Hovold wrote:
> > > On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
>
> > >> Johan Hovold (2):
> > >>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
> > >>   Bluetooth: qca: fix NULL-deref on non-serdev setup
> > >
> > > Could you pick these up for 6.9 or 6.10?
> > >
> > > The patches are marked for stable backport and only privileged users can
> > > set the N_HCI line discipline these days (even if I'm not sure about
> > > pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
>
> > could you share the patch links for me to review. i can
> > 't find them now
>
> Sure, but you should bookmark lore.kernel.org in your browser as you can
> search the archives there yourself:
>
>         https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/

Did you send these to linux-bluetooth? I don't see them in:

https://patchwork.kernel.org/project/bluetooth/list/


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:44       ` Luiz Augusto von Dentz
@ 2024-04-22 13:51         ` Johan Hovold
  2024-04-22 13:52           ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 18+ messages in thread
From: Johan Hovold @ 2024-04-22 13:51 UTC (permalink / raw
  To: Luiz Augusto von Dentz
  Cc: quic_zijuhu, Marcel Holtmann, Zhengping Jiang, linux-bluetooth,
	linux-kernel

On Mon, Apr 22, 2024 at 09:44:59AM -0400, Luiz Augusto von Dentz wrote:
> On Mon, Apr 22, 2024 at 9:20 AM Johan Hovold <johan@kernel.org> wrote:

> >         https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/
> 
> Did you send these to linux-bluetooth? I don't see them in:
> 
> https://patchwork.kernel.org/project/bluetooth/list/

Yes, I did and they are in the linux-bluetooth archives on lore. Not
sure why they don't show up in the tracker.

Do you want me to resend?

Johan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:51         ` Johan Hovold
@ 2024-04-22 13:52           ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 18+ messages in thread
From: Luiz Augusto von Dentz @ 2024-04-22 13:52 UTC (permalink / raw
  To: Johan Hovold
  Cc: quic_zijuhu, Marcel Holtmann, Zhengping Jiang, linux-bluetooth,
	linux-kernel

Hi Johan,

On Mon, Apr 22, 2024 at 9:51 AM Johan Hovold <johan@kernel.org> wrote:
>
> On Mon, Apr 22, 2024 at 09:44:59AM -0400, Luiz Augusto von Dentz wrote:
> > On Mon, Apr 22, 2024 at 9:20 AM Johan Hovold <johan@kernel.org> wrote:
>
> > >         https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/
> >
> > Did you send these to linux-bluetooth? I don't see them in:
> >
> > https://patchwork.kernel.org/project/bluetooth/list/
>
> Yes, I did and they are in the linux-bluetooth archives on lore. Not
> sure why they don't show up in the tracker.
>
> Do you want me to resend?
>
> Johan

Yes, please resend them.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:43         ` Johan Hovold
@ 2024-04-22 13:53           ` quic_zijuhu
  2024-04-22 14:15             ` Luiz Augusto von Dentz
  2024-04-22 15:02             ` Johan Hovold
  0 siblings, 2 replies; 18+ messages in thread
From: quic_zijuhu @ 2024-04-22 13:53 UTC (permalink / raw
  To: Johan Hovold
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, Zhengping Jiang,
	linux-bluetooth, linux-kernel

On 4/22/2024 9:43 PM, Johan Hovold wrote:
> On Mon, Apr 22, 2024 at 09:30:28PM +0800, quic_zijuhu wrote:
>> On 4/22/2024 9:20 PM, Johan Hovold wrote:
>>> On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
>>>> On 4/22/2024 8:51 PM, Johan Hovold wrote:
>>>>> On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
>>>
>>>>>> Johan Hovold (2):
>>>>>>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
>>>>>>   Bluetooth: qca: fix NULL-deref on non-serdev setup
>>>>>
>>>>> Could you pick these up for 6.9 or 6.10?
>>>>>
>>>>> The patches are marked for stable backport and only privileged users can
>>>>> set the N_HCI line discipline these days (even if I'm not sure about
>>>>> pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
>>>
>>>> could you share the patch links for me to review. i can
>>>> 't find them now
>>>
>>> Sure, but you should bookmark lore.kernel.org in your browser as you can
>>> search the archives there yourself:
>>>
>>> 	https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/
> 
>> NAK for your [PATCH 1/2] since the null checking is redundant with your
>> [PATCH 2/2].
> 
> I explained in the cover letter why it is split up like this. If you
> don't bother reading, then we will not bother listening to you.
> 
>> NAK for your [PATCH 2/2], since it is same with my earlier fix
>> https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
>> my new patchset for btattach tool still has this change.
> 
> The fix does not depend on your btattach series, which has also been
> rejected.
> 
these my v1 and v2 for this issue which are earlier then yours.
they are not rejected but not responded.

https://lore.kernel.org/all/bf74d533-c0ff-42c6-966f-b4b28c5e0f60@molgen.mpg.de/
https://lore.kernel.org/all/1704970181-30092-1-git-send-email-quic_zijuhu@quicinc.com/

> You clearly have some learning to do on how to interact with the kernel
> community and to write proper commit messages and patches. If you start
> listening to feedback and try not to piss everyone off perhaps you can
> even get your patches merged one day. [1][2]
> 
> Johan
> 
> [1] https://lore.kernel.org/linux-bluetooth/fbe5722b-1e45-4ccb-a050-20a473a823c8@quicinc.com/T/#m8e495666a71eb0e7ae54c82554dfff1fc96983e7
> [2] https://lore.kernel.org/linux-bluetooth/1713563327-19694-1-git-send-email-quic_zijuhu@quicinc.com/T/#med0610646a8fd8b3c8586abca9895b124b2d2534


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:53           ` quic_zijuhu
@ 2024-04-22 14:15             ` Luiz Augusto von Dentz
  2024-04-22 14:22               ` quic_zijuhu
  2024-04-22 15:02             ` Johan Hovold
  1 sibling, 1 reply; 18+ messages in thread
From: Luiz Augusto von Dentz @ 2024-04-22 14:15 UTC (permalink / raw
  To: quic_zijuhu
  Cc: Johan Hovold, Marcel Holtmann, Zhengping Jiang, linux-bluetooth,
	linux-kernel

Hi Quic_zijuhu,

On Mon, Apr 22, 2024 at 9:53 AM quic_zijuhu <quic_zijuhu@quicinc.com> wrote:
>
> On 4/22/2024 9:43 PM, Johan Hovold wrote:
> > On Mon, Apr 22, 2024 at 09:30:28PM +0800, quic_zijuhu wrote:
> >> On 4/22/2024 9:20 PM, Johan Hovold wrote:
> >>> On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
> >>>> On 4/22/2024 8:51 PM, Johan Hovold wrote:
> >>>>> On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
> >>>
> >>>>>> Johan Hovold (2):
> >>>>>>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
> >>>>>>   Bluetooth: qca: fix NULL-deref on non-serdev setup
> >>>>>
> >>>>> Could you pick these up for 6.9 or 6.10?
> >>>>>
> >>>>> The patches are marked for stable backport and only privileged users can
> >>>>> set the N_HCI line discipline these days (even if I'm not sure about
> >>>>> pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
> >>>
> >>>> could you share the patch links for me to review. i can
> >>>> 't find them now
> >>>
> >>> Sure, but you should bookmark lore.kernel.org in your browser as you can
> >>> search the archives there yourself:
> >>>
> >>>     https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/
> >
> >> NAK for your [PATCH 1/2] since the null checking is redundant with your
> >> [PATCH 2/2].
> >
> > I explained in the cover letter why it is split up like this. If you
> > don't bother reading, then we will not bother listening to you.
> >
> >> NAK for your [PATCH 2/2], since it is same with my earlier fix
> >> https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
> >> my new patchset for btattach tool still has this change.
> >
> > The fix does not depend on your btattach series, which has also been
> > rejected.
> >
> these my v1 and v2 for this issue which are earlier then yours.
> they are not rejected but not responded.
>
> https://lore.kernel.org/all/bf74d533-c0ff-42c6-966f-b4b28c5e0f60@molgen.mpg.de/
> https://lore.kernel.org/all/1704970181-30092-1-git-send-email-quic_zijuhu@quicinc.com/
>
> > You clearly have some learning to do on how to interact with the kernel
> > community and to write proper commit messages and patches. If you start
> > listening to feedback and try not to piss everyone off perhaps you can
> > even get your patches merged one day. [1][2]
> >
> > Johan
> >
> > [1] https://lore.kernel.org/linux-bluetooth/fbe5722b-1e45-4ccb-a050-20a473a823c8@quicinc.com/T/#m8e495666a71eb0e7ae54c82554dfff1fc96983e7
> > [2] https://lore.kernel.org/linux-bluetooth/1713563327-19694-1-git-send-email-quic_zijuhu@quicinc.com/T/#med0610646a8fd8b3c8586abca9895b124b2d2534
>

They probably need to be resend as well, you have so many sets pending
that makes it hard to know which should go first, next time please
wait until each set is merged before sending the next since I can't
know if they are really independent of each other or not.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 14:15             ` Luiz Augusto von Dentz
@ 2024-04-22 14:22               ` quic_zijuhu
  0 siblings, 0 replies; 18+ messages in thread
From: quic_zijuhu @ 2024-04-22 14:22 UTC (permalink / raw
  To: Luiz Augusto von Dentz
  Cc: Johan Hovold, Marcel Holtmann, Zhengping Jiang, linux-bluetooth,
	linux-kernel

On 4/22/2024 10:15 PM, Luiz Augusto von Dentz wrote:
> Hi Quic_zijuhu,
> 
> On Mon, Apr 22, 2024 at 9:53 AM quic_zijuhu <quic_zijuhu@quicinc.com> wrote:
>>
>> On 4/22/2024 9:43 PM, Johan Hovold wrote:
>>> On Mon, Apr 22, 2024 at 09:30:28PM +0800, quic_zijuhu wrote:
>>>> On 4/22/2024 9:20 PM, Johan Hovold wrote:
>>>>> On Mon, Apr 22, 2024 at 09:04:58PM +0800, quic_zijuhu wrote:
>>>>>> On 4/22/2024 8:51 PM, Johan Hovold wrote:
>>>>>>> On Tue, Mar 19, 2024 at 04:46:09PM +0100, Johan Hovold wrote:
>>>>>
>>>>>>>> Johan Hovold (2):
>>>>>>>>   Bluetooth: qca: fix NULL-deref on non-serdev suspend
>>>>>>>>   Bluetooth: qca: fix NULL-deref on non-serdev setup
>>>>>>>
>>>>>>> Could you pick these up for 6.9 or 6.10?
>>>>>>>
>>>>>>> The patches are marked for stable backport and only privileged users can
>>>>>>> set the N_HCI line discipline these days (even if I'm not sure about
>>>>>>> pre-5.14 kernels...) so it may be fine to wait for 6.10 if you prefer.
>>>>>
>>>>>> could you share the patch links for me to review. i can
>>>>>> 't find them now
>>>>>
>>>>> Sure, but you should bookmark lore.kernel.org in your browser as you can
>>>>> search the archives there yourself:
>>>>>
>>>>>     https://lore.kernel.org/lkml/20240319154611.2492-1-johan+linaro@kernel.org/
>>>
>>>> NAK for your [PATCH 1/2] since the null checking is redundant with your
>>>> [PATCH 2/2].
>>>
>>> I explained in the cover letter why it is split up like this. If you
>>> don't bother reading, then we will not bother listening to you.
>>>
>>>> NAK for your [PATCH 2/2], since it is same with my earlier fix
>>>> https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
>>>> my new patchset for btattach tool still has this change.
>>>
>>> The fix does not depend on your btattach series, which has also been
>>> rejected.
>>>
>> these my v1 and v2 for this issue which are earlier then yours.
>> they are not rejected but not responded.
>>
>> https://lore.kernel.org/all/bf74d533-c0ff-42c6-966f-b4b28c5e0f60@molgen.mpg.de/
>> https://lore.kernel.org/all/1704970181-30092-1-git-send-email-quic_zijuhu@quicinc.com/
>>
>>> You clearly have some learning to do on how to interact with the kernel
>>> community and to write proper commit messages and patches. If you start
>>> listening to feedback and try not to piss everyone off perhaps you can
>>> even get your patches merged one day. [1][2]
>>>
>>> Johan
>>>
>>> [1] https://lore.kernel.org/linux-bluetooth/fbe5722b-1e45-4ccb-a050-20a473a823c8@quicinc.com/T/#m8e495666a71eb0e7ae54c82554dfff1fc96983e7
>>> [2] https://lore.kernel.org/linux-bluetooth/1713563327-19694-1-git-send-email-quic_zijuhu@quicinc.com/T/#med0610646a8fd8b3c8586abca9895b124b2d2534
>>
> 
> They probably need to be resend as well, you have so many sets pending
> that makes it hard to know which should go first, next time please
> wait until each set is merged before sending the next since I can't
> know if they are really independent of each other or not.
> 
okay. let me also provide a list of patches required for BT maintainers
in another thread.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:57 [PATCH RESEND 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
@ 2024-04-22 14:32 ` bluez.test.bot
  0 siblings, 0 replies; 18+ messages in thread
From: bluez.test.bot @ 2024-04-22 14:32 UTC (permalink / raw
  To: linux-bluetooth, johan+linaro

[-- Attachment #1: Type: text/plain, Size: 2846 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=846689

---Test result---

Test Summary:
CheckPatch                    PASS      1.25 seconds
GitLint                       PASS      0.55 seconds
SubjectPrefix                 PASS      0.20 seconds
BuildKernel                   PASS      30.52 seconds
CheckAllWarning               PASS      33.41 seconds
CheckSparse                   PASS      39.05 seconds
CheckSmatch                   FAIL      35.60 seconds
BuildKernel32                 PASS      29.92 seconds
TestRunnerSetup               PASS      532.50 seconds
TestRunner_l2cap-tester       PASS      18.42 seconds
TestRunner_iso-tester         FAIL      31.55 seconds
TestRunner_bnep-tester        PASS      4.68 seconds
TestRunner_mgmt-tester        FAIL      112.15 seconds
TestRunner_rfcomm-tester      PASS      7.39 seconds
TestRunner_sco-tester         PASS      15.04 seconds
TestRunner_ioctl-tester       PASS      7.75 seconds
TestRunner_mesh-tester        PASS      5.84 seconds
TestRunner_smp-tester         PASS      6.80 seconds
TestRunner_userchan-tester    PASS      4.99 seconds
IncrementalBuild              PASS      33.50 seconds

Details
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 121 (99.2%), Failed: 1, Not Run: 0

Failed Test Cases
ISO Connect2 Suspend - Success                       Failed       4.245 seconds
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2

Failed Test Cases
LL Privacy - Add Device 7 (AL is full)               Failed       0.195 seconds


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 13:53           ` quic_zijuhu
  2024-04-22 14:15             ` Luiz Augusto von Dentz
@ 2024-04-22 15:02             ` Johan Hovold
  2024-04-22 15:19               ` quic_zijuhu
  1 sibling, 1 reply; 18+ messages in thread
From: Johan Hovold @ 2024-04-22 15:02 UTC (permalink / raw
  To: quic_zijuhu
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, Zhengping Jiang,
	linux-bluetooth, linux-kernel

On Mon, Apr 22, 2024 at 09:53:48PM +0800, quic_zijuhu wrote:
> On 4/22/2024 9:43 PM, Johan Hovold wrote:
> > On Mon, Apr 22, 2024 at 09:30:28PM +0800, quic_zijuhu wrote:
> >> On 4/22/2024 9:20 PM, Johan Hovold wrote:

> >> NAK for your [PATCH 1/2] since the null checking is redundant with your
> >> [PATCH 2/2].
> > 
> > I explained in the cover letter why it is split up like this. If you
> > don't bother reading, then we will not bother listening to you.
> > 
> >> NAK for your [PATCH 2/2], since it is same with my earlier fix
> >> https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
> >> my new patchset for btattach tool still has this change.
> > 
> > The fix does not depend on your btattach series, which has also been
> > rejected.
> > 
> these my v1 and v2 for this issue which are earlier then yours.
> they are not rejected but not responded.
> 
> https://lore.kernel.org/all/bf74d533-c0ff-42c6-966f-b4b28c5e0f60@molgen.mpg.de/
> https://lore.kernel.org/all/1704970181-30092-1-git-send-email-quic_zijuhu@quicinc.com/

Here is your *v3* as part of the rejected btattach series:

	https://lore.kernel.org/all/1713409913-13042-2-git-send-email-quic_zijuhu@quicinc.com/

Apparently you had earlier also sent it separately, I see now in lore.
It's all a big mess.

> > You clearly have some learning to do on how to interact with the kernel
> > community and to write proper commit messages and patches. If you start
> > listening to feedback and try not to piss everyone off perhaps you can
> > even get your patches merged one day. [1][2]

Johan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup
  2024-04-22 15:02             ` Johan Hovold
@ 2024-04-22 15:19               ` quic_zijuhu
  0 siblings, 0 replies; 18+ messages in thread
From: quic_zijuhu @ 2024-04-22 15:19 UTC (permalink / raw
  To: Johan Hovold
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, Zhengping Jiang,
	linux-bluetooth, linux-kernel

On 4/22/2024 11:02 PM, Johan Hovold wrote:
> On Mon, Apr 22, 2024 at 09:53:48PM +0800, quic_zijuhu wrote:
>> On 4/22/2024 9:43 PM, Johan Hovold wrote:
>>> On Mon, Apr 22, 2024 at 09:30:28PM +0800, quic_zijuhu wrote:
>>>> On 4/22/2024 9:20 PM, Johan Hovold wrote:
> 
>>>> NAK for your [PATCH 1/2] since the null checking is redundant with your
>>>> [PATCH 2/2].
>>>
>>> I explained in the cover letter why it is split up like this. If you
>>> don't bother reading, then we will not bother listening to you.
>>>
>>>> NAK for your [PATCH 2/2], since it is same with my earlier fix
>>>> https://lore.kernel.org/all/1704960978-5437-1-git-send-email-quic_zijuhu@quicinc.com/
>>>> my new patchset for btattach tool still has this change.
>>>
>>> The fix does not depend on your btattach series, which has also been
>>> rejected.
>>>
>> these my v1 and v2 for this issue which are earlier then yours.
>> they are not rejected but not responded.
>>
>> https://lore.kernel.org/all/bf74d533-c0ff-42c6-966f-b4b28c5e0f60@molgen.mpg.de/
>> https://lore.kernel.org/all/1704970181-30092-1-git-send-email-quic_zijuhu@quicinc.com/
> 
> Here is your *v3* as part of the rejected btattach series:
> 
> 	https://lore.kernel.org/all/1713409913-13042-2-git-send-email-quic_zijuhu@quicinc.com/
> 
no, v3 is a separate patch here and not was rejected.
https://lore.kernel.org/all/1710912504-25416-1-git-send-email-quic_zijuhu@quicinc.com/
and it was sent after your patch.

then i included the fix into a patch serials for tool btattach shown by
below link
https://lore.kernel.org/all/1713358336-29619-2-git-send-email-quic_zijuhu@quicinc.com/
you reviewed my the serials and also did not rejected the fix.
and it also doesn't get any negative comments.

> Apparently you had earlier also sent it separately, I see now in lore.
> It's all a big mess.
> 
>>> You clearly have some learning to do on how to interact with the kernel
>>> community and to write proper commit messages and patches. If you start
>>> listening to feedback and try not to piss everyone off perhaps you can
>>> even get your patches merged one day. [1][2]
> 
> Johan


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-04-22 15:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-19 15:46 [PATCH 0/2] Bluetooth: qca: fix NULL-deref on non-serdev setup Johan Hovold
2024-03-19 15:46 ` [PATCH 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
2024-03-19 16:35   ` Bluetooth: qca: fix NULL-deref on non-serdev setup bluez.test.bot
2024-03-19 15:46 ` [PATCH 2/2] " Johan Hovold
2024-04-22 12:51 ` [PATCH 0/2] " Johan Hovold
2024-04-22 13:04   ` quic_zijuhu
2024-04-22 13:20     ` Johan Hovold
2024-04-22 13:30       ` quic_zijuhu
2024-04-22 13:43         ` Johan Hovold
2024-04-22 13:53           ` quic_zijuhu
2024-04-22 14:15             ` Luiz Augusto von Dentz
2024-04-22 14:22               ` quic_zijuhu
2024-04-22 15:02             ` Johan Hovold
2024-04-22 15:19               ` quic_zijuhu
2024-04-22 13:44       ` Luiz Augusto von Dentz
2024-04-22 13:51         ` Johan Hovold
2024-04-22 13:52           ` Luiz Augusto von Dentz
  -- strict thread matches above, loose matches on Subject: below --
2024-04-22 13:57 [PATCH RESEND 1/2] Bluetooth: qca: fix NULL-deref on non-serdev suspend Johan Hovold
2024-04-22 14:32 ` Bluetooth: qca: fix NULL-deref on non-serdev setup bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).