Hi Breno,
On 10/17/18 9:47 PM, Breno Leitao wrote:
> uref->usage_index can be indirectly controlled by userspace, hence leading
> to a potential exploitation of the Spectre variant 1 vulnerability.
>
> This problem might show up in the cmd = HIDIOCGCOLLECTIONINDEX flow at
> function
>
On 05/22/2018 10:56 AM, Shuah Khan wrote:
On 05/18/2018 07:13 PM, Gustavo A. R. Silva wrote:
pdev_nr and rhport can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.
This issue was detected with the help of Smatch:
drivers/usb
On 05/19/2018 02:04 AM, Greg Kroah-Hartman wrote:
Greg,
I've been talking with Dan Williams (intel) about this kind of issues [1]
and it seems my original assumptions are correct. Hence, this patch is not
useful and, in order to actually prevent speculation here we would need to
pass the
https://marc.info/?l=linux-kernel=152449131114778=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
Changes in v3:
- Pass the addresses of pdev_nr and rhport into valid_port and
valid_args.
Changes in v2:
- Place the barriers into valid_p
On 05/18/2018 11:06 AM, Shuah Khan wrote:
On 05/18/2018 07:47 AM, Greg Kroah-Hartman wrote:
On Thu, May 17, 2018 at 03:16:28PM -0500, Gustavo A. R. Silva wrote:
pdev_nr and rhport can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1
https://marc.info/?l=linux-kernel=152449131114778=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
Changes in v2:
- Place the barriers into valid_port.
drivers/usb/usbip/vhci_sysfs.c | 6 ++
1 file changed, 6 insertions(+)
diff -
On 05/17/2018 02:15 PM, Greg Kroah-Hartman wrote:
Shouldn't we just do this in one place, in the valid_port() function?
That way it keeps the range checking logic in one place (now it is in 3
places in the function), which should make maintenance much simpler.
Yep, I thought about that,
Hi Greg,
On 05/17/2018 01:51 AM, Greg Kroah-Hartman wrote:
On Wed, May 16, 2018 at 05:22:00PM -0500, Gustavo A. R. Silva wrote:
pdev_nr and rhport can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.
This issue was detected
tps://marc.info/?l=linux-kernel=152449131114778=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/usbip/vhci_sysfs.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.
Currently, logical and is being used instead of *bitwise* and.
Fix this by using a proper bitwise and operator.
Addresses-Coverity-ID: 1468455 ("Logical vs. bitwise operator")
Fixes: 64f7c494a3c0 ("typec: tcpm: Add support for sink PPS related
messages")
Signed-off-by: Gusta
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1468266 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/core/hcd.c | 1 +
1 file chan
,
in which case the code would look as follows instead:
iv = kcalloc(crypto_skcipher_ivsize(tfm_cbc), sizeof(*iv), GFP_KERNEL);
but if the data type of _iv_ never changes, or the type size is always one
byte, kzalloc is good enough.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.
I just discovered an issue with this patch. Please, drop it. I'll send
v2 shortly.
Thanks
--
Gustavo
On 03/16/2018 08:01 AM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA and replace it
with dynamic memory allocation instead.
The use of stack Variable Length
,
in which case the code would look as follows instead:
iv = kcalloc(crypto_skcipher_ivsize(tfm_cbc), sizeof(*iv), GFP_KERNEL);
but if the data type of _iv_ never changes, or the type size is always one
byte, kzalloc is good enough.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/dwc2/gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/d
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/misc/chaoskey.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
Simplify return logic and avoid unnecessary variable assignment.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/gadget/legacy/ncm.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/legacy/ncm.c b/drivers/usb/gadget/
Calling msg_data_left() is only useful for its return value,
which in this particular case is ignored.
Fix this by removing such call.
Addresses-Coverity-ID: 1427080
Fixes: 90120d15f4c3 ("usbip: prevent leaking socket pointer address in
messages")
Signed-off-by: Gustavo A. R. Si
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
Quoting Greg Kroah-Hartman <gre...@linuxfoundation.org>:
On Wed, Oct 25, 2017 at 02:05:05PM -0500, Gustavo A. R. Silva wrote:
Greg,
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
Add missing break statement to prevent the code for case C_HUB_OVER_CURRENT
from falling through to case C_HUB_LOCAL_POWER.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/host/isp1362-hcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/i
tchset.
Yes, it all depends, the rest of these patches are already in my tree.
OK. I'll send a new patch shortly.
Thanks!
--
Gustavo A. R. Silva
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
Mor
hrough" comment in the branch, but removing the else might
be better.
Thanks for the suggestion.
This code is pretty hard to read as is and could really use some clean
up...
I agree. I'll send a V2 of this patch and then let's see if I can help
with some code refactoring.
Thank you
--
Gustavo A. R. Silva
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoting Bjørn Mork <bj...@mork.no>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case I replaced "...drop on thro
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/typec/tps6598x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/tps6598x.c b/d
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/storage/sddr55.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/storage/sddr55.c b/d
Hi Felipe,
Quoting Felipe Balbi <ba...@kernel.org>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <garsi..
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/wusbcore/wa-xfer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/wusbcore/wa-xf
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/host/ehci-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/hos
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/host/fotg210-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/us
y in place. So I replaced them with proper "fall through"
comments, which is what GCC is expecting to find.
Thanks!
Gustavo A. R. Silva (9):
usb: host: fotg210-hcd: mark expected switch fall-through
usb: host: xhci: mark expected switch fall-through
usb: host: xhci-mem: mark expected s
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/host/ohci-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/hos
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/host/xhci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/us
Greg,
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>:
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/host/isp1362-hcd.c |
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/host/xhci-hub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-hub.c b/drive
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/host/pci-quirks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/ho
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/host/isp1362-hcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/isp1362-h
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/host/oxu210hp-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/us
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/host/xhci-mem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-mem.c b/drive
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/gadget/udc/dummy_hcd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadg
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/gadget/composite.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drive
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/class/usbtmc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/class/usbtmc.c b/drive
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/atm/cxacru.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/atm/cxacru.c b/drivers/u
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115006
Addresses-Coverity-ID: 115007
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/host/isp116x-hcd.c | 3 +++
1 file chan
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115004
Addresses-Coverity-ID: 115005
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/gadget/function/f_phonet.c | 2 ++
1 file c
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115014
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/serial/kobil_sct.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/d
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115016
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/storage/uas.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drive
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
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
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
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
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
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
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
Refactor code in order to avoid identical code for different branches.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/misc/ftdi-elan.c | 27 +--
1 file changed, 1 insertion(+), 26 del
Hi Yoshihiro,
On 08/09/2017 06:44 AM, Yoshihiro Shimoda wrote:
Hi Gustavo,
Thank you for the patch!
I'm glad to help :)
-Original Message-
From: Gustavo A. R. Silva
Sent: Wednesday, August 9, 2017 7:35 AM
platform_get_irq() returns an error code, but the renesas_usb3 driver
/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print and propagate the return value of platform_get_irq on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/host/ehci-omap
/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print error message and propagate the return value of platform_get_irq
on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/
/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print and propagate the return value of platform_get_irq on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/dwc3/dwc3-omap.c | 4 +
/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print error message and propagate the return value of platform_get_irq
on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/usb/host/imx21
Hi Oliver,
Quoting Oliver Neukum <oneu...@suse.com>:
Am Sonntag, den 09.07.2017, 21:00 -0500 schrieb Gustavo A. R. Silva :
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
Hi,
I need to ask:
Simplify return logic to avoid unnecessary variable declaration
and assignment.
These issues were detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <ga
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
d
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
d
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
d
Simplify return logic to avoid unnecessary variable assignments.
These issues were detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.
Simplify return logic to avoid unnecessary variable declaration
and assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.
Prefer unsigned int to bare use of unsigned.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/gadget/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index 23bfa7d..968179d
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
d
Simplify return logic to avoid unnecessary variable declaration
and assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
d
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
d
, e2; position p;
@@
snd_pcm_set_ops(e1, e2, @p)
@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct snd_pcm_ops i = { ... };
Signed-off-by: Gustavo A. R. Silva <ga
Value assigned to variable bufferspace at line 637 is overwritten
at line 613, before it can be used. This makes such variable
assignment useless.
Addresses-Coverity-ID: 1397677
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/gadget/udc/udc-xilinx.c | 1 -
Simplify return logic to avoid unnecessary variable assignment.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/musb/musb_host.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_
Add missing goto.
Addresses-Coverity-ID: 1226913
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/uwb/i1480/dfu/phy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/uwb/i1480/dfu/phy.c b/drivers/uwb/i1480/dfu/phy.c
index 3b1a87d..1ac8526 100644
--- a/d
Hi Greg,
Quoting Greg KH <gre...@linuxfoundation.org>:
On Thu, May 18, 2017 at 06:00:06PM -0500, Gustavo A. R. Silva wrote:
Hello everybody,
While looking into Coverity ID 1226913 I ran into the following piece of
code at drivers/uwb/i1480/dfu/phy.c:99:
99static
100int i1480_mp
ze_t size)
dev_err(i1480->dev, "MPI-READ: command execution
failed: %d\n",
reply->bResultCode);
result = -EIO;
+ goto out;
}
for (cnt = 0; cnt < size; cnt++) {
if (reply->
Hi Felipe,
Quoting Felipe Balbi <ba...@kernel.org>:
Hi,
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
Hello everybody,
While looking into Coverity ID 145958 I ran into the following piece
of code at drivers/usb/gadget/udc/amd5536udc.c:852:
}
d->bufptr = req->req.dma + i; /* assign buffer */
- else
- break;
+ td->bufptr = req->req.dma + i; /* assign buffer */
What do you think?
Thanks in advance for your comments
--
Gustavo A. R. Silva
--
To unsubscribe from this list
Add null check before dereferencing dev->regs pointer inside
net2280_led_shutdown() function.
Addresses-Coverity-ID: 101783
Cc: Alan Stern <st...@rowland.harvard.edu>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
Changes in v2:
Move the net2280_led_shutdo
Remove unnecessary null check. udev->tt cannot ever be NULL when this
section of code runs.
Addresses-Coverity-ID: 100828
Cc: Alan Stern <st...@rowland.harvard.edu>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/host/ehci-sched.c | 2 +-
1 file chang
Hi Alan,
Quoting Alan Stern <st...@rowland.harvard.edu>:
On Mon, 1 May 2017, Gustavo A. R. Silva wrote:
Add null check before dereferencing dev->regs pointer inside
net2280_led_shutdown() function.
Addresses-Coverity-ID: 101783
Signed-off-by: Gustavo A. R. Silva <garsi...@em
Hi Alan,
Quoting Alan Stern <st...@rowland.harvard.edu>:
On Mon, 1 May 2017, Gustavo A. R. Silva wrote:
Hello everybody,
While taking a look into Coverity ID 100828 I ran into the following
piece of code at drivers/usb/host/ehci-sched.c:1096:
u32 add
Add null check before dereferencing dev->regs pointer inside
net2280_led_shutdown() function.
Addresses-Coverity-ID: 101783
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/gadget/udc/net2280.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
d
think_time : 0;
+think_time = dev->tt->think_time;
But I can't tell for sure, so in case dev->tt is NULL, a good strategy
to properly update the _addr_ variable would be needed.
What do you think?
I would really appreciate any comment on this,
Thank you!
--
Gustavo A. R. Silva
--
To
Hello,
Quoting Felipe Balbi <felipe.ba...@linux.intel.com>:
Hi,
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
Code refactoring to make the flow easier to follow.
Cc: Alan Stern <st...@rowloand.harvard.edu>
Cc: Greg Kroah-Hartman <gre...@linuxfoundat
Remove unnecessary variable and update function prototype.
Acked-by: Michal Nazarewicz <min...@mina86.com>
Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
Changes in v2:
None.
drivers/usb/gadget/ud
Rewrite udc_free_dma_chain() function to avoid use of pointer after free.
Addresses-Coverity-ID: 1091172
Acked-by: Michal Nazarewicz <min...@mina86.com>
Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
Add missing continue in switch.
Addresses-Coverity-ID: 1248733
Cc: Alan Stern <st...@rowloand.harvard.edu>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
Changes in v2:
None.
drivers/usb/misc/usbtest.c | 1
Code refactoring to make the flow easier to follow.
Cc: Alan Stern <st...@rowloand.harvard.edu>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
Changes in v2:
Remove unfruitful changes in previous pat
Hi Alan,
Quoting Alan Stern <st...@rowland.harvard.edu>:
On Mon, 3 Apr 2017, Gustavo A. R. Silva wrote:
Code refactoring to make the flow easier to follow.
Cc: Alan Stern <st...@rowloand.harvard.edu>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: G
Code refactoring to make the flow easier to follow.
Cc: Alan Stern <st...@rowloand.harvard.edu>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/misc/usbtest.c | 67 +--
Quoting Alan Stern <st...@rowland.harvard.edu>:
On Mon, 3 Apr 2017, Greg Kroah-Hartman wrote:
On Mon, Apr 03, 2017 at 09:39:53AM -0500, Gustavo A. R. Silva wrote:
> -Code refactoring to make the flow easier to follow.
> -Add missing 'continue' for case USB_ENDPOINT_XFER_IN
Add missing continue in switch.
Addresses-Coverity-ID: 1248733
Cc: Alan Stern <st...@rowloand.harvard.edu>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/misc/usbtest.c | 1 +
1 file changed, 1
-Code refactoring to make the flow easier to follow.
-Add missing 'continue' for case USB_ENDPOINT_XFER_INT.
Addresses-Coverity-ID: 1248733
Cc: Alan Stern <st...@rowloand.harvard.edu>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/usb/misc/us
Remove pointer dereference after free.
Addresses-Coverity-ID: 1091173
Acked-by: Michal Nazarewicz <min...@mina86.com>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
Changes in v2:
Move pointer dereference before pci_pool_free()
Set pointer to NULL after free
C
Hello,
Quoting Felipe Balbi <ba...@kernel.org>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
Remove pointer dereference after free.
Addresses-Coverity-ID: 1091173
Acked-by: Michal Nazarewicz <min...@mina86.com>
Signed-off-by: Gustavo A. R. Si
Hi Peter,
Quoting Peter Senna Tschudin <peter.se...@gmail.com>:
On Mon, Feb 20, 2017 at 05:28:46PM -0600, Gustavo A. R. Silva wrote:
'val' is an unsigned variable, and less-than-zero comparison of an unsigned
variable is never true.
I would add that val is set by kstrtoul() that co
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>:
Hi Alan,
Quoting Alan Stern <st...@rowland.harvard.edu>:
On Tue, 21 Feb 2017, Gustavo A. R. Silva wrote:
Code refactoring to make the flow easier to follow and add missing
'continue' for case USB_ENDPOIN
1 - 100 of 136 matches
Mail list logo