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

Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

2020-08-12 Thread Alex Dewar
On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote: > On 8/9/20 1:54 PM, Alex Dewar wrote: > > This battery appears only to be used by a single board (DA850), so it > > makes sense to add this to the Kconfig file so that users don't build > > the module unneces

[PATCH 2/2] nfsd: Fix typo in comment

2020-08-12 Thread Alex Dewar
Fix typos in nfs4xdr.c. Signed-off-by: Alex Dewar --- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 1a0341fd80f9a..3db789139a71f 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -4828,7 +4828,7

[PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c

2020-08-12 Thread Alex Dewar
In nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this. Addresses-Coverity: ("Unused value") Signed-off-by: Alex Dewar --- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

2020-08-12 Thread Alex Dewar
On Wed, Aug 12, 2020 at 10:24:30AM -0500, David Lechner wrote: > On 8/12/20 8:37 AM, Alex Dewar wrote: > > On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote: > > > On 8/9/20 1:54 PM, Alex Dewar wrote: > > > > This battery appears only to be used by

Re: [PATCH] memory: brcmstb_dpfe: Fix memory leak

2020-08-20 Thread Alex Dewar
On Thu, Aug 20, 2020 at 05:29:44PM +0200, Krzysztof Kozlowski wrote: > On Tue, Aug 18, 2020 at 12:02:01PM +0100, Alex Dewar wrote: > > In brcmstb_dpfe_download_firmware(), memory is allocated to variable fw by > > firmware_request_nowarn(), but never released. Fix up to releas

[PATCH v2] memory: brcmstb_dpfe: Fix memory leak

2020-08-20 Thread Alex Dewar
In brcmstb_dpfe_download_firmware(), memory is allocated to variable fw by firmware_request_nowarn(), but never released. Fix up to release fw on all return paths. Signed-off-by: Alex Dewar --- v2: Don't assign ret unnecessarily (Krzysztof) --- drivers/memory/brcmstb_dpfe.c

[PATCH] net: qed: Remove unnecessary cast

2020-08-20 Thread Alex Dewar
In qed_rdma_destroy_cq() the result of dma_alloc_coherent() is cast from void* unnecessarily. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic

[PATCH] drm/amd/pm: Remove unnecessary cast

2020-08-20 Thread Alex Dewar
In init_powerplay_table_information() the value returned from kmalloc() is cast unnecessarily. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] scsi: mptfusion: Remove unnecessarily casts

2020-08-20 Thread Alex Dewar
In a number of places, the value returned from pci_alloc_consistent() is unnecessarily cast from void*. Remove these casts. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/message/fusion/mptbase.c | 6 +++--- drivers/message/fusion/mptctl.c | 5 ++--- drivers/message

[PATCH] scsi: esas2r: Remove unnecessary casts

2020-08-20 Thread Alex Dewar
In a number of places in esas2r_ioctl.c, the void* returned from pci_alloc_consistent() is cast unnecessarily. Remove casts. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/scsi/esas2r/esas2r_ioctl.c | 28 +--- 1 file changed, 13 insertions

[PATCH] nfc: st-nci: Remove unnecessary cast

2020-08-20 Thread Alex Dewar
In st_nci_hci_connectivity_event_received(), the return value of devm_kzalloc() is unnecessarily cast from void*. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/nfc/st-nci/se.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH] nfc: st21nfca: Remove unnecessary cast

2020-08-20 Thread Alex Dewar
In st21nfca_connectivity_event_received(), the return value of devm_kzalloc() is unnecessarily cast from void*. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/nfc/st21nfca/se.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH] scsi: qla2xxx: Remove unnecessary call to memset

2020-08-20 Thread Alex Dewar
In qla25xx_set_els_cmds_supported(), a call is made to dma_alloc_coherent() followed by zeroing the memory with memset. This is unnecessary as dma_alloc_coherent() already zeros memory. Remove. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/scsi/qla2xxx/qla_mbx.c | 2

