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:	Tue, 31 Jan 2012 12:36:12 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] speed up /proc/pid/stat, statm

On Tue, 31 Jan 2012 17:14:43 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> +int seq_put_decimal_ll(struct seq_file *m, char delimiter,
> +			long long num)
> +{
> +	if (num < 0) {
> +		if (m->count + 3 >= m->size) {
> +			m->count = m->size;

Why is m->count udpated even thought we didn't write any data? 
seq_put_decimal_ull() does it too.

> +			return -1;
> +		}
> +		if (delimiter)
> +			m->buf[m->count++] = delimiter;
> +		num = -num;
> +		delimiter = '-';
> +	}
> +	return seq_put_decimal_ull(m, delimiter, num);
> +
> +}
> +EXPORT_SYMBOL(seq_put_decimal_ll);
--
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