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-next>] [day] [month] [year] [list]
Date:	Wed, 12 Nov 2014 17:38:28 +0100
From:	Martin Kepplinger <martink@...teo.de>
To:	clm@...com
Cc:	linux-btrfs@...r.kernel.org, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org, Martin Kepplinger <martink@...teo.de>
Subject: [PATCH] btrfs: Don't check for file->private_data on open(). It is set by the core.

The miscdevice core now sets file->private_data to the struct miscdevice
so don't fail when this is not NULL.

Signed-off-by: Martin Kepplinger <martink@...teo.de>
---
This is a question: what does this check provide and does overwriting
file->private_data make any difference?

Is miscdevice's open() by the user not allowed here, if file->private_data
is set?

thanks!!

 fs/btrfs/ioctl.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4399f0c..066ce41 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3752,10 +3752,6 @@ static long btrfs_ioctl_trans_start(struct file *file)
 	if (!capable(CAP_SYS_ADMIN))
 		goto out;
 
-	ret = -EINPROGRESS;
-	if (file->private_data)
-		goto out;
-
 	ret = -EROFS;
 	if (btrfs_root_readonly(root))
 		goto out;
-- 
1.7.10.4

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