Re: [PATCH] scsi: mptfusion: Remove unnecessarily casts

2020-08-20 Thread Alex Dewar
On Thu, Aug 20, 2020 at 11:53:58AM -0700, Joe Perches wrote: > On Thu, 2020-08-20 at 19:05 +0100, Alex Dewar wrote: > > In a number of places, the value returned from pci_alloc_consistent() is > > unnecessarily cast from void*. Remove these casts. > [] > > diff --git

Re: [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c

2020-08-20 Thread Alex Dewar
On Wed, Aug 12, 2020 at 08:36:31PM +, Frank van der Linden wrote: > On Wed, Aug 12, 2020 at 03:12:51PM +0100, Alex Dewar wrote: > > > > In nfsd4_encode_listxattrs(), the variable p is assigned to at one point > > but this value is never used before p is

[PATCH v2] scsi: Don't call memset after dma_alloc_coherent()

2020-08-20 Thread Alex Dewar
dma_alloc_coherent() already zeroes memory, so the extra call to memset() is unnecessary. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- v2: I've noticed a few other places in the scsi subsystem with this pattern, so lets fix them all with one patch. --- drivers/scsi/mp

[PATCH] coccinelle: add patch rule for dma_alloc_coherent

2020-08-20 Thread Alex Dewar
ch rule to remove unnecessary calls to memset after allocating with dma_alloc_coherent. While we're at it, fix a couple of typos. Fixes: dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()") Signed-off-by: Alex Dewar --- scripts/coccinelle/api/alloc/zalloc-simple.cocci | 16 +++

[PATCH] vdpa/mlx5: Fix uninitialised variable in core/mr.c

2020-08-06 Thread Alex Dewar
If the kernel is unable to allocate memory for the variable dmr then err will be returned without being set. Set err to -ENOMEM in this case. Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Addresses-Coverity: ("Uninitialized variables") Signe

[PATCH] vdpa/mlx5: Fix erroneous null pointer checks

2020-08-06 Thread Alex Dewar
/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Alex Dewar --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 3ec44a4f0e45..bcb66

Re: [PATCH] vdpa/mlx5: Fix erroneous null pointer checks

2020-08-09 Thread Alex Dewar
. Thanks for looking my patch over :-) Alex > > > -Original Message- > From: Eli Cohen > Sent: Sunday, August 9, 2020 8:53 AM > To: Alex Dewar > Cc: Michael S. Tsirkin ; Jason Wang ; > Parav Pandit ; virtualizat...@lists.linux-foundation.org; > linux-kerne

[PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

2020-08-09 Thread Alex Dewar
This battery appears only to be used by a single board (DA850), so it makes sense to add this to the Kconfig file so that users don't build the module unnecessarily. It currently seems to be built for the x86 Arch Linux kernel where it's probably not doing much good. Signed-off-by:

[PATCH] memory: brcmstb_dpfe: Fix memory leak

2020-08-18 Thread Alex Dewar
In brcmstb_dpfe_download_firmware(), memory is allocated to variable fw by firmware_request_nowarn(), but never released. Fix up to release fw on all return paths. Signed-off-by: Alex Dewar --- drivers/memory/brcmstb_dpfe.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions

[PATCH] staging: emxx_udc: Use standard BIT() macro

2020-08-18 Thread Alex Dewar
Currently emxx_udc.h defines bit values using local macros. Use the standard one instead. Also, combine bit values with bitwise-or rather than addition, as suggested by Coccinelle. Signed-off-by: Alex Dewar --- drivers/staging/emxx_udc/emxx_udc.h | 456 +--- 1 file

[PATCH] ethernet: cirrus: Remove unused macros

2020-08-18 Thread Alex Dewar
Remove a couple of unused #defines in cs89x0.h. Signed-off-by: Alex Dewar --- drivers/net/ethernet/cirrus/cs89x0.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/cirrus/cs89x0.h b/drivers/net/ethernet/cirrus/cs89x0.h index 91423b70bb45..210f9ec9af4b 100644 --- a

Re: [PATCH] staging: emxx_udc: Use standard BIT() macro

2020-08-18 Thread Alex Dewar
On Tue, Aug 18, 2020 at 07:29:02AM -0700, Randy Dunlap wrote: > On 8/18/20 6:49 AM, Alex Dewar wrote: > > Currently emxx_udc.h defines bit values using local macros. Use the > > standard one instead. > > > > Also, combine bit values with bitwise-or rather than ad

[PATCH] staging: emxx_udc: Allow for building on !ARM

2020-08-18 Thread Alex Dewar
Currently the module can only be test built on ARM, although it seems to build fine on x86. Change this to allow for broader test coverage. Signed-off-by: Alex Dewar --- drivers/staging/emxx_udc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc

[PATCH] clang-format: Fix: Maximum line length is now 100

2020-08-18 Thread Alex Dewar
Since commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column warning") the kernel style is now for lines to be a maximum of 100 rather than 80 columns. Update .clang-format accordingly. Signed-off-by: Alex Dewar --- .clang-format | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] clang-format: Fix: Maximum line length is now 100

2020-08-18 Thread Alex Dewar
On Tue, Aug 18, 2020 at 09:52:20AM -0700, Joe Perches wrote: > On Tue, 2020-08-18 at 17:24 +0100, Alex Dewar wrote: > > Since commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column > > warning") the kernel style is now for lines to be a maximum of 100 rather &g

[PATCH] sched/cputime: Mark function as __maybe_unused

2020-08-18 Thread Alex Dewar
Depending on config options, account_other_time() may not be called anywhere. Add __maybe_unused flag to fix clang warning. Signed-off-by: Alex Dewar --- kernel/sched/cputime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c

Re: [PATCH] sched/cputime: Mark function as __maybe_unused

2020-08-18 Thread Alex Dewar
On Tue, Aug 18, 2020 at 11:13:10AM -0700, Nick Desaulniers wrote: > On Tue, Aug 18, 2020 at 10:04 AM Alex Dewar wrote: > > > > Depending on config options, account_other_time() may not be called > > anywhere. Add __maybe_unused flag to fix clang warning. > > Just

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

[PATCH] pinctrl/qcom: Fix -Wimplicit-fallthrough

2019-08-17 Thread Alex Dewar
In pinctrl-spmi-gpio.c there is a switch case which is obviously intended to fall through to the next label. Add a comment to suppress -Wimplicit-fallthrough warning. Signed-off-by: Alex Dewar --- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH] scripts/gcc-plugins: Add SPDX header for files without

2019-08-24 Thread Alex Dewar
Replace boilerplate with approproate SPDX header. Vim also auto-trimmed whitespace from one line. Signed-off-by: Alex Dewar --- scripts/gcc-plugins/cyc_complexity_plugin.c | 2 +- scripts/gcc-plugins/latent_entropy_plugin.c | 2 +- scripts/gcc-plugins/randomize_layout_plugin.c | 4

[PATCH RESEND] scripts/gcc-plugins: Add SPDX header for files without

2019-08-24 Thread Alex Dewar
Replace boilerplate with approproate SPDX header. Vim also auto-trimmed whitespace from one line. Ignore the previous email -- there was a typo in the patch. Sorry! Signed-off-by: Alex Dewar --- scripts/gcc-plugins/cyc_complexity_plugin.c | 2 +- scripts/gcc-plugins/latent_entropy_plugin.c

[PATCH RESEND v3] scripts/gcc-plugins: Add SPDX header for files without

2019-08-24 Thread Alex Dewar
Replace boilerplate with approproate SPDX header. Vim also auto-trimmed whitespace from one line. Ignore the previous emails. I'm still trying to get the hang of the tools. Really sorry! Signed-off-by: Alex Dewar --- scripts/gcc-plugins/cyc_complexity_plugin.c | 2 +- scripts/gcc-pl

