Re: [PATCH v2] drivers/misc/vmw_vmci: restrict too big queue size in

2021-02-09 Thread Alex Dewar
On 09/02/2021 09:31, Sabyrzhan Tasbolatov wrote: syzbot found WARNING in qp_broker_alloc[1] in qp_host_alloc_queue() when num_pages is 0x11, giving queue_size + queue_page_size bigger than KMALLOC_MAX_SIZE for kzalloc(), resulting order >= MAX_ORDER condition. queue_size + queue_page_size=0x

How to port rtl8xxxu to new device...?

2021-01-17 Thread Alex Dewar
Hi all, I'm currently trying to port the rtl8xxxu driver to RTL8822u chips (one of which I own), but I'm finding it hard to figure out where to start and I figured that some wiser minds could maybe help steer me in the right direction. I've managed to get as far as reading and writing to various

Re: BCM20702A0 bluetooth dongle not working

2020-11-14 Thread Alex Dewar
iver here that'd be great. Best, Alex On 13/11/2020 17:45, Alex Dewar wrote: Hi all! I've just got a Broadcom BCM20702A0 USB Bluetooth dongle but it seems not to be working :-(. Whenever I search for devices only their MAC addresses appear (not their names) and I can't seem to

BCM20702A0 bluetooth dongle not working

2020-11-13 Thread Alex Dewar
Hi all! I've just got a Broadcom BCM20702A0 USB Bluetooth dongle but it seems not to be working :-(. Whenever I search for devices only their MAC addresses appear (not their names) and I can't seem to pair with them. Logs are below. Any help would be massively appreciated :-) Alex Here's

Re: [PATCH] net/sunrpc: Fix return value from proc_do_xprt()

2020-11-07 Thread Alex Dewar
nd sorry for the noise! > > On Sat, Oct 24, 2020 at 03:52:40PM +0100, Alex Dewar wrote: > > Commit c09f56b8f68d ("net/sunrpc: Fix return value for sysctl > > sunrpc.transports") attempted to add error checking for the call to > > memory_read_from_buffer(), however

Re: [PATCH 2/2] ath11k: Handle errors if peer creation fails

2020-11-07 Thread Alex Dewar
On Sat, Nov 07, 2020 at 01:23:30PM +0200, Kalle Valo wrote: > Alex Dewar writes: > > > On Tue, Oct 06, 2020 at 10:26:28AM +0300, Kalle Valo wrote: > >> Alex Dewar writes: > >> > >> > ath11k_peer_create() is called without its return value being checke

[PATCH] net/sunrpc: Fix return value from proc_do_xprt()

2020-10-24 Thread Alex Dewar
s-Coverity-ID: 1498033: Control flow issues (NO_EFFECT) Fixes: c09f56b8f68d ("net/sunrpc: Fix return value for sysctl sunrpc.transports") Signed-off-by: Alex Dewar --- net/sunrpc/sysctl.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/sysctl.c b

[PATCH 2/2] staging: media: atomisp: Remove unused function

2020-10-17 Thread Alex Dewar
The function ia_css_mipi_frame_specify() is not called from anywhere and the comment above its declaration states that it should be removed when there are no more users. So remove it. Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/pci/ia_css_mipi.h | 17 - drivers

[PATCH 1/2] staging: media: atomisp: Remove unnecessary if statement

2020-10-17 Thread Alex Dewar
The bodies of the if and else sections are the same, so just remove the check. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/pci/atomisp_cmd.c | 27 +-- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b

[PATCH 1/3] staging: media: atomisp: Fix error path in lm3554_probe()

2020-10-17 Thread Alex Dewar
esource leaks") Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Alex Dewar Reviewed-by: Dan Carpenter --- v5: Check for error, not success (Dan), but do it correctly cf. v4 :) v4: Rebase v3: No changes v2: Fix a couple more leaks on error p

[PATCH 3/3] staging: media: atomisp: Don't abort on error in module exit path

2020-10-17 Thread Alex Dewar
The function lm3554_remove() checks for the return code for lm3554_gpio_uninit() even though this is on the exit path and exits the function, leaving the variable flash unfreed. Instead, print a warning and free flash unconditionally. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/i2c

[PATCH 0/3] Fixes and cleanups for atomisp

2020-10-17 Thread Alex Dewar
Hi Mauro, I'm reposting this series [1] as, following the merge window, it now cleanly applies to both Linus' tree and to linux-next. I've made a minor fix to patch #1 (see patch for details) but the other two patches have just been rebased. Best, Alex [1] See https://lore.kernel.org/lkml/20200

