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, 29 Oct 2012 20:30:31 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Nitin Gupta <ngupta@...are.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] zram: handle mem suffixes in disk size zram_sysfs
 parameter

On (10/29/12 10:21), Nitin Gupta wrote:
> >+#include <linux/kernel.h>
> >
> >  #include "zram_drv.h"
> >
> >@@ -54,13 +55,12 @@ static ssize_t disksize_show(struct device *dev,
> >  static ssize_t disksize_store(struct device *dev,
> >  		struct device_attribute *attr, const char *buf, size_t len)
> >  {
> >-	int ret;
> >  	u64 disksize;
> >  	struct zram *zram = dev_to_zram(dev);
> >
> >-	ret = kstrtoull(buf, 10, &disksize);
> >-	if (ret)
> >-		return ret;
> >+	disksize = memparse(buf, NULL);
> >+	if (disksize < 1)
> >+		return -EINVAL;
> >
> 
> or, just: if (!disksize) ...
> 

will resend shortly.

	-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