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:	Mon, 20 Jan 2014 01:27:58 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Dave Airlie <airlied@...hat.com>
Cc:	linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] fs: export simple_dname for drm drivers.

On Mon, Jan 20, 2014 at 10:54:44AM +1000, Dave Airlie wrote:
> David Herrmann's changes to use a pseudo filesystem for drm's shared
> inodes requires this be exported for drm to build as a module.
> 
> I'd like to merge this via the drm tree, so please ack.

Having looked through these patches...  The problem is that you'll get
your module impossible to unload.  Sane solution:

static struct vfsmount *drm_mnt;
static int count;
struct inode *drm_alloc_inode(void)
{
	struct inode *res;
	int err = simple_pin_fs(&drm_fs, &drm_mnt, &count);
	if (err)
		return ERR_PTR(err);
	res = alloc_anon_inode(drm_mnt->mnt_sb);
	if (IS_ERR(res))
		simple_release_fs(&drm_mnt, &count);
	return res;
}

/* call from drm_free_dev() */
void drm_put_anon_inode(struct drm_device *dev)
{
	iput(dev->anon_inode);
	simple_release_fs(&drm_mnt, &count);
}

and lose those kern_mount/kern_umount.
--
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