Re: [PATCH v4] Bluetooth: Fix for ACL disconnect when pairing fails

2023-08-17 Thread Muhammad Usama Anjum
> - if (atomic_read(>refcnt)) > + WARN_ON(refcnt < 0); As a fuzzer, syzbot hits this warning quite often. Thanks for adding this WARN_ON. It is indicating that the issue of refcount getting less than 0 is still present. It would be best if a bluetooth dev can have a look at the error paths to resolve this. > + > + /* FIXME: It was observed that in pairing failed scenario, refcnt > + * drops below 0. Probably this is because l2cap_conn_del calls > + * l2cap_chan_del for each channel, and inside l2cap_chan_del conn is > + * dropped. After that loop hci_chan_del is called which also drops > + * conn. For now make sure that ACL is alive if refcnt is higher then 0, > + * otherwise drop it. > + */ > + if (refcnt > 0) > return; > > switch (conn->state) { -- BR, Muhammad Usama Anjum ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: wimax/i2400m: don't change the endianness of one byte variable

2021-02-18 Thread Muhammad Usama Anjum
On Thu, 2021-02-18 at 10:40 +0100, Greg KH wrote: > On Thu, Feb 18, 2021 at 02:21:54PM +0500, Muhammad Usama Anjum wrote: > > It is wrong to change the endianness of a variable which has just one > > byte size. > > > > Sparse warnings fixed: > > drivers/stagi

[PATCH] staging: wimax/i2400m: don't change the endianness of one byte variable

2021-02-18 Thread Muhammad Usama Anjum
/i2400m/op-rfkill.c:159:14: warning: cast to restricted __le32 drivers/staging//wimax/i2400m/op-rfkill.c:160:14: warning: cast to restricted __le32 Signed-off-by: Muhammad Usama Anjum --- drivers/staging/wimax/i2400m/control.c | 4 ++-- drivers/staging/wimax/i2400m/op-rfkill.c | 4 ++-- 2 files

[PATCH] staging: wfx: remove unused included header files

2021-02-11 Thread Muhammad Usama Anjum
Many header files have been included, but never used. Those header files have been removed. Signed-off-by: Muhammad Usama Anjum --- drivers/staging/wfx/bh.c | 1 - drivers/staging/wfx/bh.h | 4 drivers/staging/wfx/bus.h | 3 --- drivers/staging/wfx

Re: [PATCH] staging: wfx: avoid defining array of flexible struct

2021-02-11 Thread Muhammad Usama Anjum
> I think that "#include " is no more necessary. Good catch. I'll send another patch. Thanks, Usama ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: wfx: avoid defining array of flexible struct

2021-02-11 Thread Muhammad Usama Anjum
happy and code simple. Warning from sparse: drivers/stagingwfx/hif_tx.c: note: in included file (through drivers/stagingwfx/data_tx.h, drivers/staging//wfx/wfx.h): drivers/staging//wfx/hif_api_cmd.h:103:26: warning: array of flexible structures Signed-off-by: Muhammad Usama Anjum --- drivers

Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer

2021-02-04 Thread Muhammad Usama Anjum
> Sparse's warning is not about changing the definition of this member > as if it was the argument of a function. It's about how can you use > an array of structure when this structure has a flexible member. We have the following structures in drivers/staging/rtl8192e. (I've simplified them for

[PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer

2020-10-26 Thread Muhammad Usama Anjum
structures drivers/staging/rtl8192e/rtllib.h:821:48: warning: array of flexible structures Signed-off-by: Muhammad Usama Anjum --- drivers/staging/rtl8192e/rtllib.h | 10 +- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 12 ++-- 2 files changed, 11 insertions(+), 11

[PATCH v3] staging: octeon: Add the license identifier

2020-07-23 Thread Muhammad Usama Anjum
the warning. Signed-off-by: Muhammad Usama Anjum --- Changes in v3: - Removed an empty line which I had added in v1 - Updated the commit message to include why this patch is needed drivers/staging/octeon/octeon-stubs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/octeon

[PATCH v2] staging: octeon: Add the license identifier

2020-07-23 Thread Muhammad Usama Anjum
This patch fixes the checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag Add a the SPDX-License-Identifier tag on line 1 Signed-off-by: Muhammad Usama Anjum --- Other files in this folder have GPL-2.0 license. So this file should have the same license which

[PATCH v2] staging: octeon: Indent with tabs instead of spaces

2020-07-23 Thread Muhammad Usama Anjum
Remove a coding style error. It makes code more readable. Signed-off-by: Muhammad Usama Anjum --- Changes in v2: - Aligned more lines with tabs drivers/staging/octeon/ethernet-defines.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/octeon

[PATCH] staging: octeon: Indent with tabs instead of spaces

2020-07-22 Thread Muhammad Usama Anjum
Remove a coding style error. It makes code more readable. Signed-off-by: Muhammad Usama Anjum --- drivers/staging/octeon/ethernet-defines.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/octeon/ethernet-defines.h b/drivers/staging/octeon/ethernet

[PATCH] staging: octeon: Add the license identifier

2020-07-22 Thread Muhammad Usama Anjum
This patch fixes the checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag Add a the SPDX-License-Identifier tag on line 1 Signed-off-by: Muhammad Usama Anjum --- drivers/staging/octeon/octeon-stubs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers