-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: L2CAP: Set NULL callback for PDUs #76489
Bluetooth: L2CAP: Set NULL callback for PDUs #76489
Conversation
Print user_data and callback pointers. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
8b4da08
to
a1a0e77
Compare
Werror fails the build on that function. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
a1a0e77
to
0ad4d6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing initialization of loop variable needs to be fixed; the others are optional
Storing stuff in user_data? That's a paddlin' We have been debugging issue after issue because ownership of this "user" data is not clearly defined. Now it is. L2CAP owns the user_data field entirely, as soon as `send()` is called. Also add a warning and retval using CHECKIF. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
85be2d9
to
66401f0
Compare
@@ -14,8 +14,15 @@ extern enum bst_result_t bst_result; | |||
static struct bt_conn *default_conn; | |||
|
|||
#define PSM 0x80 | |||
#define DATA_SIZE 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to make sure we have many K-Frames (PDUs) to send an SDU. Since the bug was discovered with K-frames in the middle of an SDU.
Modify the test so it checks that user_data is used and then cleared by the stack. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
It's already done. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
It was not being set, and thus if the user_data contained garbage from before, then conn.c would attempt to call that garbage. Static channels don't have this issue, as every "SDU" fits into one PDU. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> Co-authored-by: Huajiang Zheng <nxf88597@lsv051208.swis.nl-cdc01.nxp.com>
66401f0
to
e21a121
Compare
Sneak peek: @alwa-nordic and I are trying to get rid of |
When user_data is not zeroed-out, the API returns an error. Downgrade the API error to a warning log instead. Introducing this check (zephyrproject-rtos#76489) broke a few PTS tests, as user_data is not initialized by `net_buf_alloc()`. Doing so is in discussion (see Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When user_data is not zeroed-out, the API returns an error. Downgrade the API error to a warning log instead. Introducing this check (zephyrproject-rtos#76489) broke a few PTS tests, as user_data is not initialized by `net_buf_alloc()`. Doing so is in discussion (see Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When user_data is not zeroed-out, the API returns an error. Downgrade the API error to a warning log instead. Introducing this check (zephyrproject-rtos#76489) broke a few PTS tests, as user_data is not initialized by `net_buf_alloc()`. Doing so is in discussion: zephyrproject-rtos#77088 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When user_data is not zeroed-out, the API returns an error. Downgrade the API error to a warning log instead. Introducing this check (#76489) broke a few PTS tests, as user_data is not initialized by `net_buf_alloc()`. Doing so is in discussion: #77088 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When user_data is not zeroed-out, the API returns an error. Downgrade the API error to a warning log instead. Introducing this check (#76489) broke a few PTS tests, as user_data is not initialized by `net_buf_alloc()`. Doing so is in discussion: #77088 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> (cherry picked from commit 6fa6c4c)
When user_data is not zeroed-out, the API returns an error. Downgrade the API error to a warning log instead. Introducing this check (zephyrproject-rtos#76489) broke a few PTS tests, as user_data is not initialized by `net_buf_alloc()`. Doing so is in discussion: zephyrproject-rtos#77088 (cherry picked from commit 6fa6c4c) Original-Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> GitOrigin-RevId: 6fa6c4c Cr-Build-Id: 8739091610579900001 Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8739091610579900001 Copybot-Job-Name: zephyr-main-copybot-downstream Change-Id: Ic115fe0bdfe6595a874c7782cd8385c49f99405c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5799351 Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
It was not being set, and thus if the user_data contained garbage from
before, then conn.c would attempt to call that garbage.
Static channels don't have this issue, as every "SDU" fits into one PDU.
Watch the test fail:
CONFIG_NO_RUNTIME_CHECKS=y
toprj.conf