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]
Message-Id: <E1JmoR2-0005j2-VU@pomaz-ex.szeredi.hu>
Date:	Fri, 18 Apr 2008 13:07:16 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	epiphani@...il.com
CC:	miklos@...redi.hu, bfields@...ldses.org,
	trond.myklebust@....uio.no, eshel@...aden.ibm.com, neilb@...e.de,
	akpm@...ux-foundation.org, linux-nfs@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: nfs: lock stuck after interrupt

> We brought up this specific issue a few weeks ago in this thread:
> 
> http://marc.info/?l=linux-nfs&m=120663578712912&w=2
> 
> While we had a fix that tested out properly (third reply in the
> thread), I believe Trond fixed this recently in a more "correct"
> method with this patch (and series):
> 
> http://marc.info/?l=linux-nfs&m=120726349027607&w=2
> 
> We haven't had the opportunity to check Tronds' patch yet though.

Thanks for the info.

1) I pulled the devel branch of nfs-2.6.git and tested the same setup,
   with exactly the same result as previously.

2) then I added your patch on top of that, which did change something
   but not really for the better: now even the restarted lock request
   doesn't succeed after the interrupt.

According to my suspicion, this is an issue in the server, while both
referenced patches touch only the client.

Appended little test program which I'm trying out locking with.

Miklos
---

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

static void int_handler(int s)
{
	(void) s;
	fprintf(stderr, "signal caught\n");
}

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

	if (argc != 2) {
		fprintf(stderr, "usage: %s filename\n", argv[0]);
		return 1;
	}

	signal(SIGINT, int_handler);

	fd = open(filename, O_RDWR | O_CREAT, 0666);
	if (fd == -1) {
		perror("open");
		return 1;
	}

	res = lockf(fd, F_LOCK, 100);
	if (res == -1) {
		perror("lockf");
		return 1;
	}
	printf("locked\n");
	pause();
	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