[PATCH 2/3] staging: media: atomisp: Remove unhelpful info message

2020-10-17 Thread Alex Dewar
We don't really need to know that the LED pin reset successfully. Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/at

Re: [PATCH] net: sockmap: Don't call bpf_prog_put() on NULL pointer

2020-10-14 Thread Alex Dewar
On 14/10/2020 10:32, Jakub Sitnicki wrote: On Mon, Oct 12, 2020 at 07:09 PM CEST, Alex Dewar wrote: If bpf_prog_inc_not_zero() fails for skb_parser, then bpf_prog_put() is called unconditionally on skb_verdict, even though it may be NULL. Fix and tidy up error path. Addresses-Coverity-ID

[PATCH] net: sockmap: Don't call bpf_prog_put() on NULL pointer

2020-10-12 Thread Alex Dewar
t and skb_parser programs explicitly") Signed-off-by: Alex Dewar --- net/core/sock_map.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/net/core/sock_map.c b/net/core/sock_map.c index df09c39a4dd2..a73ccce54423 100644 --- a/net/core/sock_map.c +++

[PATCH] RDMA/rxe: Fix possible NULL pointer dereference

2020-10-12 Thread Alex Dewar
Signed-off-by: Alex Dewar --- drivers/infiniband/sw/rxe/rxe_recv.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c index 11f3daf20768..a65936e12f89 100644 --- a/drivers/infiniband/sw/rxe/

Re: [PATCH] bcache: Use #ifdef instead of boolean variable

2020-10-10 Thread Alex Dewar
On Sat, Oct 10, 2020 at 10:05:22AM +0800, Coly Li wrote: > On 2020/10/10 07:00, Rasmus Villemoes wrote: > > On 09/10/2020 20.34, Alex Dewar wrote: > >> The variable async_registration is used to indicate whether or not > >> CONFIG_BCACHE_ASYNC_REGISTRATION is e

Re: [PATCH v2] PCI: keystone: Enable compile-testing on !ARM

2020-10-10 Thread Alex Dewar
On 30/09/2020 19:21, Rob Herring wrote: On Sun, 06 Sep 2020 20:51:27 +0100, Alex Dewar wrote: Currently the Keystone driver can only be compile-tested on ARM, but this restriction seems unnecessary. Get rid of it to increase test coverage. Build-tested with allyesconfig on x86, ppc, mips and

[PATCH] bcache: Use #ifdef instead of boolean variable

2020-10-09 Thread Alex Dewar
97746: Control flow issues (DEADCODE) Signed-off-by: Alex Dewar --- drivers/md/bcache/super.c | 40 +-- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 46a00134a36a..6d4127881c6a 100644

Re: [PATCH] net/mlx5e: Fix freeing of unassigned pointer

2020-10-07 Thread Alex Dewar
On Tue, Oct 06, 2020 at 04:22:12PM -0700, Saeed Mahameed wrote: > On Sat, 2020-10-03 at 12:10 +0100, Alex Dewar wrote: > > Commit ff7ea04ad579 ("net/mlx5e: Fix potential null pointer > > dereference") > > added some missing null checks but the error handling in

Re: [PATCH 2/2] ath11k: Handle errors if peer creation fails

2020-10-06 Thread Alex Dewar
On Tue, Oct 06, 2020 at 10:26:28AM +0300, Kalle Valo wrote: > Alex Dewar writes: > > > ath11k_peer_create() is called without its return value being checked, > > meaning errors will be unhandled. Add missing check and, as the mutex is > > unconditionally unlocked

[PATCH] ASoC: omap-mcbsp: Fix use of uninitialised pointer

2020-10-04 Thread Alex Dewar
ion split") Signed-off-by: Alex Dewar --- sound/soc/ti/omap-mcbsp.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index 186cea91076f..6025b30bbe77 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/

[PATCH 2/2] ath11k: Handle errors if peer creation fails

2020-10-04 Thread Alex Dewar
ot;) Fixes: 701e48a43e15 ("ath11k: add packet log support for QCA6390") Signed-off-by: Alex Dewar --- drivers/net/wireless/ath/ath11k/mac.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/at

[PATCH 1/2] ath11k: Fix memory leak on error path

2020-10-04 Thread Alex Dewar
In ath11k_mac_setup_iface_combinations(), if memory cannot be assigned for the variable limits, then the memory assigned to combinations will be leaked. Fix this. Addresses-Coverity-ID: 1497534 ("Resource leaks") Fixes: 2626c269702e ("ath11k: add interface_modes to hw_params")

