Skip to content

Commit cb3b9cf

Browse files
committed
raw: use explicit llseek file operations
The raw_fops may need to seek, so there should be an explicit reference to default_llseek. raw_ctl_fops does not contain a read or write method, so we use noop_llseek to ignore seeking requests without an error. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 275bd41 commit cb3b9cf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/char/raw.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,15 @@ static const struct file_operations raw_fops = {
258258
.open = raw_open,
259259
.release = raw_release,
260260
.unlocked_ioctl = raw_ioctl,
261+
.llseek = default_llseek,
261262
.owner = THIS_MODULE,
262263
};
263264

264265
static const struct file_operations raw_ctl_fops = {
265266
.unlocked_ioctl = raw_ctl_ioctl,
266267
.open = raw_open,
267268
.owner = THIS_MODULE,
269+
.llseek = noop_llseek,
268270
};
269271

270272
static struct cdev raw_cdev;

0 commit comments

Comments
 (0)