[PATCH 0/4] Add SPDX headers for most files in arch/um

2019-08-25 Thread Alex Dewar
Most files in arch/um have "Licensed under the GPL" in comments at the top. Convert to use SPDX headers. I've broken these changes into a patch series even though they're effectively one logical change, because the diff was >1700 lines. I can resend as a single patch if preferred. There are some r

[PATCH 3/4] Add SPDX headers for files in arch/um/os-Linux

2019-08-25 Thread Alex Dewar
Convert files to use SPDX header. All files are licensed under the GPLv2. Signed-off-by: Alex Dewar --- arch/um/os-Linux/Makefile| 2 +- arch/um/os-Linux/drivers/Makefile| 2 +- arch/um/os-Linux/drivers/etap.h | 2 +- arch/um/os-Linux/drivers/ethertap_kern.c | 2

[PATCH 2/4] Add SPDX headers to files in arch/um/kernel/

2019-08-25 Thread Alex Dewar
Convert files to use SPDX header. All files are licensed under the GPLv2. Signed-off-by: Alex Dewar --- arch/um/kernel/Makefile | 2 +- arch/um/kernel/config.c.in| 4 ++-- arch/um/kernel/exec.c | 2 +- arch/um/kernel/exitcode.c | 2 +- arch/um/kernel/gmon_syms.c| 2

[PATCH 1/4] Add SPDX headers for files in arch/um/drivers

2019-08-25 Thread Alex Dewar
Convert files to use SPDX header. All files are licensed under the GPLv2. Signed-off-by: Alex Dewar --- arch/um/drivers/Makefile| 2 +- arch/um/drivers/chan.h | 2 +- arch/um/drivers/chan_kern.c | 2 +- arch/um/drivers/chan_user.c | 2 +- arch/um/drivers

[PATCH 4/4] Add SPDX headers for files in arch/um/include

2019-08-25 Thread Alex Dewar
Convert files to use SPDX header. All files are licensed under the GPLv2. Signed-off-by: Alex Dewar --- arch/um/include/asm/kmap_types.h| 2 +- arch/um/include/asm/mmu.h | 2 +- arch/um/include/asm/mmu_context.h | 2 +- arch/um/include/asm/page.h | 2

Asus C101P Chromeboot fails to boot with Linux 5.2

2019-07-12 Thread Alex Dewar
Hi all, Since upgrading to the 5.2 kernel, my Chromebook is failing to boot. The Asus C101P is based on the RK3399 SoC and uses the rk3399-gru-bob device tree. It used to boot with the 5.1 kernel and mostly worked, with the exception of broken suspend and resume. When I try to boot the screen ju

Re: Asus C101P Chromeboot fails to boot with Linux 5.2

2019-07-12 Thread Alex Dewar
Hi Emil, I've tried booting with: audit=0 console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd Now I don't get the audit messages, but no other message is displayed either. It just alternates between a flashing cursor an

Re: Asus C101P Chromeboot fails to boot with Linux 5.2

2019-07-12 Thread Alex Dewar
I just built v5.1 and v5.2 from source, without the Arch patches, and get the same result: 5.1 boots and 5.2 doesn't. I tried adding ignore_loglevel, but still just get a blinking cursor. So it's definitely a regression. I can have a go at bisecting this if it would help? Or is there something el

[REGRESSION] Xorg segfaults on Asus Chromebook CP101 with Linux v5.2 (was Asus C101P Chromeboot fails to boot with Linux 5.2)

2019-07-13 Thread Alex Dewar
Hi all, I initially thought my machine was failing to boot entirely, but it turns out it was just failing to start the display manager. I managed to escape to a tty by hammering the keyboard a bit. I suspect the culprit is the rockchip_vpu driver (in staging/media), which has been renamed to han

Re: [REGRESSION] Xorg segfaults on Asus Chromebook CP101 with Linux v5.2 (was Asus C101P Chromeboot fails to boot with Linux 5.2)

