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: <20090423125040.57db9968.akpm@linux-foundation.org>
Date:	Thu, 23 Apr 2009 12:50:40 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Nikanth Karthikesan <knikanth@...e.de>
Cc:	jens.axboe@...cle.com, David.Woodhouse@...el.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix discard requests accounting in the diskstats

On Fri, 17 Apr 2009 11:44:49 +0530
Nikanth Karthikesan <knikanth@...e.de> wrote:

> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -667,7 +667,9 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync)
>  	(REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
>  #define rq_mergeable(rq)	\
>  	(!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \
> -	 (blk_discard_rq(rq) || blk_fs_request((rq))))
> +	 (blk_discard_rq(rq) || blk_fs_request(rq)))
> +#define rq_accountable(rq)	\
> +	(blk_discard_rq(rq) || blk_fs_request(rq))

Both these macros reference their argument multiple times and are
potentially buggy and/or inefficient if passed an expression with
side-effects.

There was (afaict) no reason for them to have been implemented as
macros.

--
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