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]
Date:   Tue, 22 Aug 2017 00:08:54 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Jakub Kicinski <kubakici@...pl>
Cc:     kvalo@...eaurora.org, matthias.bgg@...il.com,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] mt7601u: check memory allocation failure

Le 21/08/2017 à 23:41, Jakub Kicinski a écrit :
> On Mon, 21 Aug 2017 14:34:30 -0700, Jakub Kicinski wrote:
>> On Mon, 21 Aug 2017 22:59:56 +0200, Christophe JAILLET wrote:
>>> Check memory allocation failure and return -ENOMEM in such a case, as
>>> already done a few lines below
>>>
>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>> Acked-by: Jakub Kicinski <kubakici@...pl>
> Wait, I take that back.  This code is a bit weird.  We would return an
> error, then mt7601u_dma_init() will call mt7601u_free_tx_queue() which
> doesn't check for tx_q == NULL condition.
>
> Looks like mt7601u_free_tx() has to check for dev->tx_q == NULL and
> return early if that's the case.  Or mt7601u_alloc_tx() should really
> clean things up on it's own on failure.  Ugh.
>
You are right. Thanks for the review.

I've sent a v2 which updates 'mt7601u_free_tx()'.
Doing so sounds more in line with the spirit of this code.

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