Re: [PATCH] drivers: net: wireless: rtlwifi: fix bool comparison in expressions

2021-01-13 Thread Aditya
On 9/1/21 1:11 am, Larry Finger wrote: > On 1/8/21 9:32 AM, Aditya Srivastava wrote: >> There are certain conditional expressions in rtlwifi, where a boolean >> variable is compared with true/false, in forms such as (foo == true) or >> (false != bar), which does not comp

Re: [PATCH 00/10] rsi: fix comment syntax in file headers

2021-03-15 Thread Aditya
On 15/3/21 2:11 pm, Kalle Valo wrote: > Lukas Bulwahn writes: > >> On Sun, Mar 14, 2021 at 9:18 PM Aditya Srivastava >> wrote: >>> >>> The opening comment mark '/**' is used for highlighting the beginning of >>> kernel-doc comments. >&

[PATCH] drivers: net: wireless: rtlwifi: fix bool comparison in expressions

2021-01-08 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c, "if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava --- -

[PATCH 4/5] rtlwifi: rtl8192se: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
condition, rather than comparing with true/false Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava --- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless

[PATCH 3/5] rtlwifi: rtl8188ee: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c, "if (mac->act_scanning == true)" can be replaced with "if (mac->act_scanning)" Replace all such expressions with the bool variables appropriately Signed

[PATCH 5/5] rtlwifi: rtl8821ae: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
propriately Signed-off-by: Aditya Srivastava --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c index 372d6f8

[PATCH 1/5] rtlwifi: rtl_pci: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c, "if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava ---

[PATCH 2/5] rtlwifi: rtl8192c-common: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
the condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c, "else if (initialized == false) {" can be replaced with "else if (!initialized) {" Replace all such expressions with the bool variables appropriately S

[PATCH 0/5] rtlwifi: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
(mac->act_scanning)" Fix all such expressions with the bool variables appropriately for all the drivers in rtlwifi * The changes made are compile tested. * The patches apply perfectly on next-20210108 Aditya Srivastava (5): rtlwifi: rtl_pci: fix bool comparison in expressions rtlwifi:

[PATCH] net/rds: Avoid potential use after free in rds_send_remove_from_sock

2021-04-06 Thread Aditya Pakki
In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource is freed and later under spinlock, causing potential use-after-free. Set the free pointer to NULL to avoid undefined behavior. Signed-off-by: Aditya Pakki --- net/rds/message.c | 1 + net/rds/send.c| 2 +

[PATCH] SUNRPC: Add a check for gss_release_msg

2021-04-06 Thread Aditya Pakki
In gss_pipe_destroy_msg(), in case of error in msg, gss_release_msg deletes gss_msg. The patch adds a check to avoid a potential double free. Signed-off-by: Aditya Pakki --- net/sunrpc/auth_gss/auth_gss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/auth_gss

[PATCH 00/10] rsi: fix comment syntax in file headers

2021-03-14 Thread Aditya Srivastava
yntax with general format, i.e. "/*", to prevent kernel-doc from parsing it. * The patch series applies perfectly on next-20210312 Aditya Srivastava (10): rsi: rsi_boot_params: fix file header comment syntax rsi: rsi_coex: fix file header comment syntax rsi: rsi_ps: fix file header co

[PATCH 01/10] rsi: rsi_boot_params: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
el-doc from parsing these Signed-off-by: Aditya Srivastava --- drivers/net/wireless/rsi/rsi_boot_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_boot_params.h b/drivers/net/wireless/rsi/rsi_boot_params.h index c1cf19d1e376..30e03aa6a5

[PATCH 03/10] rsi: rsi_ps: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2017 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 05/10] rsi: rsi_mgmt: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 04/10] rsi: rsi_common: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 02/10] rsi: rsi_coex: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2018 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 07/10] rsi: rsi_hal: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2017 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 08/10] rsi: rsi_debugfs: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 06/10] rsi: rsi_main: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 10/10] rsi: rsi_usb: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: Cannot understand * @section LICENSE on line 2 - I thought it was a doc line" Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 09/10] rsi: rsi_sdio: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: Cannot understand * @section LICENSE on line 2 - I thought it was a doc line" Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH v2] rsi: fix comment syntax in file headers

2021-03-15 Thread Aditya Srivastava
comment format, i.e., "/*", to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- - Applies perfectly on next-20210312 Changes in v2: - Convert the patch series to a single patch as suggested by Lukas and Kalle drivers/net/wireless/rsi/rsi_boot_params.h | 2

[PATCH] rsi: Fix NULL pointer dereference in kmalloc

2019-03-02 Thread Aditya Pakki
kmalloc can fail in rsi_register_rates_channels but memcpy still attempts to write to channels. The patch checks and avoids such a situation. Signed-off-by: Aditya Pakki --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net

