public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: virtio_bt: Use skb_put to set length
@ 2022-07-27  7:05 Soenke Huster
  2022-07-27  8:05 ` [v2] " bluez.test.bot
  2022-10-12  7:45 ` [PATCH v2 RESEND] " Soenke Huster
  0 siblings, 2 replies; 5+ messages in thread
From: Soenke Huster @ 2022-07-27  7:05 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
  Cc: Soenke Huster, Luiz Augusto von Dentz, linux-bluetooth,
	linux-kernel

By using skb_put we ensure that skb->tail is set
correctly. Currently, skb->tail is always zero, which
leads to errors, such as the following page fault in
rfcomm_recv_frame:

    BUG: unable to handle page fault for address: ffffed1021de29ff
    #PF: supervisor read access in kernel mode
    #PF: error_code(0x0000) - not-present page
    RIP: 0010:rfcomm_run+0x831/0x4040 (net/bluetooth/rfcomm/core.c:1751)

Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver")
Signed-off-by: Soenke Huster <soenke.huster@eknoes.de>
---
v2: Add Fixes tag
 drivers/bluetooth/virtio_bt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 67c21263f9e0..fd281d439505 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -219,7 +219,7 @@ static void virtbt_rx_work(struct work_struct *work)
 	if (!skb)
 		return;
 
-	skb->len = len;
+	skb_put(skb, len);
 	virtbt_rx_handle(vbt, skb);
 
 	if (virtbt_add_inbuf(vbt) < 0)
-- 
2.36.1



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

* RE: [v2] Bluetooth: virtio_bt: Use skb_put to set length
  2022-07-27  7:05 [PATCH v2] Bluetooth: virtio_bt: Use skb_put to set length Soenke Huster
@ 2022-07-27  8:05 ` bluez.test.bot
  2022-10-12  7:45 ` [PATCH v2 RESEND] " Soenke Huster
  1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2022-07-27  8:05 UTC (permalink / raw)
  To: linux-bluetooth, soenke.huster

