[PATCH 1/2] liquidio: remove unnecessary NULL check before kfree in delete_glists

2017-10-17 Thread Gustavo A. R. Silva
NULL check before freeing functions like kfree is not needed. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- This code was tested by compilation only. drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 3 +--

[PATCH 2/2] liquidio: mark expected switch fall-through in octeon_destroy_resources

2017-10-17 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of th

[PATCH] net: l2tp: mark expected switch fall-through

2017-10-17 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced the "NOBREAK" comment with a "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] net: mac80211: mark expected switch fall-throughs

2017-10-17 Thread Gustavo A. R. Silva
expecting to find. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify that the actual intention of the code is to fall through. net/mac80211/cfg.c| 3 +++ net/mac80211/ht.c | 1 + n

Re: [PATCH 00/20] mark expected switch fall-throughs

2017-10-23 Thread Gustavo A. R. Silva
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>: In preparation to enabling -Wimplicit-fallthrough, this patchset aims to mark switch cases where we are expecting to fall through. In Kees Cook words: "This is an unfortunate omission in the C language, and thankful

[PATCH] usb: image: mdc800: mark expected switch fall-through

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/image/mdc800.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/image/mdc800.c b/drive

[PATCH] usb: musb_core: mark expected switch fall-through

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397608 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/musb/musb_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d

[PATCH] usb: gadget: serial: mark expected switch fall-through

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1350962 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/function/u_serial.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] usb: phy: phy-msm-usb: mark expected switch fall-through

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1222118 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/phy/phy-msm-usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d

[PATCH] usb: core: urb: mark expected switch fall-through

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1162594 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/core/urb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/us

[PATCH] usb: gadget: goku_udc: mark expected switch fall-throughs

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 145713 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc/goku_udc.c | 14 +- 1 file changed, 9 insertions

[PATCH] i40e/virtchnl: fix application of sizeof to pointer

2017-10-18 Thread Gustavo A. R. Silva
sizeof when applied to a pointer typed expression gives the size of the pointer. The proper fix in this particular case is to code sizeof(*vfres) instead of sizeof(vfres). This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

Re: [PATCH] net: rxrpc: mark expected switch fall-throughs

2017-10-19 Thread Gustavo A. R. Silva
Quoting David Howells <dhowe...@redhat.com>: Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: + /* fall through */ All new comments in rxrpc should begin with a capital letter; I'm switching to this as I modify the lines with comments on. Fix check

[PATCH] net: netrom: nr_in: mark expected switch fall-through

2017-10-19 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of th

[PATCH] openvswitch: conntrack: mark expected switch fall-through

2017-10-19 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed a "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <garsi...@e

[PATCH] net: rose: mark expected switch fall-throughs

2017-10-19 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of th

[PATCH] net: rxrpc: mark expected switch fall-throughs

2017-10-19 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of th

