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: <20210510104346.10947-1-miquel.raynal@bootlin.com>
Date:   Mon, 10 May 2021 12:43:46 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Yang Li <yang.lee@...ux.alibaba.com>, miquel.raynal@...tlin.com
Cc:     richard@....at, vigneshr@...com, linux-mtd@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: return -ENOMEM when kmalloc failed

On Mon, 2021-04-26 at 09:32:23 UTC, Yang Li wrote:
> The driver is using -1 instead of the -ENOMEM defined macro to
> specify that a buffer allocation failed. Using the correct error
> code is more intuitive
> 
> Smatch tool warning:
> drivers/mtd/inftlmount.c:333 check_free_sectors() warn: returning -1
> instead of -ENOMEM is sloppy
> drivers/mtd/nftlmount.c:272 check_free_sectors() warn: returning -1
> instead of -ENOMEM is sloppy
> 
> No functional change, just more standardized.
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