[PATCH] net/mlx5e: Fix freeing of unassigned pointer

2020-10-03 Thread Alex Dewar
. Fix this. Addresses-Coverity-ID: 1497536 ("Memory - illegal accesses") Fixes: ff7ea04ad579 ("net/mlx5e: Fix potential null pointer dereference") Signed-off-by: Alex Dewar --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 17 + 1 file changed, 9 insertions(+)

[PATCH v2] net/mlx5e: Fix use of freed pointer

2020-09-29 Thread Alex Dewar
quot;net/mlx5e: CT: Use the same counter for both directions") Signed-off-by: Alex Dewar --- v2: - Add Fixes tag (Leon) - Use ERR_CAST (Leon) Hi Leon, I've made the suggested changes. Let me know if there's anything else you need :) There is also this patch in t

[PATCH] dpaa2-mac: Fix potential null pointer dereference

2020-09-27 Thread Alex Dewar
In dpaa2_pcs_destroy, variable pcs is dereference before it is null-checked. Fix this. Addresses-Coverity: CID 1497159: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Alex Dewar --- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH] ath11k: Correctly check errors for calls to debugfs_create_dir()

2020-09-27 Thread Alex Dewar
accesses (USE_AFTER_FREE) Addresses-Coverity: CID 1497160: Memory - illegal accesses (USE_AFTER_FREE) Signed-off-by: Alex Dewar --- drivers/net/wireless/ath/ath11k/debugfs.c | 25 +-- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k

[PATCH 3/3] net/mlx5e: Fix use of freed pointer

2020-09-27 Thread Alex Dewar
If the call to mlx5_fc_create() fails, then shared_counter will be freed before its member, shared_counter->counter, is accessed to retrieve the error code. Fix by using an intermediate variable. Addresses-Coverity: CID 1497153: Memory - illegal accesses (USE_AFTER_FREE) Signed-off-by: Alex De

[PATCH 0/3] net/mlx5e: Fix some static analysis warnings

2020-09-27 Thread Alex Dewar
Hi, Coverity has flagged up some warnings for this driver, which I address in this patch series. All the fixes are fairly trivial and have been build-tested. Best, Alex

[PATCH 2/3] net/mlx5e: Clean up error handling in mlx5e_alloc_flow()

2020-09-27 Thread Alex Dewar
-off-by: Alex Dewar --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 20 ++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index b3c57b984a2a..ed308407be6f 100644

[PATCH 1/3] net/mlx5e: Fix possible null pointer dereference

2020-09-27 Thread Alex Dewar
(FORWARD_NULL) Signed-off-by: Alex Dewar --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index f815b0c60a6c..b3c57b984a2a

Re: [PATCH v2] ath10k: sdio: remove redundant check in for loop

2020-09-27 Thread Alex Dewar
> I agree. Anyone can come up with a patch? Hi Kalle, I was thinking of having a go at this. Have you applied the v2 of this patch yet though? I couldn't see it in wireless-drivers-next. I just don't want to have to rebase the patch if you were going to apply this v2. Best, Alex > > -- > http

[PATCH] wl3501_cs: Remove unnecessary NULL check

2020-09-26 Thread Alex Dewar
ned-off-by: Alex Dewar --- drivers/net/wireless/wl3501_cs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 4e7a2140649b..026e88b80bfc 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wirel

[PATCH v3] net: dsa: mt7530: Add some return-value checks

2020-09-24 Thread Alex Dewar
call stack. Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") Addresses-Coverity: 1496993 ("Uninitialized variables") Signed-off-by: Alex Dewar --- Hi Landen, Here you go! v3: - fix checkpatch warning about braces (Landen) v2:

Re: [PATCH v2] net: dsa: mt7530: Add some return-value checks

2020-09-24 Thread Alex Dewar
On 2020-09-24 13:13, Landen Chao wrote: Hi Alex, Thanks for your patch. By linux/scripts/checkpatch.pl On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote: [..] @@ -1631,9 +1635,11 @@ mt7530_setup(struct dsa_switch *ds) mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK

Re: [PATCH REBASE 0/3] atomisp: Rebased fixes

2020-09-22 Thread Alex Dewar
[snip] > > That sounds more sensible. I've also just noticed that I introduced a bug in > > the first patch when rebasing it :-/, so let's hold off on the whole series > > and I'll do a proper tidy and resend after the next merge window. > > Is the bug the memory leak if lm3554_platform_data_func(

Re: [PATCH REBASE 0/3] atomisp: Rebased fixes