Re: [PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Quoting Herbert Xu <herb...@gondor.apana.org.au>: On Mon, Oct 23, 2017 at 10:50:43PM -0500, Gustavo A. R. Silva wrote: Quoting Herbert Xu <herb...@gondor.apana.org.au>: >On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote: >>Use BUG_ON instead of if cond

Re: [PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Quoting Herbert Xu <herb...@gondor.apana.org.au>: On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote: Use BUG_ON instead of if condition followed by BUG. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor

[PATCH] usb: gadget: f_tcm: mark expected switch fall-through

2017-10-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 703128 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/function/f_tcm.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] ipv4: esp4: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG in esp_remove_trailer. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/ipv4/esp4.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv4/es

[PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/xfrm/xfrm_user.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git

[PATCH] ipv4: icmp: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG in icmp_timestamp. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/ipv4/icmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ic

[PATCH] ipv4: tcp_minisocks: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG in tcp_time_wait. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/ipv4/tcp_minisocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ne

[PATCH] net: sunrpc: svcauth_gss: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/sunrpc/auth_gss/svcauth_gss.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/

[PATCH] net: rxrpc: call_object: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG in rxrpc_release_call. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/rxrpc/call_object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net

[PATCH] openvswitch: meter: fix NULL pointer dereference in ovs_meter_cmd_reply_start

2017-11-14 Thread Gustavo A. R. Silva
in order to avoid a pontential null pointer dereference. Addresses-Coverity-ID: 1461561 ("Dereference before null check") Addresses-Coverity-ID: 1461562 ("Dereference null return value") Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-

[PATCH] drm/amd/display: Fix potential NULL pointer dereferences in amdgpu_dm_atomic_commit_tail

2017-11-27 Thread Gustavo A. R. Silva
ll check") Addresses-Coverity-ID: 1423833 ("Dereference before null check") Fixes: e7b07ceef2a6 ("drm/amd/display: Merge amdgpu_dm_types and amdgpu_dm") Fixes: 54d765752467 ("drm/amd/display: Unify amdgpu_dm state variable namings.") Signed-off-by: Gustavo A. R. Silva <

Re: [PATCH] net: openvswitch: datapath: fix data type in queue_gso_packets

2017-11-27 Thread Gustavo A. R. Silva
Quoting David Miller <da...@davemloft.net>: From: Willem de Bruijn <willemdebruijn.ker...@gmail.com> Date: Sat, 25 Nov 2017 16:15:01 -0500 On Sat, Nov 25, 2017 at 2:14 PM, Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: gso_type is being used in binary AND o

Re: [PATCH] mfd: sm501: Add NULL check on devm_kzalloc return value

2017-11-27 Thread Gustavo A. R. Silva
On 11/23/2017 03:37 AM, Linus Walleij wrote: On Thu, Nov 23, 2017 at 4:50 AM, Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected with the help of Coccinelle.

[PATCH] scsi: lpfc: Fix potential NULL pointer dereference in lpfc_nvme_fcp_io_submit

2017-11-27 Thread Gustavo A. R. Silva
lpfc: Fix crash in lpfc_nvme_fcp_io_submit during LIP") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Also, I wonder if the right pointer to check at line: if (!pnvme_rport || !freqpriv) { is pnvme_fcreq instead of freqpriv drivers/scsi/lpfc/lpfc_nvme.c | 7 ++- 1

[PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK

2017-11-27 Thread Gustavo A. R. Silva
t;) Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- net/rxrpc/call_event.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index bda952f..03074ba 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -123,7

[PATCH] rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet

2017-11-27 Thread Gustavo A. R. Silva
Value assigned to variable resend_at is overwritten before it can be used. Fix this by removing the value overwrite as it seems that this is a leftover code. Addresses-Coverity-ID: 1462262 Fixes: beb8e5e4f38c ("rxrpc: Express protocol timeouts in terms of RTT") Signed-off-by: Gustavo A

Re: [PATCH] rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet

2017-11-27 Thread Gustavo A. R. Silva
Hi David, Quoting David Howells <dhowe...@redhat.com>: Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: Value assigned to variable resend_at is overwritten before it can be used. Fix this by removing the value overwrite as it seems that this is a leftover code. NA

Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-28 Thread Gustavo A. R. Silva
Quoting Thomas Gleixner <t...@linutronix.de>: On Tue, 28 Nov 2017, Thomas Gleixner wrote: On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote: > Quoting Thomas Gleixner <t...@linutronix.de>: > > > On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote: > > > > >

Re: [PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK

2017-11-28 Thread Gustavo A. R. Silva
Quoting David Howells <dhowe...@redhat.com>: Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: - ack_at = jiffies + expiry; Same issue as with the other patch. Can you just combine the two please? Sure. I'll send a patch shortly. Thanks -- Gustavo A. R. Silva

[PATCH v3] rxrpc: Fix variable overwrite

2017-11-28 Thread Gustavo A. R. Silva
: beb8e5e4f38c ("rxrpc: Express protocol timeouts in terms of RTT") Link: https://marc.info/?i=17004.1511808959%40warthog.procyon.org.uk Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: - Add 'now' to the previously-computed value stored in resend_at instea

Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-28 Thread Gustavo A. R. Silva
Quoting Thomas Gleixner <t...@linutronix.de>: On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. case 0: if (!n--)

Re: [PATCH] rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet

2017-11-27 Thread Gustavo A. R. Silva
Quoting David Howells <dhowe...@redhat.com>: Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: - resend_at = now + rxrpc_resend_timeout; + resend_at += now; Yep. :-) Great! What about this one: https://lkml.org/lkml/2017/11/27/810 appl

Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-28 Thread Gustavo A. R. Silva
f course if you intentionally change the option to: KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=1) it means that you obviously want to ignore any warning. Thanks -- Gustavo A. R. Silva

Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-28 Thread Gustavo A. R. Silva
Quoting Thomas Gleixner <t...@linutronix.de>: On Tue, 28 Nov 2017, Thomas Gleixner wrote: +CC Linus. On Tue, 28 Nov 2017, Thomas Gleixner wrote: > On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote: > > Quoting Thomas Gleixner <t...@linutronix.de>: > > > > To

Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-28 Thread Gustavo A. R. Silva
to fall through also. Thanks -- Gustavo A. R. Silva

[PATCH] net: openvswitch: datapath: fix data type in queue_gso_packets

2017-11-25 Thread Gustavo A. R. Silva
s zero, hence making some code unreachable and likely causing undesired behavior. Fix this by changing the data type of variable gso_type to unsigned int. Addresses-Coverity-ID: 1462223 Fixes: 0c19f846d582 ("net: accept UFO datagrams from tuntap and packet") Signed-off-by: Gustavo A.

Re: [PATCH] au0828: fix use-after-free at USB probing

2017-11-22 Thread Gustavo A. R. Silva
Hi Andrey, I have successfully installed and tested syzkaller with QEMU. Can you please tell me how to reproduce this bug or share with me the full crash report? Also, can you point me out to the PoC file? Much appreciated Thank you! -- Gustavo A. R. Silva Quoting Andrey Konovalov

[PATCH] mfd: sm501: Add NULL check on devm_kzalloc return value

2017-11-22 Thread Gustavo A. R. Silva
Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected with the help of Coccinelle. Fixes: b2e6392f ("i2c: gpio: Convert to use descriptors") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- dri

[PATCH] davinci: vpif_capture: add NULL check on devm_kzalloc return value

2017-11-22 Thread Gustavo A. R. Silva
Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected with the help of Coccinelle. Fixes: 4a5f8ae50b66 ("[media] davinci: vpif_capture: get subdevs from DT when available") Signed-off-by: Gustavo A. R. Si

Re: [PATCH] scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg

2017-11-22 Thread Gustavo A. R. Silva
! Glad to help. :) Thanks -- Gustavo A. R. Silva