2019-07-13 Thread Alex Dewar
On 13/07/2019 16:17, Heiko Stuebner wrote: Hi, Am Samstag, 13. Juli 2019, 13:38:45 CEST schrieb Alex Dewar: I initially thought my machine was failing to boot entirely, but it turns out it was just failing to start the display manager. I managed to escape to a tty by hammering the keyboard a

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] 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 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] 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] ath11k: return error if firmware request fails

2020-08-25 Thread Alex Dewar
, move the call to memset, as variable bd is not used on all code paths. Fixes: 7b57b2ddec21 ("ath11k: create a common function to request all firmware files") Signed-off-by: Alex Dewar --- drivers/net/wireless/ath/ath11k/qmi.c | 20 +--- 1 file changed, 9 inserti

[PATCH] IB/qib: remove superfluous fallthrough statements

2020-08-25 Thread Alex Dewar
d a Coverity warning about unreachable code. Remove the fallthrough statements and replace the mass of gotos with simple return statements to make the code terser and less bug-prone. Addresses-Coverity: ("Unreachable code") Fixes: 36a8f01cd24b ("IB/qib: Add congestion control agent i

[PATCH] VMCI: check return value of get_user_pages_fast() for errors

2020-08-25 Thread Alex Dewar
we have a positive number returned. Fixes: 06164d2b72aa ("VMCI: queue pairs implementation.") Signed-off-by: Alex Dewar --- drivers/misc/vmw_vmci/vmci_queue_pair.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/dr

Re: [PATCH] IB/qib: remove superfluous fallthrough statements

2020-08-25 Thread Alex Dewar
On 25/08/2020 17:49, Gustavo A. R. Silva wrote: On 8/25/20 11:26, Joe Perches wrote: On Tue, 2020-08-25 at 11:19 -0500, Gustavo A. R. Silva wrote: On 8/25/20 10:51, Alex Dewar wrote: Commit 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") erroneously marked a

[PATCH v2 2/2] IB/qib: tidy up process_cc()

2020-08-25 Thread Alex Dewar
This function has a lot of gotos which could be replaced by simple returns, making the function tidier and less bug prone. Signed-off-by: Alex Dewar --- drivers/infiniband/hw/qib/qib_mad.c | 50 - 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a

[PATCH v2 1/2] IB/qib: remove superfluous fallthrough statements

2020-08-25 Thread Alex Dewar
d a Coverity warning about unreachable code. Remove the fallthrough statements. Addresses-Coverity: ("Unreachable code") Fixes: 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") Signed-off-by: Alex Dewar --- v2: Do refactoring in a separate patch (Gustavo)

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

[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] 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 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

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

[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/

[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] 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

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 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

[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] 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] 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

Re: [PATCH v2 1/2] IB/qib: remove superfluous fallthrough statements

2020-08-27 Thread Alex Dewar
2:33:27PM -0500, Gustavo A. R. Silva wrote: > > > > On Tue, Aug 25, 2020 at 06:12:42PM +0100, Alex Dewar wrote: > > > > > Commit 36a8f01cd24b ("IB/qib: Add congestion control agent > > > > > implementation") > > > > > erroneously m

Re: [PATCH] usb: atm: don't use snprintf() for sysfs attrs

2020-08-27 Thread Alex Dewar
On Thu, Aug 27, 2020 at 09:15:37AM +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 27, 2020 at 08:42:06AM +0200, Rasmus Villemoes wrote: > > On 25/08/2020 00.23, Alex Dewar wrote: > > > kernel/cpu.c: don't use snprintf() for sysfs attrs > > > > > >

Re: [PATCH] usb: atm: don't use snprintf() for sysfs attrs

2020-08-27 Thread Alex Dewar
On Thu, Aug 27, 2020 at 03:41:06PM +0200, Rasmus Villemoes wrote: > On 27/08/2020 15.18, Alex Dewar wrote: > > On Thu, Aug 27, 2020 at 09:15:37AM +0200, Greg Kroah-Hartman wrote: > >> On Thu, Aug 27, 2020 at 08:42:06AM +0200, Rasmus Villemoes wrote: > >>> On 25/0

[PATCH RFC] netlabel: remove unused param from audit_log_format()

2020-08-27 Thread Alex Dewar
ead code") Fixes: d3b990b7f327 ("netlabel: fix problems with mapping removal") Signed-off-by: Alex Dewar --- I wasn't sure whether it was intended that something other than ret_val be printed in the log, so that's why I'm sending this as an RFC. net/netlabel/netlabe

Re: [PATCH RFC] netlabel: remove unused param from audit_log_format()

2020-08-27 Thread Alex Dewar
On Thu, Aug 27, 2020 at 01:00:58PM -0400, Paul Moore wrote: > On Thu, Aug 27, 2020 at 12:39 PM Alex Dewar wrote: > > > > Commit d3b990b7f327 ("netlabel: fix problems with mapping removal") > > added a check to return an error if ret_val != 0, before ret_val is >

Re: [PATCH RFC] netlabel: remove unused param from audit_log_format()

2020-08-27 Thread Alex Dewar
On Thu, Aug 27, 2020 at 06:06:34PM +0100, Alex Dewar wrote: > On Thu, Aug 27, 2020 at 01:00:58PM -0400, Paul Moore wrote: > > On Thu, Aug 27, 2020 at 12:39 PM Alex Dewar wrote: > > > > > > Commit d3b990b7f327 ("netlabel: fix problems with mapping removal") &

[PATCH v2] netlabel: remove unused param from audit_log_format()

2020-08-28 Thread Alex Dewar
ode") Fixes: d3b990b7f327 ("netlabel: fix problems with mapping removal") Signed-off-by: Alex Dewar --- v2: Still print the res field, because it's useful (Paul) net/netlabel/netlabel_domainhash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/n

[PATCH] RDMA/ucma: Fix resource leak on error path

2020-09-02 Thread Alex Dewar
b7a ("RDMA/ucma: Remove mc_list and rely on xarray") Signed-off-by: Alex Dewar --- drivers/infiniband/core/ucma.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index f2c9ef6ae481..a5595

[PATCH] xsk: Free variable on error path

2020-09-02 Thread Alex Dewar
In xp_create_dma_map(), memory is allocated to dma_map->dma_pages, but then dma_map is erroneously compared to NULL, rather than the member. Fix this. Addresses-Coverity: ("Dead code") Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings") Signed-off-by: A

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

2020-09-02 Thread Alex Dewar
check_charging_duration() contains some copy-pasted code, which makes it less readable. Refactor the function to be a bit tidier. I've also fixed a couple of typos. Signed-off-by: Alex Dewar --- drivers/power/supply/charger-manager.c | 39 +- 1 file change

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

2020-09-02 Thread Alex Dewar
eak") Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Alex Dewar --- .../media/atomisp/i2c/atomisp-lm3554.c| 47 ++- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/ato

Re: [PATCH] RDMA/ucma: Fix resource leak on error path

2020-09-03 Thread Alex Dewar
On Wed, Sep 02, 2020 at 07:34:26PM -0500, Gustavo A. R. Silva wrote: > Hi Alex, > > On 9/2/20 11:24, Alex Dewar wrote: > > In ucma_process_join(), if the call to xa_alloc() fails, the function > > will return without freeing mc. Fix this by jumping to the correct line. >

[PATCH] remoteproc: core: Free rvdev on error path

2020-09-03 Thread Alex Dewar
In rpoc_handle_vdev(), rvdev is not freed properly on the error path and one of the labels is misnamed. Fix this up. Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") Signed-off-by: Alex Dewar --- drivers/remoteproc/remoteproc_core.c | 10 +++

Re: [PATCH] remoteproc: core: Free rvdev on error path

2020-09-03 Thread Alex Dewar
On Thu, Sep 03, 2020 at 11:01:42AM +0100, Alex Dewar wrote: > In rpoc_handle_vdev(), rvdev is not freed properly on the error path and > one of the labels is misnamed. Fix this up. Actually, don't apply this. I didn't realise that device_unregister already frees memory. Sor

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

2020-09-03 Thread Alex Dewar
Hi all, I started porting over the mpt code from using the old pci_* compat functions to their dma_* counterparts, but realised that there are many functions which have a sleepFlags argument, which is actually almost never actually needed: almost all of the functions are always called with sleepFl

[PATCH RFC 3/3] scsi: mpt: Port from pci_* to dma_* interface

2020-09-03 Thread Alex Dewar
+dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 Signed

[PATCH RFC 1/3] scsi: mpt: Remove unnecessary sleepFlag argument from functions

2020-09-03 Thread Alex Dewar
function WaitForDoorbellAck, which does use the sleepFlag argument, so that one was left in place. Signed-off-by: Alex Dewar --- drivers/message/fusion/mptbase.c | 380 +++--- drivers/message/fusion/mptbase.h | 6 +- drivers/message/fusion/mptctl.c | 12 +- drivers

[PATCH RFC 2/3] scsi: mpt: Replace a few uses of GFP_ATOMIC with GFP_KERNEL

2020-09-03 Thread Alex Dewar
None of the relevant functions are called from an atomic context, so allocate memory with GFP_KERNEL to give a better chance of allocating memory. Signed-off-by: Alex Dewar --- drivers/message/fusion/mptbase.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers

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

2020-09-03 Thread Alex Dewar
Good point about the timer! > > > > - err = lm3554_gpio_init(client); > > - if (err) { > > + ret = lm3554_gpio_init(client); > > + if (ret) { > > dev_err(&client->dev, "gpio request/direction_output fail"); > > - goto fail2; > > + goto err_cleanup_entity;

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

2020-09-03 Thread Alex Dewar
> You're right. I wonder if there is really any need for the > lm3554_gpio_uninit() function at all? It's basically the same as > lm3554_gpio_init() except for the order of function calls. Probably > we could just rename lm3554_gpio_init() to something like > lm3554_gpio_set_default() and use it

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

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

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

2020-09-03 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. Print a warning instead and free flash unconditionally. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/i2c

[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

Re: [PATCH] ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion 15 inches

2020-08-24 Thread Alex Dewar
There's a mistake in this. The ID numbers are the wrong way round. Alex

Re: [PATCH] ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion 15 inches

2020-08-24 Thread Alex Dewar
My mistake -- I didn't read your changelog properly. Sorry! On 24/08/2020 13:30, Alex Dewar wrote: There's a mistake in this. The ID numbers are the wrong way round. Alex

[PATCH] staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent()

2020-08-24 Thread Alex Dewar
In nbu2ss_eq_queue() memory is allocated with dma_alloc_coherent(), though, strangely, NULL is passed as the struct device* argument. Pass the UDC's device instead. Build-tested on x86 only. Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") Signed-off

Re: [PATCH] staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent()

2020-08-24 Thread Alex Dewar
On Mon, Aug 24, 2020 at 04:19:17PM +0100, Alex Dewar wrote: > In nbu2ss_eq_queue() memory is allocated with dma_alloc_coherent(), > though, strangely, NULL is passed as the struct device* argument. Pass > the UDC's device instead. > > Build-tested on x86 only. > > Fix

[PATCH RFC] mmc: sdhci-msm: enable compile-testing on !ARM

2020-08-24 Thread Alex Dewar
There seems to be no particular reason to only test for ARM, so allow for build-testing on other platforms to increase coverage. Build-tested on x86 with allyesconfig. Signed-off-by: Alex Dewar --- Let me know if there is some extra dependency needed for COMPILE_TEST! I don't want to

  1   2   3   >