2020-09-22 Thread Alex Dewar
On 22/09/2020 10:27, Mauro Carvalho Chehab wrote: Em Tue, 22 Sep 2020 10:09:07 +0100 Alex Dewar escreveu: Hi Mauro, I've rebased the patches now, but there is a slight hiccup. For patches 2 and 3 of this series there will now be a conflict with commit 9289cdf39992 ("staging: medi

[PATCH REBASE 3/3] staging: media: atomisp: Don't abort on error in module exit path

2020-09-22 Thread Alex Dewar
The function lm3554_remove() checks for the return code for lm3554_gpio_uninit() even though this is on the exit path and exits the function, leaving the variable flash unfreed. Instead, print a warning and free flash unconditionally. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/i2c

[PATCH REBASE 2/3] staging: media: atomisp: Remove unhelpful info message

2020-09-22 Thread Alex Dewar
We don't really need to know that the LED pin reset successfully. Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/at

[PATCH REBASE 0/3] atomisp: Rebased fixes

2020-09-22 Thread Alex Dewar
Hi Mauro, I've rebased the patches now, but there is a slight hiccup. For patches 2 and 3 of this series there will now be a conflict with commit 9289cdf39992 ("staging: media: atomisp: Convert to GPIO descriptors") in Greg's tree. I'm not sure what the best way to handle this is? The merge confl

[PATCH REBASE 1/3] staging: media: atomisp: Fix error path in lm3554_probe()

2020-09-22 Thread Alex Dewar
esource leaks") Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Alex Dewar Reviewed-by: Dan Carpenter --- .../media/atomisp/i2c/atomisp-lm3554.c| 48 +++ 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/

Re: [PATCH RESEND 0/5] atomisp: Fixes and cleanups

2020-09-22 Thread Alex Dewar
On 22/09/2020 09:11, Mauro Carvalho Chehab wrote: Em Mon, 21 Sep 2020 22:53:49 +0100 Alex Dewar escreveu: Hi Mauro, Over the last month I've sent a few scattered patches to fix various warnings from static analysers, but they seem to have fallen through the cracks? I'm reposting th

[PATCH RESEND 5/5] staging: media: atomisp: Fix bool-related style issues

2020-09-21 Thread Alex Dewar
-off-by: Alex Dewar --- .../staging/media/atomisp/pci/atomisp_cmd.c | 5 ++--- drivers/staging/media/atomisp/pci/sh_css.c| 20 +-- .../media/atomisp/pci/sh_css_firmware.c | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/staging/media

[PATCH RESEND 4/5] staging: media: atomisp: Don't abort on error in module exit path

2020-09-21 Thread Alex Dewar
The function lm3554_remove() checks for the return code for lm3554_gpio_uninit() even though this is on the exit path and exits the function, leaving the variable flash unfreed. Instead, print a warning and free flash unconditionally. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/i2c

[PATCH RESEND 3/5] staging: media: atomisp: Don't do unnecessary zeroing of memory

2020-09-21 Thread Alex Dewar
In a few places in pci/sh_css_params.c, memset is used to zero memory immediately before it is freed. As none of these structs appear to contain sensitive information, just remove the calls to memset. Suggested-by: Dan Carpenter Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/pci

[PATCH RESEND 1/5] staging: media: atomisp: Fix error path in lm3554_probe()

2020-09-21 Thread Alex Dewar
esource leaks") Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Alex Dewar Reviewed-by: Dan Carpenter --- .../media/atomisp/i2c/atomisp-lm3554.c| 53 +++ 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/

[PATCH RESEND 2/5] staging: media: atomisp: Remove unhelpful info message

2020-09-21 Thread Alex Dewar
We don't really need to know that the LED pin reset successfully. Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/at

[PATCH RESEND 0/5] atomisp: Fixes and cleanups

2020-09-21 Thread Alex Dewar
Hi Mauro, Over the last month I've sent a few scattered patches to fix various warnings from static analysers, but they seem to have fallen through the cracks? I'm reposting them here as a series to make them easier to review. If you do have any feedback that'd be great :) Best, Alex

[PATCH v2] staging: hikey9xx: Fix incorrect assignment

2020-09-21 Thread Alex Dewar
97107: Incorrect expression (COPY_PASTE_ERROR) Signed-off-by: Alex Dewar --- v2: Fix my email address and a typo in title drivers/staging/hikey9xx/phy-hi3670-usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.c b/drivers/staging/hik

[PATCH v2] PCI: brcmstb: Add missing if statement and error path