Re: [PATCH] c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt

2017-11-22 Thread Gustavo A. R. Silva
On 11/21/2017 02:22 AM, Patrice CHOTARD wrote: Hi Gustavo On 11/20/2017 03:00 PM, Gustavo A. R. Silva wrote: _channel_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _channel_ has been null

Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-29 Thread Gustavo A. R. Silva
common consensus. :) Awesome Thanks, Thomas. -- Gustavo A. R. Silva

[PATCH] lib: zstd: bitstream: Mark expected switch fall-throughs

2017-11-27 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- lib/zstd/bitstream.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/zstd/bitstream.h b/lib/zstd/bitst

[PATCH] x86/syscalls: Mark expected switch fall-throughs

2017-11-27 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- arch/x86/include/asm/syscall.h | 28 1 file changed, 28 insertions(+) diff --git a/ar

[PATCH v2] rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet

2017-11-27 Thread Gustavo A. R. Silva
rc.info/?i=17004.1511808959%40warthog.procyon.org.uk Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: Update value in resend_at instead of removing the code. net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/sendm

[PATCH] drm/i915: Mark expected switch fall-throughs

2017-11-27 Thread Gustavo A. R. Silva
Addresses-Coverity-ID: 1357403 Addresses-Coverity-ID: 1357433 Addresses-Coverity-ID: 1392622 Addresses-Coverity-ID: 1415273 Addresses-Coverity-ID: 1435752 Addresses-Coverity-ID: 1441500 Addresses-Coverity-ID: 1454596 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/dr

