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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 12 Jan 2007 12:46:46 +0300
From:	Dmitry Antipov <antipov@....rtsoft.ru>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] 2.6.20-rc4: force fcntl(..., FASYNC) to return -EINVAL when
 f_op->fasync is NULL

Hello,

this is a proposal fix needed to receive an error when the user requests
'fcntl(fd, F_SETFL, FASYNC)' but lower levels are too poor to handle this.

Dmitry

--- .orig-2.6.20-rc4/fs/fcntl.c	2007-01-12 08:27:10.000000000 +0300
+++ 2.6.20-rc4/fs/fcntl.c	2007-01-12 09:56:14.000000000 +0300
@@ -236,11 +236,11 @@

  	lock_kernel();
  	if ((arg ^ filp->f_flags) & FASYNC) {
-		if (filp->f_op && filp->f_op->fasync) {
+		error = -EINVAL;
+		if (filp->f_op && filp->f_op->fasync)
  			error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
-			if (error < 0)
-				goto out;
-		}
+		if (error < 0)
+			goto out;
  	}

  	filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
-
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