2020-09-21 Thread Alex Dewar
e that this bug means that this driver will not resume properly. Fixes: ad3d29c77e1e ("PCI: brcmstb: Add control of rescal reset") Addresses-Coverity: CID 1497099: Control flow issues (UNREACHABLE) Signed-off-by: Alex Dewar --- Hi Jim, Here's a new version of the patch. I added the

[PATCH] PCI: brcmstb: Add missing if statement

2020-09-21 Thread Alex Dewar
roperly. Fixes: ad3d29c77e1e ("PCI: brcmstb: Add control of rescal reset") Addresses-Coverity: CID 1497099: Control flow issues (UNREACHABLE) Signed-off-by: Alex Dewar --- drivers/pci/controller/pcie-brcmstb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/pcie

[PATCH] btrfs: Fix potential null pointer deref

2020-09-21 Thread Alex Dewar
newly allocated") Addresses-Coverity: CID 1497103: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Alex Dewar --- fs/btrfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a5dae53c1e27..8f230b7bfe65 100644 ---

[PATCH] staging: hikey9xx: Fix incorrect assignement

2020-09-21 Thread Alex Dewar
97107: Incorrect expression (COPY_PASTE_ERROR) Signed-off-by: Alex Dewar --- drivers/staging/hikey9xx/phy-hi3670-usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.c b/drivers/staging/hikey9xx/phy-hi3670-usb3.c index 42dbc20a0b9a..4fc

Re: [PATCH] drm/bridge: dw-mipi-dsi: Use kmemdup cf. kmalloc+memcpy

2020-09-21 Thread Alex Dewar
Hmm, I applied this already: commit 33f290811d4c1a09c4e92f5bf0458525835dbcba Author: Alex Dewar Date: Wed Sep 9 20:02:08 2020 +0100 drm/bridge: dw-mipi-dsi: Use kmemdup cf. kmalloc+memcpy kmemdup can be used instead of kmalloc+memcpy. Replace an occurrence of this pattern

Re: [PATCH v2] staging: media: atomisp: Fix error path in lm3554_probe()

2020-09-19 Thread Alex Dewar
On 2020-09-03 19:24, Alex Dewar wrote: The error path for lm3554_probe() contains a number of bugs, including: * resource leaks * jumping to error labels out of sequence * not setting the return value appropriately Ping? Fix it up and give the labels more memorable names. This issue

Re: [PATCH 2/2] staging: media: atomisp: Remove unhelpful info message

2020-09-19 Thread Alex Dewar
On 2020-09-03 19:31, Alex Dewar wrote: We don't really need to know that the LED pin reset successfully. Ping? Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/at

Re: [PATCH] power: supply: charger-manager: Tidy function

2020-09-19 Thread Alex Dewar
On 2020-09-02 17:58, Alex Dewar wrote: check_charging_duration() contains some copy-pasted code, which makes it less readable. Refactor the function to be a bit tidier. Ping? I've also fixed a couple of typos. Signed-off-by: Alex Dewar --- drivers/power/supply/charger-manager.c

Re: [PATCH] drm/bridge: dw-mipi-dsi: Use kmemdup cf. kmalloc+memcpy

2020-09-19 Thread Alex Dewar
On 2020-09-11 13:57, Neil Armstrong wrote: On 09/09/2020 21:02, Alex Dewar wrote: kmemdup can be used instead of kmalloc+memcpy. Replace an occurrence of this pattern. Friendly ping? Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/gpu/drm/bridge/synopsys/dw-mipi

Re: [PATCH] staging: media: atomisp: Don't do unnecessary zeroing of memory

2020-09-19 Thread Alex Dewar
On 2020-09-09 21:48, Alex Dewar wrote: In a few places in pci/sh_css_params.c, memset is used to zero memory immediately before it is freed. As none of these structs appear to contain sensitive information, just remove the calls to memset. Friendly ping? Suggested-by: Dan Carpenter Signed

Re: [PATCH v2] PCI: keystone: Enable compile-testing on !ARM

2020-09-19 Thread Alex Dewar
On 2020-09-06 20:51, Alex Dewar wrote: Currently the Keystone driver can only be compile-tested on ARM, but this restriction seems unnecessary. Get rid of it to increase test coverage. Friendly ping? Build-tested with allyesconfig on x86, ppc, mips and riscv. Signed-off-by: Alex Dewar

[PATCH v2] net: dsa: mt7530: Add some return-value checks

