diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/mem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index e985b1c2730e..1256454b2d43 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -876,6 +876,10 @@ static int memory_open(struct inode *inode, struct file *filp) if (dev->dev_info) filp->f_mapping->backing_dev_info = dev->dev_info; + /* Is /dev/mem or /dev/kmem ? */ + if (dev->dev_info == &directly_mappable_cdev_bdi) + filp->f_mode |= FMODE_UNSIGNED_OFFSET; + if (dev->fops->open) return dev->fops->open(inode, filp); |