[-- Attachment #1: Type: text/plain, Size: 1096 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=663357

---Test result---

Test Summary:
CheckPatch                    PASS      1.39 seconds
GitLint                       PASS      0.69 seconds
SubjectPrefix                 PASS      0.52 seconds
BuildKernel                   PASS      33.52 seconds
BuildKernel32                 PASS      28.96 seconds
Incremental Build with patchesPASS      41.43 seconds
TestRunner: Setup             PASS      487.36 seconds
TestRunner: l2cap-tester      PASS      17.07 seconds
TestRunner: bnep-tester       PASS      6.20 seconds
TestRunner: mgmt-tester       PASS      99.23 seconds
TestRunner: rfcomm-tester     PASS      9.42 seconds
TestRunner: sco-tester        PASS      9.27 seconds
TestRunner: smp-tester        PASS      9.29 seconds
TestRunner: userchan-tester   PASS      6.31 seconds



---
Regards,
Linux Bluetooth


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

* [PATCH v2 RESEND] Bluetooth: virtio_bt: Use skb_put to set length
  2022-07-27  7:05 [PATCH v2] Bluetooth: virtio_bt: Use skb_put to set length Soenke Huster
  2022-07-27  8:05 ` [v2] " bluez.test.bot
@ 2022-10-12  7:45 ` Soenke Huster
  2022-10-12  8:21   ` [v2,RESEND] " bluez.test.bot
  2022-10-12 20:00   ` [PATCH v2 RESEND] " patchwork-bot+bluetooth
  1 sibling, 2 replies; 5+ messages in thread
From: Soenke Huster @ 2022-10-12  7:45 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
  Cc: Soenke Huster, Luiz Augusto von Dentz, linux-bluetooth,
	linux-kernel

By using skb_put we ensure that skb->tail is set
correctly. Currently, skb->tail is always zero, which
leads to errors, such as the following page fault in
rfcomm_recv_frame:

    BUG: unable to handle page fault for address: ffffed1021de29ff
    #PF: supervisor read access in kernel mode
    #PF: error_code(0x0000) - not-present page
    RIP: 0010:rfcomm_run+0x831/0x4040 (net/bluetooth/rfcomm/core.c:1751)

Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver")
Signed-off-by: Soenke Huster <soenke.huster@eknoes.de>
---
v2: Add Fixes tag
 drivers/bluetooth/virtio_bt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 67c21263f9e0..fd281d439505 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -219,7 +219,7 @@ static void virtbt_rx_work(struct work_struct *work)
 	if (!skb)
 		return;
 
-	skb->len = len;
+	skb_put(skb, len);
 	virtbt_rx_handle(vbt, skb);
 
 	if (virtbt_add_inbuf(vbt) < 0)
-- 
2.36.1



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

* RE: [v2,RESEND] Bluetooth: virtio_bt: Use skb_put to set length
  2022-10-12  7:45 ` [PATCH v2 RESEND] " Soenke Huster
@ 2022-10-12  8:21   ` bluez.test.bot
  2022-10-12 20:00   ` [PATCH v2 RESEND] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2022-10-12  8:21 UTC (permalink / raw)
  To: linux-bluetooth, soenke.huster

[-- Attachment #1: Type: text/plain, Size: 1262 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=684698

---Test result---

Test Summary:
CheckPatch                    PASS      0.97 seconds
GitLint                       PASS      0.50 seconds
SubjectPrefix                 PASS      0.31 seconds
BuildKernel                   PASS      47.90 seconds
BuildKernel32                 PASS      42.79 seconds
Incremental Build with patchesPASS      62.39 seconds
TestRunner: Setup             PASS      702.33 seconds
TestRunner: l2cap-tester      PASS      21.62 seconds
TestRunner: iso-tester        PASS      22.65 seconds
TestRunner: bnep-tester       PASS      8.55 seconds
TestRunner: mgmt-tester       PASS      137.07 seconds
TestRunner: rfcomm-tester     PASS      13.42 seconds
TestRunner: sco-tester        PASS      12.48 seconds
TestRunner: ioctl-tester      PASS      14.80 seconds
TestRunner: mesh-tester       PASS      10.57 seconds
TestRunner: smp-tester        PASS      12.28 seconds
TestRunner: userchan-tester   PASS      8.83 seconds



---
Regards,
Linux Bluetooth


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

* Re: [PATCH v2 RESEND] Bluetooth: virtio_bt: Use skb_put to set length
  2022-10-12  7:45 ` [PATCH v2 RESEND] " Soenke Huster
  2022-10-12  8:21   ` [v2,RESEND] " bluez.test.bot
@ 2022-10-12 20:00   ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2022-10-12 20:00 UTC (permalink / raw)
  To: Soenke Huster
  Cc: marcel, johan.hedberg, luiz.dentz, luiz.von.dentz,
	linux-bluetooth, linux-kernel

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 12 Oct 2022 09:45:06 +0200 you wrote:
> By using skb_put we ensure that skb->tail is set
> correctly. Currently, skb->tail is always zero, which
> leads to errors, such as the following page fault in
> rfcomm_recv_frame:
> 
>     BUG: unable to handle page fault for address: ffffed1021de29ff
>     #PF: supervisor read access in kernel mode
>     #PF: error_code(0x0000) - not-present page
>     RIP: 0010:rfcomm_run+0x831/0x4040 (net/bluetooth/rfcomm/core.c:1751)
> 
> [...]

Here is the summary with links:
  - [v2,RESEND] Bluetooth: virtio_bt: Use skb_put to set length
    https://git.kernel.org/bluetooth/bluetooth-next/c/6ab8872f1976

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-10-12 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27  7:05 [PATCH v2] Bluetooth: virtio_bt: Use skb_put to set length Soenke Huster
2022-07-27  8:05 ` [v2] " bluez.test.bot
2022-10-12  7:45 ` [PATCH v2 RESEND] " Soenke Huster
2022-10-12  8:21   ` [v2,RESEND] " bluez.test.bot
2022-10-12 20:00   ` [PATCH v2 RESEND] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox