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:	Fri, 06 Apr 2012 11:43:29 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	"Myklebust\, Trond" <Trond.Myklebust@...app.com>
Cc:	"bfields\@fieldses.org" <bfields@...ldses.org>,
	"linux-nfs\@vger.kernel.org" <linux-nfs@...r.kernel.org>,
	"linux-fsdevel\@vger.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [REGRESSION] NFSv4: open(O_TRUNC) hangs

"Myklebust, Trond" <Trond.Myklebust@...app.com> writes:

> The following client patch fixes the regression for me.

It fixes the hang, but it still doesn't work 100% correctly.  Try the
following test program.

BTW, do you run any fs test suits?  All these were caught with one I use
to quick test fuse (it's in the fuse git tree(*) under the "test"
directory).  But I guess others like LTP would catch these as well.

Thanks,
Miklos

(*)  git://fuse.git.sourceforge.net/gitroot/fuse/fuse
---

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>

int main(int argc, char *argv[])
{
	int res;
	char *name = argv[1];

	unlink(name);
	close(creat(name, 0400));
	res = open(name, O_RDONLY | O_TRUNC);
	if (res != -1 && errno != EPERM)
		fprintf(stderr, "should have failed!\n");

	return 0;
}
--
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