2020-09-19 Thread Alex Dewar
call stack. Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") Addresses-Coverity: 1496993 ("Uninitialized variables") Signed-off-by: Alex Dewar --- v2: - fix typo in commit message - split variable declarations onto multiple lines (Gu

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Alex Dewar
On Wed, Sep 16, 2020 at 08:50:17PM +0100, Alex Dewar wrote: > In mt7531_cpu_port_config(), if the variable port is neither 5 nor 5, This should read "neither 5 nor 6", obviously. I'll fix in v2.

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Alex Dewar
[snip] > > > > /* Enable Mediatek header mode on the cpu port */ > > mt7530_write(priv, MT7530_PVC_P(port), > > @@ -2275,7 +2279,7 @@ mt7531_cpu_port_config(struct dsa_switch *ds, int > > port) > > { > > struct mt7530_priv *priv = ds->priv; > > phy_interface_t interface; > > -

[PATCH] i40e: Fix use of uninitialized variable

2020-09-16 Thread Alex Dewar
quot;) Signed-off-by: Alex Dewar --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c index 6acede0acdca..18c05d23e15e 100644 --- a/drivers/net

Re: [PATCH] SVM: nSVM: fix resource leak on error path

2020-09-16 Thread Alex Dewar
On Tue, Sep 15, 2020 at 11:15:02AM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 12:07:25PM +0300, Maxim Levitsky wrote: > > I think that this patch is based on unmerged patch, since I don't see > > any memory allocation in nested_svm_vmrun_msrpm, nor out_free label. > > in nether kvm/mas

[PATCH v2] ath10k: sdio: remove redundant check in for loop

2020-09-16 Thread Alex Dewar
;Null pointer dereferences) Suggested-by: Saeed Mahameed Signed-off-by: Alex Dewar --- v2: refactor in the manner suggested by Saeed drivers/net/wireless/ath/ath10k/sdio.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/driver

[PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Alex Dewar
sa: mt7530: Add the support of MT7531 switch") Signed-off-by: Alex Dewar --- If it is not expected that these functions will throw errors (i.e. because the parameters passed will always be correct), we could dispense with the use of EINVAL errors and just use BUG*() macros instead. Let me kn

Re: [PATCH] ath10k: sdio: remove reduntant check in for loop

2020-09-16 Thread Alex Dewar
[snip] 'i' is only referenced once inside the loop to check boundary, the loop is actually iterating over cur_section, so i would make it clear in the loop statement, e.g.: Remove the break condition and the cur_section assignment at the end of the loop and use the loop statement to do it for yo

[PATCH] media: vidtv: fix time conversion error

2020-09-16 Thread Alex Dewar
: 1496996 ("Integer handling issues") Fixes: f90cf6079bf6 ("media: vidtv: add a bridge driver") Signed-off-by: Alex Dewar --- drivers/media/test-drivers/vidtv/vidtv_mux.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/test-drivers/vidtv/vi

Re: [PATCH RFC 0/3] scsi: mpt: Refactor and port to dma_* interface

2020-09-16 Thread Alex Dewar
On Tue, Sep 15, 2020 at 10:12:06PM -0400, Martin K. Petersen wrote: > > Alex, > > > Any feedback would be greatly appreciated! > > Have you tested your changes? No, as I'm afraid I don't have the hardware. For patch #1 though, I'm not sure that's such an issue, as the refactoring was really si

[PATCH] mtd: rawnand: atmel: Check return values for nand_read_data_op

2020-09-14 Thread Alex Dewar
In atmel_nand_pmecc_read_pg(), nand_read_data_op() is called twice without the return values being checked for errors. Add these checks. Signed-off-by: Alex Dewar --- drivers/mtd/nand/raw/atmel/nand-controller.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a

[PATCH] SVM: nSVM: fix resource leak on error path

2020-09-14 Thread Alex Dewar
In svm_set_nested_state(), if nested_svm_vmrun_msrpm() returns false, then variables save and ctl will leak. Fix this. Fixes: 772b81bb2f9b ("SVM: nSVM: setup nested msr permission bitmap on nested state load") Signed-off-by: Alex Dewar --- arch/x86/kvm/svm/nested.c | 2 +- 1 file

[PATCH] ath10k: sdio: remove reduntant check in for loop

2020-09-14 Thread Alex Dewar
erity: 1496984 ("Null pointer dereferences) Signed-off-by: Alex Dewar --- drivers/net/wireless/ath/ath10k/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 81ddaafb6721..f31ab2ec2

Re: linux-next: build failure after merge of the nand tree

2020-09-14 Thread Alex Dewar
On Mon, Sep 14, 2020 at 11:45:52AM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the nand tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/mtd/nand/onenand/onenand_omap2.c:27:10: fatal error: > asm/mach/flash.h: No such file or directory >27 |

Re: [PATCH] scripts: kzfree.cocci: Deprecate use of kzfree

2020-09-11 Thread Alex Dewar
more noise! On 9/11/20 4:49 PM, Alex Dewar wrote: kzfree() is effectively deprecated as of commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()"). It is currently just a legacy alias for kfree_sensitive(), which achieves the same thing. Update kzfree.cocci accordin

Re: [PATCH] security: keys: Use kvfree_sensitive in a few places

2020-09-11 Thread Alex Dewar
On 2020-09-11 17:05, Denis Efremov wrote: Hi, same patch https://lkml.org/lkml/2020/8/27/168 Thanks, Denis Ah ok. Sorry for the noise! On 9/11/20 2:44 PM, Alex Dewar wrote: In big_key.c, there are a few places where memzero_explicit + kvfree is used. It is better to use kvfree_sensitive

[PATCH] iommu: fsl_pamu: Replace use of kzfree with kfree_sensitive

2020-09-11 Thread Alex Dewar
kzfree() is effectively deprecated as of commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") and is now simply an alias for kfree_sensitive(). So just replace it with kfree_sensitive(). Signed-off-by: Alex Dewar --- drivers/iommu/fsl_pamu.c | 2 +- 1 file

[PATCH v2] security: keys: Use kvfree_sensitive in a few places

2020-09-11 Thread Alex Dewar
In big_key.c, there are a few places where memzero_explicit + kvfree is used. Replace these with a single call to kvfree_sensitive, to make the code more readable. Signed-off-by: Alex Dewar --- v2 - Update commit message as per James Bottomley's suggestion security/keys/big_key.

[PATCH] scripts: kzfree.cocci: Deprecate use of kzfree

2020-09-11 Thread Alex Dewar
ensitive 2) Merge different rules for memset/memset_explicit as kzfree and kfree_sensitive are now equivalent 3) Rename script to kfree_sensitive.cocci In addition: 4) Move the script to the free/ subfolder, where it would seem to fit better Signed-off-by: Alex Dewar --- .../kfree_sensi

[PATCH] security: keys: Use kvfree_sensitive in a few places

2020-09-11 Thread Alex Dewar
In big_key.c, there are a few places where memzero_explicit + kvfree is used. It is better to use kvfree_sensitive instead, which is more readable and also prevents the compiler from eliding the call to memzero_explicit. Fix this. Signed-off-by: Alex Dewar --- security/keys/big_key.c | 9

[PATCH] net: mvpp2: ptp: Fix unused variables

2020-09-10 Thread Alex Dewar
initialised. Fix by assigning to link the value of the bit test. Build-tested on x86. Fixes: 36cfd3a6e52b ("net: mvpp2: restructure "link status" interrupt handling") Signed-off-by: Alex Dewar --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 6 ++ 1 file changed, 2 insert

[PATCH] staging: media: atomisp: Don't do unnecessary zeroing of memory

2020-09-09 Thread Alex Dewar
In a few places in pci/sh_css_params.c, memset is used to zero memory immediately before it is freed. As none of these structs appear to contain sensitive information, just remove the calls to memset. Suggested-by: Dan Carpenter Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/pci

Re: [PATCH] staging: media: atomisp: Use kvfree_sensitive in a few places

2020-09-09 Thread Alex Dewar
On 2020-09-09 21:06, Dan Carpenter wrote: On Wed, Sep 09, 2020 at 08:53:50PM +0100, Alex Dewar wrote: In the file pci/sh_css_params.c, there are a number of places where memset+kvfree is used, where kvfree_sensitive could be used instead. Fix these occurrences. This doesn't say *why

Re: [PATCH 1/2] w1: Use kfree_sensitive instead of memset+kfree

2020-09-09 Thread Alex Dewar
On 2020-09-09 20:41, Alex Dewar wrote: Issue identified with Coccinelle. Hmm, on second thoughts, I'm not sure this memory is so sensitive after all. Should we just remove the call to memset? Signed-off-by: Alex Dewar --- drivers/w1/w1.c | 3 +-- 1 file changed, 1 insertion(

[PATCH] staging: media: atomisp: Use kvfree_sensitive in a few places

2020-09-09 Thread Alex Dewar
In the file pci/sh_css_params.c, there are a number of places where memset+kvfree is used, where kvfree_sensitive could be used instead. Fix these occurrences. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/pci/sh_css_params.c | 19

