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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230326150225.p5m4fxcwmhwdmtd3@intel.intel>
Date:   Sun, 26 Mar 2023 17:02:25 +0200
From:   Andi Shyti <andi.shyti@...nel.org>
To:     Ye Xiang <xiang.ye@...el.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Matthias Kaehlcke <mka@...omium.org>,
        Lee Jones <lee@...nel.org>, Wolfram Sang <wsa@...nel.org>,
        Tyrone Ting <kfting@...oton.com>,
        Mark Brown <broonie@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>, linux-usb@...r.kernel.org,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-spi@...r.kernel.org, linux-gpio@...r.kernel.org,
        srinivas.pandruvada@...el.com, heikki.krogerus@...ux.intel.com,
        andriy.shevchenko@...ux.intel.com, sakari.ailus@...ux.intel.com,
        zhifeng.wang@...el.com, wentong.wu@...el.com, lixu.zhang@...el.com
Subject: Re: [PATCH v6 1/6] usb: Add support for Intel LJCA device

Hi Ye,

> +static void ljca_read_complete(struct urb *urb)
> +{
> +	struct ljca_msg *header = urb->transfer_buffer;
> +	struct ljca_dev *dev = urb->context;
> +	int len = urb->actual_length;
> +	int ret;
> +
> +	WARN_ON_ONCE(!dev);
> +	WARN_ON_ONCE(!header);

WARN_* macros should be used when we can recover from that
condition, while we are running straight to a NULL pointer
dereference.

If !dev or !header is not a warning but a "bug", so either you
make sure we don't go ahead or remove the check.

The rest looks fairly good,
Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