All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/scsi/sg.c:1145 sg_ioctl_common() warn: inconsistent returns 'sfp->rq_list_lock'.
Date: Mon, 09 Nov 2020 19:41:16 +0800	[thread overview]
Message-ID: <202011091909.kC8zu7Xf-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 20303 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arnd Bergmann <arnd@arndb.de>
CC: Ben Hutchings <bwh@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f8394f232b1eab649ce2df5c5f15b0e528c92091
commit: d320a9551e394cb2d842fd32d28e9805c2a18fbb compat_ioctl: scsi: move ioctl handling into drivers
date:   10 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 10 months ago
config: ia64-randconfig-m031-20201109 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/scsi/sg.c:1145 sg_ioctl_common() warn: inconsistent returns 'sfp->rq_list_lock'.

Old smatch warnings:
drivers/scsi/sg.c:1094 sg_ioctl_common() warn: inconsistent indenting

vim +1145 drivers/scsi/sg.c

fd6c3d5accea8e7 Arnd Bergmann     2018-08-24   912  
37b9d1e0017b2d8 Jörn Engel        2012-04-12   913  static long
d320a9551e394cb Arnd Bergmann     2019-03-15   914  sg_ioctl_common(struct file *filp, Sg_device *sdp, Sg_fd *sfp,
d320a9551e394cb Arnd Bergmann     2019-03-15   915  		unsigned int cmd_in, void __user *p)
^1da177e4c3f415 Linus Torvalds    2005-04-16   916  {
^1da177e4c3f415 Linus Torvalds    2005-04-16   917  	int __user *ip = p;
176aa9d6ee2db58 Christoph Hellwig 2014-10-11   918  	int result, val, read_only;
^1da177e4c3f415 Linus Torvalds    2005-04-16   919  	Sg_request *srp;
^1da177e4c3f415 Linus Torvalds    2005-04-16   920  	unsigned long iflags;
^1da177e4c3f415 Linus Torvalds    2005-04-16   921  
95e159d6dd808b2 Hannes Reinecke   2014-06-25   922  	SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp,
95e159d6dd808b2 Hannes Reinecke   2014-06-25   923  				   "sg_ioctl: cmd=0x%x\n", (int) cmd_in));
^1da177e4c3f415 Linus Torvalds    2005-04-16   924  	read_only = (O_RDWR != (filp->f_flags & O_ACCMODE));
^1da177e4c3f415 Linus Torvalds    2005-04-16   925  
^1da177e4c3f415 Linus Torvalds    2005-04-16   926  	switch (cmd_in) {
^1da177e4c3f415 Linus Torvalds    2005-04-16   927  	case SG_IO:
cc833acbee9db5c Douglas Gilbert   2014-06-25   928  		if (atomic_read(&sdp->detaching))
^1da177e4c3f415 Linus Torvalds    2005-04-16   929  			return -ENODEV;
^1da177e4c3f415 Linus Torvalds    2005-04-16   930  		if (!scsi_block_when_processing_errors(sdp->device))
^1da177e4c3f415 Linus Torvalds    2005-04-16   931  			return -ENXIO;
dddbf8d908e89af Jörn Engel        2012-04-12   932  		result = sg_new_write(sfp, filp, p, SZ_SG_IO_HDR,
dddbf8d908e89af Jörn Engel        2012-04-12   933  				 1, read_only, 1, &srp);
^1da177e4c3f415 Linus Torvalds    2005-04-16   934  		if (result < 0)
^1da177e4c3f415 Linus Torvalds    2005-04-16   935  			return result;
3f0c6aba0b65a68 Jörn Engel        2012-04-12   936  		result = wait_event_interruptible(sfp->read_wait,
cc833acbee9db5c Douglas Gilbert   2014-06-25   937  			(srp_done(sfp, srp) || atomic_read(&sdp->detaching)));
cc833acbee9db5c Douglas Gilbert   2014-06-25   938  		if (atomic_read(&sdp->detaching))
^1da177e4c3f415 Linus Torvalds    2005-04-16   939  			return -ENODEV;
a2dd3b4cea33571 Tony Battersby    2009-01-20   940  		write_lock_irq(&sfp->rq_list_lock);
a2dd3b4cea33571 Tony Battersby    2009-01-20   941  		if (srp->done) {
a2dd3b4cea33571 Tony Battersby    2009-01-20   942  			srp->done = 2;
a2dd3b4cea33571 Tony Battersby    2009-01-20   943  			write_unlock_irq(&sfp->rq_list_lock);
794c10fa0fa4d17 Jörn Engel        2012-04-12   944  			result = sg_new_read(sfp, p, SZ_SG_IO_HDR, srp);
794c10fa0fa4d17 Jörn Engel        2012-04-12   945  			return (result < 0) ? result : 0;
a2dd3b4cea33571 Tony Battersby    2009-01-20   946  		}
^1da177e4c3f415 Linus Torvalds    2005-04-16   947  		srp->orphan = 1;
a2dd3b4cea33571 Tony Battersby    2009-01-20   948  		write_unlock_irq(&sfp->rq_list_lock);
^1da177e4c3f415 Linus Torvalds    2005-04-16   949  		return result;	/* -ERESTARTSYS because signal hit process */
^1da177e4c3f415 Linus Torvalds    2005-04-16   950  	case SG_SET_TIMEOUT:
^1da177e4c3f415 Linus Torvalds    2005-04-16   951  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16   952  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16   953  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16   954  		if (val < 0)
^1da177e4c3f415 Linus Torvalds    2005-04-16   955  			return -EIO;
f8630bd7e2185d1 Paul Burton       2016-08-19   956  		if (val >= mult_frac((s64)INT_MAX, USER_HZ, HZ))
f8630bd7e2185d1 Paul Burton       2016-08-19   957  			val = min_t(s64, mult_frac((s64)INT_MAX, USER_HZ, HZ),
b9b6e80ad3b1177 Paul Burton       2016-08-19   958  				    INT_MAX);
^1da177e4c3f415 Linus Torvalds    2005-04-16   959  		sfp->timeout_user = val;
f8630bd7e2185d1 Paul Burton       2016-08-19   960  		sfp->timeout = mult_frac(val, HZ, USER_HZ);
^1da177e4c3f415 Linus Torvalds    2005-04-16   961  
^1da177e4c3f415 Linus Torvalds    2005-04-16   962  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16   963  	case SG_GET_TIMEOUT:	/* N.B. User receives timeout as return value */
^1da177e4c3f415 Linus Torvalds    2005-04-16   964  				/* strange ..., for backward compatibility */
^1da177e4c3f415 Linus Torvalds    2005-04-16   965  		return sfp->timeout_user;
^1da177e4c3f415 Linus Torvalds    2005-04-16   966  	case SG_SET_FORCE_LOW_DMA:
745dfa0d8ec26b2 Hannes Reinecke   2017-04-07   967  		/*
745dfa0d8ec26b2 Hannes Reinecke   2017-04-07   968  		 * N.B. This ioctl never worked properly, but failed to
745dfa0d8ec26b2 Hannes Reinecke   2017-04-07   969  		 * return an error value. So returning '0' to keep compability
745dfa0d8ec26b2 Hannes Reinecke   2017-04-07   970  		 * with legacy applications.
745dfa0d8ec26b2 Hannes Reinecke   2017-04-07   971  		 */
^1da177e4c3f415 Linus Torvalds    2005-04-16   972  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16   973  	case SG_GET_LOW_DMA:
745dfa0d8ec26b2 Hannes Reinecke   2017-04-07   974  		return put_user((int) sdp->device->host->unchecked_isa_dma, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16   975  	case SG_GET_SCSI_ID:
a16a47416d3f4f7 Al Viro           2019-10-17   976  		{
a16a47416d3f4f7 Al Viro           2019-10-17   977  			sg_scsi_id_t v;
^1da177e4c3f415 Linus Torvalds    2005-04-16   978  
cc833acbee9db5c Douglas Gilbert   2014-06-25   979  			if (atomic_read(&sdp->detaching))
^1da177e4c3f415 Linus Torvalds    2005-04-16   980  				return -ENODEV;
a16a47416d3f4f7 Al Viro           2019-10-17   981  			memset(&v, 0, sizeof(v));
a16a47416d3f4f7 Al Viro           2019-10-17   982  			v.host_no = sdp->device->host->host_no;
a16a47416d3f4f7 Al Viro           2019-10-17   983  			v.channel = sdp->device->channel;
a16a47416d3f4f7 Al Viro           2019-10-17   984  			v.scsi_id = sdp->device->id;
a16a47416d3f4f7 Al Viro           2019-10-17   985  			v.lun = sdp->device->lun;
a16a47416d3f4f7 Al Viro           2019-10-17   986  			v.scsi_type = sdp->device->type;
a16a47416d3f4f7 Al Viro           2019-10-17   987  			v.h_cmd_per_lun = sdp->device->host->cmd_per_lun;
a16a47416d3f4f7 Al Viro           2019-10-17   988  			v.d_queue_depth = sdp->device->queue_depth;
a16a47416d3f4f7 Al Viro           2019-10-17   989  			if (copy_to_user(p, &v, sizeof(sg_scsi_id_t)))
a16a47416d3f4f7 Al Viro           2019-10-17   990  				return -EFAULT;
^1da177e4c3f415 Linus Torvalds    2005-04-16   991  			return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16   992  		}
^1da177e4c3f415 Linus Torvalds    2005-04-16   993  	case SG_SET_FORCE_PACK_ID:
^1da177e4c3f415 Linus Torvalds    2005-04-16   994  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16   995  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16   996  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16   997  		sfp->force_packid = val ? 1 : 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16   998  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16   999  	case SG_GET_PACK_ID:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1000  		read_lock_irqsave(&sfp->rq_list_lock, iflags);
109bade9c625c89 Hannes Reinecke   2017-04-07  1001  		list_for_each_entry(srp, &sfp->rq_list, entry) {
^1da177e4c3f415 Linus Torvalds    2005-04-16  1002  			if ((1 == srp->done) && (!srp->sg_io_owned)) {
^1da177e4c3f415 Linus Torvalds    2005-04-16  1003  				read_unlock_irqrestore(&sfp->rq_list_lock,
^1da177e4c3f415 Linus Torvalds    2005-04-16  1004  						       iflags);
a16a47416d3f4f7 Al Viro           2019-10-17  1005  				return put_user(srp->header.pack_id, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1006  			}
^1da177e4c3f415 Linus Torvalds    2005-04-16  1007  		}
^1da177e4c3f415 Linus Torvalds    2005-04-16  1008  		read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
a16a47416d3f4f7 Al Viro           2019-10-17  1009  		return put_user(-1, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1010  	case SG_GET_NUM_WAITING:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1011  		read_lock_irqsave(&sfp->rq_list_lock, iflags);
109bade9c625c89 Hannes Reinecke   2017-04-07  1012  		val = 0;
109bade9c625c89 Hannes Reinecke   2017-04-07  1013  		list_for_each_entry(srp, &sfp->rq_list, entry) {
^1da177e4c3f415 Linus Torvalds    2005-04-16  1014  			if ((1 == srp->done) && (!srp->sg_io_owned))
^1da177e4c3f415 Linus Torvalds    2005-04-16  1015  				++val;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1016  		}
^1da177e4c3f415 Linus Torvalds    2005-04-16  1017  		read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1018  		return put_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1019  	case SG_GET_SG_TABLESIZE:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1020  		return put_user(sdp->sg_tablesize, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1021  	case SG_SET_RESERVED_SIZE:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1022  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1023  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1024  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1025                  if (val < 0)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1026                          return -EINVAL;
44ec95425c1d9dc Alan Stern        2007-02-20  1027  		val = min_t(int, val,
46f69e6a6bbbf38 Akinobu Mita      2014-06-02  1028  			    max_sectors_bytes(sdp->device->request_queue));
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1029  		mutex_lock(&sfp->f_mutex);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1030  		if (val != sfp->reserve.bufflen) {
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1031  			if (sfp->mmap_called ||
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1032  			    sfp->res_in_use) {
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1033  				mutex_unlock(&sfp->f_mutex);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1034  				return -EBUSY;
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1035  			}
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1036  
95e159d6dd808b2 Hannes Reinecke   2014-06-25  1037  			sg_remove_scat(sfp, &sfp->reserve);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1038  			sg_build_reserve(sfp, val);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1039  		}
1bc0eb0446158cc Hannes Reinecke   2017-04-07  1040  		mutex_unlock(&sfp->f_mutex);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1041  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1042  	case SG_GET_RESERVED_SIZE:
44ec95425c1d9dc Alan Stern        2007-02-20  1043  		val = min_t(int, sfp->reserve.bufflen,
46f69e6a6bbbf38 Akinobu Mita      2014-06-02  1044  			    max_sectors_bytes(sdp->device->request_queue));
^1da177e4c3f415 Linus Torvalds    2005-04-16  1045  		return put_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1046  	case SG_SET_COMMAND_Q:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1047  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1048  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1049  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1050  		sfp->cmd_q = val ? 1 : 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1051  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1052  	case SG_GET_COMMAND_Q:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1053  		return put_user((int) sfp->cmd_q, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1054  	case SG_SET_KEEP_ORPHAN:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1055  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1056  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1057  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1058  		sfp->keep_orphan = val;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1059  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1060  	case SG_GET_KEEP_ORPHAN:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1061  		return put_user((int) sfp->keep_orphan, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1062  	case SG_NEXT_CMD_LEN:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1063  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1064  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1065  			return result;
bf33f87dd04c371 peter chang       2017-02-15  1066  		if (val > SG_MAX_CDB_SIZE)
bf33f87dd04c371 peter chang       2017-02-15  1067  			return -ENOMEM;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1068  		sfp->next_cmd_len = (val > 0) ? val : 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1069  		return 0;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1070  	case SG_GET_VERSION_NUM:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1071  		return put_user(sg_version_num, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1072  	case SG_GET_ACCESS_COUNT:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1073  		/* faked - we don't have a real access count anymore */
^1da177e4c3f415 Linus Torvalds    2005-04-16  1074  		val = (sdp->device ? 1 : 0);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1075  		return put_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1076  	case SG_GET_REQUEST_TABLE:
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1077  		{
cb59e8408381939 Douglas Gilbert   2005-04-02  1078  			sg_req_info_t *rinfo;
cb59e8408381939 Douglas Gilbert   2005-04-02  1079  
6396bb221514d28 Kees Cook         2018-06-12  1080  			rinfo = kcalloc(SG_MAX_QUEUE, SZ_SG_REQ_INFO,
cb59e8408381939 Douglas Gilbert   2005-04-02  1081  					GFP_KERNEL);
cb59e8408381939 Douglas Gilbert   2005-04-02  1082  			if (!rinfo)
cb59e8408381939 Douglas Gilbert   2005-04-02  1083  				return -ENOMEM;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1084  			read_lock_irqsave(&sfp->rq_list_lock, iflags);
4759df905a474d2 Hannes Reinecke   2017-09-15  1085  			sg_fill_request_table(sfp, rinfo);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1086  			read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1087  	#ifdef CONFIG_COMPAT
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1088  			if (in_compat_syscall())
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1089  				result = put_compat_request_table(p, rinfo);
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1090  			else
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1091  	#endif
fd6c3d5accea8e7 Arnd Bergmann     2018-08-24  1092  				result = copy_to_user(p, rinfo,
cb59e8408381939 Douglas Gilbert   2005-04-02  1093  						      SZ_SG_REQ_INFO * SG_MAX_QUEUE);
cb59e8408381939 Douglas Gilbert   2005-04-02  1094  			result = result ? -EFAULT : 0;
cb59e8408381939 Douglas Gilbert   2005-04-02  1095  			kfree(rinfo);
cb59e8408381939 Douglas Gilbert   2005-04-02  1096  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1097  		}
^1da177e4c3f415 Linus Torvalds    2005-04-16  1098  	case SG_EMULATED_HOST:
cc833acbee9db5c Douglas Gilbert   2014-06-25  1099  		if (atomic_read(&sdp->detaching))
^1da177e4c3f415 Linus Torvalds    2005-04-16  1100  			return -ENODEV;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1101  		return put_user(sdp->device->host->hostt->emulated, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1102  	case SCSI_IOCTL_SEND_COMMAND:
cc833acbee9db5c Douglas Gilbert   2014-06-25  1103  		if (atomic_read(&sdp->detaching))
^1da177e4c3f415 Linus Torvalds    2005-04-16  1104  			return -ENODEV;
e915e872ed921d7 Al Viro           2008-09-02  1105  		return sg_scsi_ioctl(sdp->device->request_queue, NULL, filp->f_mode, p);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1106  	case SG_SET_DEBUG:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1107  		result = get_user(val, ip);
^1da177e4c3f415 Linus Torvalds    2005-04-16  1108  		if (result)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1109  			return result;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1110  		sdp->sgdebug = (char) val;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1111  		return 0;
44ec95425c1d9dc Alan Stern        2007-02-20  1112  	case BLKSECTGET:
46f69e6a6bbbf38 Akinobu Mita      2014-06-02  1113  		return put_user(max_sectors_bytes(sdp->device->request_queue),
44ec95425c1d9dc Alan Stern        2007-02-20  1114  				ip);
6da127ad0918f93 Christof Schmitt  2008-01-11  1115  	case BLKTRACESETUP:
6da127ad0918f93 Christof Schmitt  2008-01-11  1116  		return blk_trace_setup(sdp->device->request_queue,
6da127ad0918f93 Christof Schmitt  2008-01-11  1117  				       sdp->disk->disk_name,
76e3a19d0691bbf Martin Peschke    2009-01-30  1118  				       MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
7475c8ae1b7bfc2 Bart Van Assche   2017-08-25  1119  				       NULL, p);
6da127ad0918f93 Christof Schmitt  2008-01-11  1120  	case BLKTRACESTART:
6da127ad0918f93 Christof Schmitt  2008-01-11  1121  		return blk_trace_startstop(sdp->device->request_queue, 1);
6da127ad0918f93 Christof Schmitt  2008-01-11  1122  	case BLKTRACESTOP:
6da127ad0918f93 Christof Schmitt  2008-01-11  1123  		return blk_trace_startstop(sdp->device->request_queue, 0);
6da127ad0918f93 Christof Schmitt  2008-01-11  1124  	case BLKTRACETEARDOWN:
6da127ad0918f93 Christof Schmitt  2008-01-11  1125  		return blk_trace_remove(sdp->device->request_queue);
906d15fbd23c126 Christoph Hellwig 2014-10-11  1126  	case SCSI_IOCTL_GET_IDLUN:
906d15fbd23c126 Christoph Hellwig 2014-10-11  1127  	case SCSI_IOCTL_GET_BUS_NUMBER:
906d15fbd23c126 Christoph Hellwig 2014-10-11  1128  	case SCSI_IOCTL_PROBE_HOST:
906d15fbd23c126 Christoph Hellwig 2014-10-11  1129  	case SG_GET_TRANSFORM:
906d15fbd23c126 Christoph Hellwig 2014-10-11  1130  	case SG_SCSI_RESET:
906d15fbd23c126 Christoph Hellwig 2014-10-11  1131  		if (atomic_read(&sdp->detaching))
906d15fbd23c126 Christoph Hellwig 2014-10-11  1132  			return -ENODEV;
906d15fbd23c126 Christoph Hellwig 2014-10-11  1133  		break;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1134  	default:
^1da177e4c3f415 Linus Torvalds    2005-04-16  1135  		if (read_only)
^1da177e4c3f415 Linus Torvalds    2005-04-16  1136  			return -EPERM;	/* don't know so take safe approach */
906d15fbd23c126 Christoph Hellwig 2014-10-11  1137  		break;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1138  	}
906d15fbd23c126 Christoph Hellwig 2014-10-11  1139  
906d15fbd23c126 Christoph Hellwig 2014-10-11  1140  	result = scsi_ioctl_block_when_processing_errors(sdp->device,
906d15fbd23c126 Christoph Hellwig 2014-10-11  1141  			cmd_in, filp->f_flags & O_NDELAY);
906d15fbd23c126 Christoph Hellwig 2014-10-11  1142  	if (result)
906d15fbd23c126 Christoph Hellwig 2014-10-11  1143  		return result;
d320a9551e394cb Arnd Bergmann     2019-03-15  1144  
d320a9551e394cb Arnd Bergmann     2019-03-15 @1145  	return -ENOIOCTLCMD;
^1da177e4c3f415 Linus Torvalds    2005-04-16  1146  }
^1da177e4c3f415 Linus Torvalds    2005-04-16  1147  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27581 bytes --]

             reply	other threads:[~2020-11-09 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 11:41 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-18  3:54 drivers/scsi/sg.c:1145 sg_ioctl_common() warn: inconsistent returns 'sfp->rq_list_lock' kernel test robot
2020-08-18  3:54 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202011091909.kC8zu7Xf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.