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: <CAOMdWS+mOcm=6722SD=-SvfD59AeXpwAARLhT31UycQSqWTxdg@mail.gmail.com>
Date:   Wed, 13 Sep 2017 18:34:17 +0530
From:   Allen <allen.lkml@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     linux-kernel@...r.kernel.org, nouveau@...ts.freedesktop.org,
        linux-crypto@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        MPT-FusionLinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
        netdev@...r.kernel.org, megaraidlinux.pdl@...adcom.com,
        target-devel@...r.kernel.org, linux-fbdev@...r.kernel.org,
        linux-btrfs@...r.kernel.org
Subject: Re: [PATCH 06/10] drivers:ethernet: return -ENOMEM on allocation failure.

>
> static int cas_alloc_rxds(struct cas *cp)
> {
>         int i;
>
>         for (i = 0; i < N_RX_DESC_RINGS; i++) {
>                 if (cas_alloc_rx_desc(cp, i) < 0) {
>                         cas_free_rxds(cp);
>                         return -1;
>                 }
>         }
>         return 0;
> }
>
> Again, your change is correct, but in the end the value is not used.
> And if you fix it at the cas_alloc_rxds level, you also need a fix at
> the next level up:
>
>         err = -ENOMEM;
>         if (cas_tx_tiny_alloc(cp) < 0)
>                 goto err_unlock;
>
>         /* alloc rx descriptors */
>         if (cas_alloc_rxds(cp) < 0)
>                 goto err_tx_tiny;
>
> again, the return value is discarded.

 I agree. I could send out v2 with fixes at both level.

- Allen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