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]
Date:   Mon, 15 Jan 2018 14:52:35 +0100
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Faiz Abbas <faiz_abbas@...com>, wg@...ndegger.com,
        robh+dt@...nel.org, mark.rutland@....com
Cc:     linux-can@...r.kernel.org, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        nsekhar@...com, fcooper@...com, robh@...nel.org,
        Wenyou.Yang@...rochip.com, sergei.shtylyov@...entembedded.com,
        linux-omap@...r.kernel.org, b29396@...escale.com
Subject: Re: [PATCH v7 4/8] can: m_can: Move allocation of net device to probe

On 01/10/2018 11:55 AM, Faiz Abbas wrote:
> With the version no longer required to allocate the net device, it can
> be moved to probe and the alloc_m_can_dev() function can be simplified.
> 
> Therefore, move the allocation of net device to probe and change
> alloc_m_can_dev() to setup_m_can_dev().

The error handling is broken with this patch,

Have a look at the switch (priv->version) in setup_m_can_dev(), you free
the m_can_dev in case of error, but exit with -EINVAL in the beginning
of the function. setup_m_can_dev() should not free if it doesn't allocate.

The error handling in m_can_plat_probe() is broken, too. If
pm_runtime_get_sync(&pdev->dev) fails, you don't free the candev.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