[PATCH] isdn: mISDN: Fix potential NULL pointer dereference of kzalloc

2019-03-02 Thread Aditya Pakki
Allocating memory via kzalloc for phi may fail and causes a NULL pointer dereference. This patch avoids such a scenario. Signed-off-by: Aditya Pakki --- drivers/isdn/hardware/mISDN/hfcsusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers

[PATCH] net: ethernet: Fix phy_set_max_speed by checking for NULL

2019-03-04 Thread Aditya Pakki
phy_device can be a NULL pointer which is further dereferenced downstream in phy_set_max_speed. This patch avoids such a scenario. Signed-off-by: Aditya Pakki --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom

[PATCH] net/netlink_compat: Fix a missing check of nla_parse_nested

2018-12-23 Thread Aditya Pakki
In tipc_nl_compat_sk_dump(), if nla_parse_nested() fails, it could return an error. To be consistent with other invocations of the function call, on error, the fix passes the return value upstream. Signed-off-by: Aditya Pakki --- net/tipc/netlink_compat.c | 7 +-- 1 file changed, 5

[PATCH] net/net_namespace: Check the return value of register_pernet_subsys()

2018-12-23 Thread Aditya Pakki
In net_ns_init(), register_pernet_subsys() could fail while registering network namespace subsystems. The fix checks the return value and sends a panic() on failure. Signed-off-by: Aditya Pakki --- net/core/net_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH] ipv6/route: Add a missing check on proc_dointvec

2018-12-24 Thread Aditya Pakki
While flushing the cache via ipv6_sysctl_rtcache_flush(), the call to proc_dointvec() may fail. The fix adds a check that returns the error, on failure. Signed-off-by: Aditya Pakki --- net/ipv6/route.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/ipv6/route.c b

[PATCH] batman-adv/main: Fix check on return value of rtnl_link_register

2018-12-24 Thread Aditya Pakki
rtnl_link_register() may fail and can impact registering the device. The fix checks the return value and pushes the error upstream. Signed-off-by: Aditya Pakki --- net/batman-adv/main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/main.c b/net/batman

[PATCH] net: chelsio: Add a missing check on cudg_get_buffer

2018-12-24 Thread Aditya Pakki
cudbg_collect_hw_sched() could fail when the function cudg_get_buffer() returns an error. The fix adds a check to the latter function returning error on failure Signed-off-by: Aditya Pakki --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH] net:phy: Add a return value check on bus write

2018-12-26 Thread Aditya Pakki
xgmiitorgmii_read_status() could fail when writing to the bus via mdiobus_write(). The fix adds a check and returns an error in case of failure. Signed-off-by: Aditya Pakki --- drivers/net/phy/xilinx_gmii2rgmii.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH] net: phy: phy: check return value of bus write

2018-12-26 Thread Aditya Pakki
phy_mii_ioctl() could fail when writing to the bus via mdiobus_write(). The fix adds a check and returns an error in case of failure. Signed-off-by: Aditya Pakki --- drivers/net/phy/phy.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers

[PATCH] [v2] netfilter: ipset: fix a missing check of nla_parse

2019-01-05 Thread Aditya Pakki
When nla_parse fails, we should not use the results (the first argument). The fix checks if it fails, and if so, returns its error code upstream. Signed-off-by: Aditya Pakki --- net/netfilter/ipset/ip_set_core.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net

[PATCH] test_objagg: Fix potential memory leak in error handling

2020-06-12 Thread Aditya Pakki
In case of failure of check_expect_hints_stats(), the resources allocated by objagg_hints_get should be freed. The patch fixes this issue. Signed-off-by: Aditya Pakki --- lib/test_objagg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/test_objagg.c b/lib

[PATCH] net: ethernet: Fix potential memory leak caused in error handling

2020-06-12 Thread Aditya Pakki
In ethoc_probe, a failure of mdiobus_register() does not release the memory allocated by mdiobus_alloc. The patch fixes this issue. Signed-off-by: Aditya Pakki --- drivers/net/ethernet/ethoc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ethoc.c b

[PATCH] rocker: fix incorrect error handling in dma_rings_init

2020-06-12 Thread Aditya Pakki
In rocker_dma_rings_init, the goto blocks in case of errors caused by the functions rocker_dma_cmd_ring_waits_alloc() and rocker_dma_ring_create() are incorrect. The patch fixes the order consistent with cleanup in rocker_dma_rings_fini(). Signed-off-by: Aditya Pakki --- drivers/net/ethernet

[PATCH] net: Fix a potential incorrect error handling in rawsock_connect

2020-06-12 Thread Aditya Pakki
In rawsock_connect, the device is allocated by calling nfc_get_device. In case of incorrect bounds index, the device should be freed by calling nfc_put_device. The patch fixes this issue. Signed-off-by: Aditya Pakki --- net/nfc/rawsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion