lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1593395293.3798.3.camel@mhfsdcap03>
Date:   Mon, 29 Jun 2020 09:48:13 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     Markus Elfring <Markus.Elfring@....de>
CC:     <linux-mediatek@...ts.infradead.org>, <linux-usb@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>,
        "Colin Ian King" <colin.king@...onical.com>
Subject: Re: usb: mtu3: Checking initialisation of the variable
 “mep” in two functions

Hi,
On Sat, 2020-06-27 at 14:28 +0200, Markus Elfring wrote:
> Hello,
> 
> A source code analysis approach by the means of the semantic patch language
> (Coccinelle software) pointed an implementation detail out for further
> development considerations.
> 
> The functions “mtu3_gadget_ep_set_halt” and “mtu3_gadget_ep_set_wedge” check
> at the beginning if the input parameter “ep” is a null pointer.
> The error code “-EINVAL” will be returned then.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/mtu3/mtu3_gadget.c?id=1590a2e1c681b0991bd42c992cabfd380e0338f2#n371
> https://elixir.bootlin.com/linux/v5.7.2/source/drivers/usb/mtu3/mtu3_gadget.c#L371
> 
> Can it be nicer to assign the variable “mep” only after a successful check
> instead of an initialisation before?
Yes, I'll fix it, thanks a lot

> 
> Regards,
> Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