[PATCH] drm/vmwgfx_kms: Fix potential NULL pointer dereference

2017-12-04 Thread Gustavo A. R. Silva
is null. Addresses-Coverity-ID: 1462412 ("Dereference after null check") Fixes: a01cb8ba3f62 ("drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +++ 1

Re: [PATCH] au0828: fix use-after-free at USB probing

2017-12-12 Thread Gustavo A. R. Silva
Hey Andrey, Quoting Andrey Konovalov <andreyk...@google.com>: On Thu, Nov 23, 2017 at 2:31 AM, Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: Hi Andrey, I have successfully installed and tested syzkaller with QEMU. Can you please tell me how to reproduce this bug or s

Re: [PATCH] drm/i915/gvt/fb_decoder: Fix out-of-bounds read

2017-12-12 Thread Gustavo A. R. Silva
Hi Zhenyu, Quoting Zhenyu Wang <zhen...@linux.intel.com>: On 2017.12.09 00:37:59 -0600, Gustavo A. R. Silva wrote: In case function skl_format_to_drm returns -EINVAL, fmt turns into a huge number as fmt is of type u32, hence there is an out-of-bounds read when using fmt as an index for

[PATCH] ACPI / CPPC: Fix negative array index read in cppc_set_perf

2017-12-13 Thread Gustavo A. R. Silva
[pcc_ss_id]; Addresses-Coverity-ID: 1426090 ("Negative array index read") Fixes: 1ecbd7170d65 ("ACPI / CPPC: Fix KASAN global out of bounds warning") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/acpi/cppc_acpi.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set

2017-11-17 Thread Gustavo A. R. Silva
evice not ready") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/net/usb/ipheth.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index ca71f6c..7275761 100644 --- a/drivers/net/usb/ipheth

Logically dead code at fs/afs/cell.c:206

2017-11-17 Thread Gustavo A. R. Silva
f (!IS_ERR(cell)) { - if (excl) { + if (cell) { afs_put_cell(net, cell); return ERR_PTR(-EEXIST); } But I'm suspicious about it. What do you think? Thanks -- Gu

Re: [PATCH] au0828: fix use-after-free at USB probing

2017-11-10 Thread Gustavo A. R. Silva
Quoting Andrey Konovalov <andreyk...@google.com>: On Fri, Nov 10, 2017 at 1:21 AM, Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: Hi Andrey, Could you please try this patch? Thank you Hi Gustavo, With your patch I get a different crash. Not sure if it's another bug or

[PATCH] drm/amd/display/dc/dce110/dce110_mem_input_v: use swap macro in program_size_and_rotation

2017-11-10 Thread Gustavo A. R. Silva
Make use of the swap macro instead of _manually_ swapping values and remove unnecessary variable swap. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- .../drm/amd/disp

[PATCH] drm/amd/display/dc/core/dc_resource: use swap macro in rect_swap_helper

2017-11-10 Thread Gustavo A. R. Silva
Make use of the swap macro instead of _manually_ swapping values and remove unnecessary variable temp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/d

[PATCH] tty: vt: replace _manual_ swap with swap macro in set_selection

2017-11-10 Thread Gustavo A. R. Silva
Make use of the swap macro instead of _manually_ swapping values and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/tty/vt/selec

[PATCH] staging: speakup: selection: replace _manual_ swap with swap macro

2017-11-10 Thread Gustavo A. R. Silva
Make use of the swap macro instead of _manually_ swapping values and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/s

[PATCH] scsi: aic7xxx_core: remove unnecessary null check before kfree

2017-11-12 Thread Gustavo A. R. Silva
NULL check before freeing functions like kfree is not needed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/scsi/aic7xxx/aic7xxx_core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH] usb: uvc_debugfs: remove unnecessary NULL check before debugfs_remove_recursive

2017-11-12 Thread Gustavo A. R. Silva
NULL check before freeing functions like debugfs_remove_recursive is not needed. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 del

[PATCH] PM / devfreq: Remove unnecessary NULL check before kfree

2017-11-12 Thread Gustavo A. R. Silva
NULL check before freeing functions like kfree is not needed. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/devfreq/devfreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/d

[PATCH] nvme: host: core: fix NULL pointer dereference in nvme_pr_command

2017-11-13 Thread Gustavo A. R. Silva
stems") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/nvme/host/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 25da74d..9b9c324 100644 --- a/drivers/nvme/host/core

[PATCH] watchdog: ib700wdt: mark expected switch fall-through

2017-11-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] watchdog: eurotechwdt: mark expected switch fall-through

2017-11-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

Re: [PATCH] scsi: bnx2i: bnx2i_hwi: use swap macro in bnx2i_send_iscsi_nopout

2017-11-19 Thread Gustavo A. R. Silva
Quoting "Rangankar, Manish" <manish.rangan...@cavium.com>: On 04/11/17 1:28 AM, "Gustavo A. R. Silva" <garsi...@embeddedor.com> wrote: Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This

Re: [PATCH] drm/amd/display/dc/dce110/dce110_mem_input_v: use swap macro in program_size_and_rotation

2017-11-19 Thread Gustavo A. R. Silva
Quoting Harry Wentland <harry.wentl...@amd.com>: On 2017-11-10 05:31 PM, Gustavo A. R. Silva wrote: Make use of the swap macro instead of _manually_ swapping values and remove unnecessary variable swap. This makes the code easier to read and maintain. This code was detected with th

[PATCH] c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt

2017-11-20 Thread Gustavo A. R. Silva
iH407/10 Linux DVB demux support") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/driver

[PATCH] scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg

2017-11-20 Thread Gustavo A. R. Silva
nable support") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/scsi/ufs/ufshcd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 011c336..a355d98 100644 --- a/drivers/scsi/ufs/ufshcd

[PATCH] dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved

2017-11-20 Thread Gustavo A. R. Silva
NULL check.") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/dma/at_hdmac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index fbab271..a861b5b 100644 --- a/drivers/dma/at_hdmac.c +

[PATCH] afs: cell: Remove unnecessary code in afs_lookup_cell

2017-11-17 Thread Gustavo A. R. Silva
Due to recent changes this piece of code is no longer needed. Addresses-Coverity-ID: 1462033 Link: https://lkml.kernel.org/r/4923.1510957...@warthog.procyon.org.uk Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- fs/afs/cell.c | 7 +-- 1 file changed, 1 insertion

Re: Logically dead code at fs/afs/cell.c:206

2017-11-17 Thread Gustavo A. R. Silva
Quoting David Howells <dhowe...@redhat.com>: Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: Today Coverity reported a "Logically dead code" issue at fs/afs/cell.c:206: if (!excl) { rcu_read_lock(); cell = afs_lookup_cell

Re: [PATCH] crypto: qat: qat_common: qat_uclo - mark expected switch fall-throughs

2017-11-03 Thread Gustavo A. R. Silva
Quoting Herbert Xu <herb...@gondor.apana.org.au>: On Thu, Oct 12, 2017 at 05:55:29PM -0500, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embed

Re: watchdog: f71808e_wdt: mark expected switch fall-throughs

2017-11-03 Thread Gustavo A. R. Silva
Quoting Guenter Roeck <li...@roeck-us.net>: On Thu, Nov 02, 2017 at 02:28:17PM -0500, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall&quo

[PATCH] watchdog: pcwd_pci: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] net: plip: mark expected switch fall-throughs

2017-11-03 Thread Gustavo A. R. Silva
Addresses-Coverity-ID: 114899 Addresses-Coverity-ID: 114900 Addresses-Coverity-ID: 114901 Addresses-Coverity-ID: 114902 Addresses-Coverity-ID: 114903 Addresses-Coverity-ID: 114904 Addresses-Coverity-ID: 114905 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/net/plip/plip.

[PATCH] mISDN: l1oip_core: replace _manual_ swap with swap macro

2017-11-03 Thread Gustavo A. R. Silva
Make use of the swap macro and remove unnecessary variables skb and cnt. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/isdn/mISDN/l1oip_core.c | 10 ++

[PATCH] crypto: chcr - Replace _manual_ swap with swap macro

2017-11-03 Thread Gustavo A. R. Silva
Make use of the swap macro and remove unnecessary variable temp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/crypto/chelsio/chcr_algo.c | 5 + 1 file chan

[PATCH v2] watchdog: pcwd_pci: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

Re: [PATCH] watchdog: pcwd_pci: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
e I replaced "Fall" with a proper > "fall through" comment, which is what GCC is expecting to find. > > Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> > --- > drivers/watchdog/pcwd_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

[PATCH] scsi: lpfc_els: use swap macro in lpfc_plogi_confirm_nport

2017-11-03 Thread Gustavo A. R. Silva
Make use of the swap macro and remove unnecessary variable keep_nlp_flag. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/scsi/lpfc/lpfc_els.c | 6 ++ 1 file c

Re: [PATCH] watchdog: pcwd_pci: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/watchdog/pcwd_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c index c0d07ee..c882252 100644 -

[PATCH] misc: mic: scif_nodeqp: use swap macro in scif_node_connect

2017-11-03 Thread Gustavo A. R. Silva
Make use of the swap macro and remove unnecessary variable tmppayload. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/misc/mic/scif/scif_nodeqp.c | 5 +

[PATCH] watchdog: wdt_pci: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] watchdog: pcwd_usb: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] watchdog: watchdog_dev: mark expected switch fall-through

2017-11-03 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] KVM: VMX: replace move_msr_up with swap macro

2017-11-03 Thread Gustavo A. R. Silva
Function move_msr_up is used to _manually_ swap MSR entries in MSR array. This function can be removed and replaced using the swap macro instead. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- The new lines are o

[PATCH] thunderbolt: tb: fix use after free in tb_activate_pcie_devices

2017-11-04 Thread Gustavo A. R. Silva
Add a ̣̣continue statement in order to avoid using a previously free'd pointer tunnel in list_add. Addresses-Coverity-ID: 1415336 Fixes: 9d3cce0b6136 ("thunderbolt: Introduce thunderbolt bus and connection manager") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com&

Re: [PATCH] net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action

2017-11-05 Thread Gustavo A. R. Silva
Hi Saeed, Quoting Saeed Mahameed <sae...@dev.mellanox.co.il>: On Sat, Nov 4, 2017 at 8:54 PM, Gustavo A. R. Silva <garsi...@embeddedor.com> wrote: hn is being kfree'd in mlx5e_del_l2_from_hash and then dereferenced by accessing hn->ai.addr Fix this by copying the MAC addre

Re: watchdog: wdt_pci: mark expected switch fall-through

2017-11-05 Thread Gustavo A. R. Silva
Quoting Guenter Roeck <li...@roeck-us.net>: On Fri, Nov 03, 2017 at 06:07:23PM -0500, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall&quo

[PATCH] net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action

2017-11-04 Thread Gustavo A. R. Silva
826 ("net/mlx5: Separate between E-Switch and MPFS") Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[PATCH] xen: xenbus_probe_frontend: mark expected switch fall-throughs

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146562 Addresses-Coverity-ID: 146563 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/xen/xenbus/xenbus_probe_frontend.c | 2 ++

[PATCH] xen/pvcalls-front: mark expected switch fall-through

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Si

[PATCH] watchdog: advantechwdt: mark expected switch fall-through

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustav

[PATCH] drm/nouveau/bios/timing: mark expected switch fall-throughs

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1260018 Addresses-Coverity-ID: 1260019 Addresses-Coverity-ID: 1260022 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/drm/nouvea

<    2   3   4   5   6   7   8   9   10   11   >