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
| ||
|
Date: Mon, 30 Jul 2007 23:23:49 -0300 From: Diego Woitasen <diego@...tasen.com.ar> To: dm-devel@...hat.com Cc: linux-kernel@...r.kernel.org, Diego Woitasen <diego@...tasen.com.ar> Subject: [PATCH] remove unneded lock_kernel in drivers/md/dm.c and use unlocked_ioctl. Signed-off-by: Diego Woitasen <diego@...tasen.com.ar> --- drivers/md/dm.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 141ff9f..aebb207 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -282,17 +282,16 @@ static int dm_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo) return dm_get_geometry(md, geo); } -static int dm_blk_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static long dm_blk_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct mapped_device *md; struct dm_table *map; struct dm_target *tgt; + struct inode *inode; int r = -ENOTTY; - /* We don't really need this lock, but we do need 'inode'. */ - unlock_kernel(); + inode = file->f_path.dentry->d_inode; md = inode->i_bdev->bd_disk->private_data; map = dm_get_table(md); @@ -317,7 +316,6 @@ static int dm_blk_ioctl(struct inode *inode, struct file *file, out: dm_table_put(map); - lock_kernel(); return r; } @@ -1550,7 +1548,7 @@ EXPORT_SYMBOL_GPL(dm_noflush_suspending); static struct block_device_operations dm_blk_dops = { .open = dm_blk_open, .release = dm_blk_close, - .ioctl = dm_blk_ioctl, + .unlocked_ioctl = dm_blk_ioctl, .getgeo = dm_blk_getgeo, .owner = THIS_MODULE }; -- 1.5.2.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