[PATCH 2/2] w1: Remove pointless debug code

2020-09-09 Thread Alex Dewar
It doesn't seem obvious why zeroing sl before freeing it would help with debugging, so just remove this code. Signed-off-by: Alex Dewar --- drivers/w1/w1.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 4f597b0fd1da..02a0e66144a4 100644

[PATCH 1/2] w1: Use kfree_sensitive instead of memset+kfree

2020-09-09 Thread Alex Dewar
Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/w1/w1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index e58c7592008d..4f597b0fd1da 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -71,8 +71,7 @@ static

[PATCH] ima: Use kmemdup rather than kmalloc+memcpy

2020-09-09 Thread Alex Dewar
Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- security/integrity/ima/ima_policy.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index b4de33074b37..1de3140b334f 100644

Re: [PATCH] fs: omfs: use kmemdup() rather than kmalloc+memcpy

2020-09-09 Thread Alex Dewar
On 24/08/2020 22:17, Alex Dewar wrote: Issue identified with Coccinelle. Gentle ping? Signed-off-by: Alex Dewar --- fs/omfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index b76ec6b88ded..8867cefa79cf 100644 --- a/fs/omfs

[PATCH] drm/bridge: dw-mipi-dsi: Use kmemdup cf. kmalloc+memcpy

2020-09-09 Thread Alex Dewar
kmemdup can be used instead of kmalloc+memcpy. Replace an occurrence of this pattern. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge

[PATCH] scsi: aic7xxx: Use kmemdup in two places

2020-09-09 Thread Alex Dewar
kmemdup can be used instead of kmalloc+memcpy. Replace two occurrences of this pattern. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/scsi/aic7xxx/aic79xx_core.c | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions

[PATCH v2] PCI: keystone: Enable compile-testing on !ARM

2020-09-06 Thread Alex Dewar
Currently the Keystone driver can only be compile-tested on ARM, but this restriction seems unnecessary. Get rid of it to increase test coverage. Build-tested with allyesconfig on x86, ppc, mips and riscv. Signed-off-by: Alex Dewar --- drivers/pci/controller/dwc/Kconfig | 4 ++-- 1 file

Re: [PATCH] PCI: keystone: Enable compile-testing on !ARM

2020-09-06 Thread Alex Dewar
On Sun, Sep 06, 2020 at 02:19:44PM +0200, Krzysztof Kozlowski wrote: > On Fri, 4 Sep 2020 at 20:56, Alex Dewar wrote: > > > > Currently the Keystone driver can only be compile-tested on ARM, but > > this restriction seems unnecessary. Get rid of it to increase test > &

[PATCH] staging: media: atomisp: Fix bool-related style issues

2020-09-05 Thread Alex Dewar
-off-by: Alex Dewar --- .../staging/media/atomisp/pci/atomisp_cmd.c | 5 ++--- drivers/staging/media/atomisp/pci/sh_css.c| 20 +-- .../media/atomisp/pci/sh_css_firmware.c | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/staging/media

[PATCH] PCI: keystone: Enable compile-testing on !ARM

2020-09-04 Thread Alex Dewar
Currently the Keystone driver can only be compile-tested on ARM, but this restriction seems unnecessary. Get rid of it to increase test coverage. Build-tested on x86 with allyesconfig. Signed-off-by: Alex Dewar --- drivers/pci/controller/dwc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] mtd: onenand: omap2: Allow for compile-testing on !ARM

2020-09-04 Thread Alex Dewar
There seems no particular reason for building on ARM only, so remove the restriction to increase test coverage. Build-tested on x86 with allyesconfig. Signed-off-by: Alex Dewar --- drivers/mtd/nand/onenand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd

[PATCH] iio: adc: rockchip_saradc: Allow compile-testing with !ARM

2020-09-04 Thread Alex Dewar
There seems no reason to allow for compile-testing on ARM only, so remove this restriction. Build-tested with allyesconfig on x86. Signed-off-by: Alex Dewar --- drivers/iio/adc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc

[PATCH] spi: qup: Allow for compile-testing on !ARM

2020-09-04 Thread Alex Dewar
There seems no reason to restrict testing to ARM, so remove this constraint to improve test coverage. Build-tested with allyesconfig on x86. Signed-off-by: Alex Dewar --- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/Kconfig b/drivers/spi

[PATCH 2/2] staging: media: atomisp: Remove unhelpful info message

2020-09-03 Thread Alex Dewar
We don't really need to know that the LED pin reset successfully. Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/at

  1   2   3   >