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]
Date:	Fri, 9 Mar 2007 20:22:44 -0500
From:	Benjamin LaHaise <bcrl@...ck.org>
To:	Zach Brown <zach.brown@...cle.com>
Cc:	linux-aio@...ck.org, linux-kernel@...r.kernel.org,
	Jeff Moyer <jmoyer@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] dio: invalidate clean pages before dio write

On Fri, Mar 09, 2007 at 02:35:57PM -0800, Zach Brown wrote:
> +	if (rw == WRITE && mapping->nrpages) {
> +		int err = invalidate_inode_pages2_range(mapping,
> +					      offset >> PAGE_CACHE_SHIFT, end);
> +		if (err && retval >= 0)
> +			retval = err;
> +	}

I don't think reporting the error is the correct thing to do in the presense 
of the write having completed.  It's a race that the caller can do nothing 
about and is arguably a kernel bug, so I'd rather do something like:

		if (err) {
			if (!retval)
				retval = err;
			else
				printk_ratelimited(KERN_DEBUG
					"dio sucks and hit the race %ld %ld\n",
					retval, err);
		}

Aside from that, I much prefer this approach to fix the problem than going 
around and changing semantics.  Feel free to add my Signed-off-by.

		-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <zyntrop@...ck.org>.
-
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