git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[IRDA]: Fix rfcomm use-after-free
[pandora-kernel.git]
/
drivers
/
mtd
/
mtdchar.c
diff --git
a/drivers/mtd/mtdchar.c
b/drivers/mtd/mtdchar.c
index
3013d08
..
8c86b80
100644
(file)
--- a/
drivers/mtd/mtdchar.c
+++ b/
drivers/mtd/mtdchar.c
@@
-419,8
+419,9
@@
static int mtd_ioctl(struct inode *inode, struct file *file,
info.erasesize = mtd->erasesize;
info.writesize = mtd->writesize;
info.oobsize = mtd->oobsize;
info.erasesize = mtd->erasesize;
info.writesize = mtd->writesize;
info.oobsize = mtd->oobsize;
- info.ecctype = mtd->ecctype;
- info.eccsize = mtd->eccsize;
+ /* The below fields are obsolete */
+ info.ecctype = -1;
+ info.eccsize = 0;
if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
return -EFAULT;
break;
if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
return -EFAULT;
break;
@@
-552,7
+553,7
@@
static int mtd_ioctl(struct inode *inode, struct file *file,
ops.datbuf = NULL;
ops.mode = MTD_OOB_PLACE;
ops.datbuf = NULL;
ops.mode = MTD_OOB_PLACE;
- if (ops.ooboffs && ops.len > (mtd->oobsize - ops.ooboffs))
+ if (ops.ooboffs && ops.
oob
len > (mtd->oobsize - ops.ooboffs))
return -EINVAL;
ops.oobbuf = kmalloc(buf.length, GFP_KERNEL);
return -EINVAL;
ops.oobbuf = kmalloc(buf.length, GFP_KERNEL);
@@
-759,7
+760,7
@@
static int mtd_ioctl(struct inode *inode, struct file *file,
return ret;
} /* memory_ioctl */
return ret;
} /* memory_ioctl */
-static struct file_operations mtd_fops = {
+static
const
struct file_operations mtd_fops = {
.owner = THIS_MODULE,
.llseek = mtd_lseek,
.read = mtd_read,
.owner = THIS_MODULE,
.llseek = mtd_lseek,
.read = mtd_read,