Skip to content

Commit 58ea91c

Browse files
Martin SchwidefskyMartin Schwidefsky
authored andcommitted
[S390] avoid default_llseek in s390 drivers
Use nonseekable_open for a couple of s390 device drivers. This avoids the use of default_llseek function which has a dependency on the BKL. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent f73a2b0 commit 58ea91c

8 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎arch/s390/hypfs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int hypfs_open(struct inode *inode, struct file *filp)
145145
}
146146
mutex_unlock(&fs_info->lock);
147147
}
148-
return 0;
148+
return nonseekable_open(inode, filp);
149149
}
150150

151151
static ssize_t hypfs_aio_read(struct kiocb *iocb, const struct iovec *iov,

‎arch/s390/kernel/debug.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ debug_open(struct inode *inode, struct file *file)
655655
p_info->act_entry_offset = 0;
656656
file->private_data = p_info;
657657
debug_info_get(debug_info);
658+
nonseekable_open(inode, file);
658659
out:
659660
mutex_unlock(&debug_mutex);
660661
return rc;

‎drivers/s390/char/fs3270.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ fs3270_open(struct inode *inode, struct file *filp)
484484
raw3270_del_view(&fp->view);
485485
goto out;
486486
}
487+
nonseekable_open(inode, filp);
487488
filp->private_data = fp;
488489
out:
489490
mutex_unlock(&fs3270_mutex);

‎drivers/s390/char/zcore.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ static int zcore_memmap_open(struct inode *inode, struct file *filp)
445445
}
446446
kfree(chunk_array);
447447
filp->private_data = buf;
448-
return 0;
448+
return nonseekable_open(inode, filp);
449449
}
450450

451451
static int zcore_memmap_release(struct inode *inode, struct file *filp)
@@ -473,7 +473,7 @@ static ssize_t zcore_reipl_write(struct file *filp, const char __user *buf,
473473

474474
static int zcore_reipl_open(struct inode *inode, struct file *filp)
475475
{
476-
return 0;
476+
return nonseekable_open(inode, filp);
477477
}
478478

479479
static int zcore_reipl_release(struct inode *inode, struct file *filp)

‎drivers/s390/cio/chsc_sch.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ static long chsc_ioctl(struct file *filp, unsigned int cmd,
803803

804804
static const struct file_operations chsc_fops = {
805805
.owner = THIS_MODULE,
806+
.open = nonseekable_open,
806807
.unlocked_ioctl = chsc_ioctl,
807808
.compat_ioctl = chsc_ioctl,
808809
};

‎drivers/s390/cio/css.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ static ssize_t cio_settle_write(struct file *file, const char __user *buf,
10651065
}
10661066

10671067
static const struct file_operations cio_settle_proc_fops = {
1068+
.open = nonseekable_open,
10681069
.write = cio_settle_write,
10691070
};
10701071

‎drivers/s390/crypto/zcrypt_api.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static ssize_t zcrypt_write(struct file *filp, const char __user *buf,
302302
static int zcrypt_open(struct inode *inode, struct file *filp)
303303
{
304304
atomic_inc(&zcrypt_open_count);
305-
return 0;
305+
return nonseekable_open(inode, filp);
306306
}
307307

308308
/**

‎drivers/s390/scsi/zfcp_cfdc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command,
254254
}
255255

256256
static const struct file_operations zfcp_cfdc_fops = {
257+
.open = nonseekable_open,
257258
.unlocked_ioctl = zfcp_cfdc_dev_ioctl,
258259
#ifdef CONFIG_COMPAT
259260
.compat_ioctl = zfcp_cfdc_dev_ioctl

0 commit comments

Comments
 (0)