From: kbuild test robot <lkp@intel.com>
To: Douglas Gilbert <dgilbert@interlog.com>
Cc: kbuild-all@lists.01.org, linux-scsi@vger.kernel.org,
martin.petersen@oracle.com, jejb@linux.vnet.ibm.com,
hare@suse.de, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH v7 29/38] sg: add 8 byte SCSI LUN to sg_scsi_id
Date: Sat, 29 Feb 2020 07:27:28 +0800 [thread overview]
Message-ID: <202002290734.v2Eh007t%lkp@intel.com> (raw)
In-Reply-To: <20200227165902.11861-30-dgilbert@interlog.com>
[-- Attachment #1: Type: text/plain, Size: 19547 bytes --]
Hi Douglas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next linus/master v5.6-rc3 next-20200228]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20200228-205828
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers//scsi/sg.c: In function 'sg_receive_v4':
drivers//scsi/sg.c:1234:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
h4p->response = (u64)srp->s_hdr4.sbp;
^
drivers//scsi/sg.c: In function 'sg_ioctl_common':
>> drivers//scsi/sg.c:2074:1: warning: the frame size of 2056 bytes is larger than 2048 bytes [-Wframe-larger-than=]
}
^
vim +2074 drivers//scsi/sg.c
e9a6fc36629575 Douglas Gilbert 2020-02-27 1863
37b9d1e0017b2d Jörn Engel 2012-04-12 1864 static long
2e69ea3df607a4 Douglas Gilbert 2020-02-27 1865 sg_ioctl_common(struct file *filp, struct sg_device *sdp, struct sg_fd *sfp,
d320a9551e394c Arnd Bergmann 2019-03-15 1866 unsigned int cmd_in, void __user *p)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1867 {
e9a6fc36629575 Douglas Gilbert 2020-02-27 1868 bool read_only = O_RDWR != (filp->f_flags & O_ACCMODE);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1869 int val;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1870 int result = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1871 int __user *ip = p;
2e69ea3df607a4 Douglas Gilbert 2020-02-27 1872 struct sg_request *srp;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1873 struct scsi_device *sdev;
f6652476691f24 Douglas Gilbert 2020-02-27 1874 unsigned long idx;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1875 __maybe_unused const char *pmlp = ", pass to mid-level";
^1da177e4c3f41 Linus Torvalds 2005-04-16 1876
d92b69363fbad1 Douglas Gilbert 2020-02-27 1877 SG_LOG(6, sfp, "%s: cmd=0x%x, O_NONBLOCK=%d\n", __func__, cmd_in,
d92b69363fbad1 Douglas Gilbert 2020-02-27 1878 !!(filp->f_flags & O_NONBLOCK));
e9a6fc36629575 Douglas Gilbert 2020-02-27 1879 if (unlikely(SG_IS_DETACHING(sdp)))
e9a6fc36629575 Douglas Gilbert 2020-02-27 1880 return -ENODEV;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1881 sdev = sdp->device;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1882
^1da177e4c3f41 Linus Torvalds 2005-04-16 1883 switch (cmd_in) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1884 case SG_IO:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1885 return sg_ctl_sg_io(filp, sdp, sfp, p);
164fadf16aae69 Douglas Gilbert 2020-02-27 1886 case SG_IOSUBMIT:
164fadf16aae69 Douglas Gilbert 2020-02-27 1887 SG_LOG(3, sfp, "%s: SG_IOSUBMIT\n", __func__);
164fadf16aae69 Douglas Gilbert 2020-02-27 1888 return sg_ctl_iosubmit(filp, sfp, p);
164fadf16aae69 Douglas Gilbert 2020-02-27 1889 case SG_IORECEIVE:
164fadf16aae69 Douglas Gilbert 2020-02-27 1890 SG_LOG(3, sfp, "%s: SG_IORECEIVE\n", __func__);
164fadf16aae69 Douglas Gilbert 2020-02-27 1891 return sg_ctl_ioreceive(filp, sfp, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1892 case SG_GET_SCSI_ID:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1893 return sg_ctl_scsi_id(sdev, sfp, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1894 case SG_SET_FORCE_PACK_ID:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1895 SG_LOG(3, sfp, "%s: SG_SET_FORCE_PACK_ID\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1896 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1897 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1898 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1899 assign_bit(SG_FFD_FORCE_PACKID, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1900 return 0;
5c0a9d591daedc Douglas Gilbert 2020-02-27 1901 case SG_GET_PACK_ID: /* or tag of oldest "read"-able, -1 if none */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1902 val = -1;
f6652476691f24 Douglas Gilbert 2020-02-27 1903 xa_for_each_marked(&sfp->srp_arr, idx, srp, SG_XA_RQ_AWAIT) {
f6652476691f24 Douglas Gilbert 2020-02-27 1904 if (!srp)
f6652476691f24 Douglas Gilbert 2020-02-27 1905 continue;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1906 val = srp->pack_id;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1907 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1908 }
e9a6fc36629575 Douglas Gilbert 2020-02-27 1909 SG_LOG(3, sfp, "%s: SG_GET_PACK_ID=%d\n", __func__, val);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1910 return put_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1911 case SG_GET_NUM_WAITING:
dafd31b0fcfdc9 Douglas Gilbert 2020-02-27 1912 return put_user(atomic_read(&sfp->waiting), ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1913 case SG_GET_SG_TABLESIZE:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1914 SG_LOG(3, sfp, "%s: SG_GET_SG_TABLESIZE=%d\n", __func__,
e9a6fc36629575 Douglas Gilbert 2020-02-27 1915 sdp->max_sgat_sz);
1ee385d070dc3b Douglas Gilbert 2020-02-27 1916 return put_user(sdp->max_sgat_sz, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1917 case SG_SET_RESERVED_SIZE:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1918 result = get_user(val, ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1919 if (!result) {
e9a6fc36629575 Douglas Gilbert 2020-02-27 1920 if (val >= 0 && val <= (1024 * 1024 * 1024)) {
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1921 mutex_lock(&sfp->f_mutex);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1922 result = sg_set_reserved_sz(sfp, val);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1923 mutex_unlock(&sfp->f_mutex);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1924 } else {
e9a6fc36629575 Douglas Gilbert 2020-02-27 1925 SG_LOG(3, sfp, "%s: invalid size\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1926 result = -EINVAL;
1bc0eb0446158c Hannes Reinecke 2017-04-07 1927 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1928 }
e9a6fc36629575 Douglas Gilbert 2020-02-27 1929 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1930 case SG_GET_RESERVED_SIZE:
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1931 mutex_lock(&sfp->f_mutex);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1932 val = min_t(int, sfp->rsv_srp->sgat_h.buflen,
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1933 sdp->max_sgat_sz);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1934 mutex_unlock(&sfp->f_mutex);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1935 SG_LOG(3, sfp, "%s: SG_GET_RESERVED_SIZE=%d\n",
e9a6fc36629575 Douglas Gilbert 2020-02-27 1936 __func__, val);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1937 result = put_user(val, ip);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1938 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1939 case SG_SET_COMMAND_Q:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1940 SG_LOG(3, sfp, "%s: SG_SET_COMMAND_Q\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1941 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1942 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1943 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1944 assign_bit(SG_FFD_CMD_Q, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1945 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1946 case SG_GET_COMMAND_Q:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1947 SG_LOG(3, sfp, "%s: SG_GET_COMMAND_Q\n", __func__);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1948 return put_user(test_bit(SG_FFD_CMD_Q, sfp->ffd_bm), ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1949 case SG_SET_KEEP_ORPHAN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1950 SG_LOG(3, sfp, "%s: SG_SET_KEEP_ORPHAN\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1951 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1952 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1953 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1954 assign_bit(SG_FFD_KEEP_ORPHAN, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1955 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1956 case SG_GET_KEEP_ORPHAN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1957 SG_LOG(3, sfp, "%s: SG_GET_KEEP_ORPHAN\n", __func__);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1958 return put_user(test_bit(SG_FFD_KEEP_ORPHAN, sfp->ffd_bm),
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1959 ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1960 case SG_GET_VERSION_NUM:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1961 SG_LOG(3, sfp, "%s: SG_GET_VERSION_NUM\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1962 return put_user(sg_version_num, ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1963 case SG_GET_REQUEST_TABLE:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1964 return sg_ctl_req_tbl(sfp, p);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1965 case SG_SCSI_RESET:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1966 SG_LOG(3, sfp, "%s: SG_SCSI_RESET\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1967 break;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1968 case SG_SET_TIMEOUT:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1969 SG_LOG(3, sfp, "%s: SG_SET_TIMEOUT\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1970 result = get_user(val, ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1971 if (result)
e9a6fc36629575 Douglas Gilbert 2020-02-27 1972 return result;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1973 if (val < 0)
e9a6fc36629575 Douglas Gilbert 2020-02-27 1974 return -EIO;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1975 if (val >= mult_frac((s64)INT_MAX, USER_HZ, HZ))
e9a6fc36629575 Douglas Gilbert 2020-02-27 1976 val = min_t(s64, mult_frac((s64)INT_MAX, USER_HZ, HZ),
e9a6fc36629575 Douglas Gilbert 2020-02-27 1977 INT_MAX);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1978 sfp->timeout_user = val;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1979 sfp->timeout = mult_frac(val, HZ, USER_HZ);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1980 return 0;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1981 case SG_GET_TIMEOUT: /* N.B. User receives timeout as return value */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1982 /* strange ..., for backward compatibility */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1983 SG_LOG(3, sfp, "%s: SG_GET_TIMEOUT\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1984 return sfp->timeout_user;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1985 case SG_SET_FORCE_LOW_DMA:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1986 /*
e9a6fc36629575 Douglas Gilbert 2020-02-27 1987 * N.B. This ioctl never worked properly, but failed to
e9a6fc36629575 Douglas Gilbert 2020-02-27 1988 * return an error value. So returning '0' to keep
e9a6fc36629575 Douglas Gilbert 2020-02-27 1989 * compatibility with legacy applications.
e9a6fc36629575 Douglas Gilbert 2020-02-27 1990 */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1991 SG_LOG(3, sfp, "%s: SG_SET_FORCE_LOW_DMA\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1992 return 0;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1993 case SG_GET_LOW_DMA:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1994 SG_LOG(3, sfp, "%s: SG_GET_LOW_DMA\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1995 return put_user((int)sdev->host->unchecked_isa_dma, ip);
b2b2e4df0305e7 Douglas Gilbert 2020-02-27 1996 case SG_NEXT_CMD_LEN: /* active only in v2 interface */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1997 SG_LOG(3, sfp, "%s: SG_NEXT_CMD_LEN\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1998 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1999 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2000 return result;
bf33f87dd04c37 peter chang 2017-02-15 2001 if (val > SG_MAX_CDB_SIZE)
bf33f87dd04c37 peter chang 2017-02-15 2002 return -ENOMEM;
671c65317016c2 Douglas Gilbert 2020-02-27 2003 mutex_lock(&sfp->f_mutex);
671c65317016c2 Douglas Gilbert 2020-02-27 2004 sfp->next_cmd_len = max_t(int, val, 0);
671c65317016c2 Douglas Gilbert 2020-02-27 2005 mutex_unlock(&sfp->f_mutex);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2006 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2007 case SG_GET_ACCESS_COUNT:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2008 SG_LOG(3, sfp, "%s: SG_GET_ACCESS_COUNT\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2009 /* faked - we don't have a real access count anymore */
e9a6fc36629575 Douglas Gilbert 2020-02-27 2010 val = (sdev ? 1 : 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2011 return put_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2012 case SG_EMULATED_HOST:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2013 SG_LOG(3, sfp, "%s: SG_EMULATED_HOST\n", __func__);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2014 if (unlikely(SG_IS_DETACHING(sdp)))
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2015 return -ENODEV;
e9a6fc36629575 Douglas Gilbert 2020-02-27 2016 return put_user(sdev->host->hostt->emulated, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2017 case SCSI_IOCTL_SEND_COMMAND:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2018 SG_LOG(3, sfp, "%s: SCSI_IOCTL_SEND_COMMAND\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2019 return sg_scsi_ioctl(sdev->request_queue, NULL, filp->f_mode,
e9a6fc36629575 Douglas Gilbert 2020-02-27 2020 p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2021 case SG_SET_DEBUG:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2022 SG_LOG(3, sfp, "%s: SG_SET_DEBUG\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2023 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2024 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2025 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2026 assign_bit(SG_FDEV_LOG_SENSE, sdp->fdev_bm, !!val);
0b192c5441f451 Douglas Gilbert 2020-02-27 2027 if (val == 0) /* user can force recalculation */
0b192c5441f451 Douglas Gilbert 2020-02-27 2028 sg_calc_sgat_param(sdp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2029 return 0;
44ec95425c1d9d Alan Stern 2007-02-20 2030 case BLKSECTGET:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2031 SG_LOG(3, sfp, "%s: BLKSECTGET\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2032 return put_user(max_sectors_bytes(sdev->request_queue), ip);
6da127ad0918f9 Christof Schmitt 2008-01-11 2033 case BLKTRACESETUP:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2034 SG_LOG(3, sfp, "%s: BLKTRACESETUP\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2035 return blk_trace_setup(sdev->request_queue,
6da127ad0918f9 Christof Schmitt 2008-01-11 2036 sdp->disk->disk_name,
76e3a19d0691bb Martin Peschke 2009-01-30 2037 MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
7475c8ae1b7bfc Bart Van Assche 2017-08-25 2038 NULL, p);
6da127ad0918f9 Christof Schmitt 2008-01-11 2039 case BLKTRACESTART:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2040 SG_LOG(3, sfp, "%s: BLKTRACESTART\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2041 return blk_trace_startstop(sdev->request_queue, 1);
6da127ad0918f9 Christof Schmitt 2008-01-11 2042 case BLKTRACESTOP:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2043 SG_LOG(3, sfp, "%s: BLKTRACESTOP\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2044 return blk_trace_startstop(sdev->request_queue, 0);
6da127ad0918f9 Christof Schmitt 2008-01-11 2045 case BLKTRACETEARDOWN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2046 SG_LOG(3, sfp, "%s: BLKTRACETEARDOWN\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2047 return blk_trace_remove(sdev->request_queue);
906d15fbd23c12 Christoph Hellwig 2014-10-11 2048 case SCSI_IOCTL_GET_IDLUN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2049 SG_LOG(3, sfp, "%s: SCSI_IOCTL_GET_IDLUN %s\n", __func__,
e9a6fc36629575 Douglas Gilbert 2020-02-27 2050 pmlp);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2051 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2052 case SCSI_IOCTL_GET_BUS_NUMBER:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2053 SG_LOG(3, sfp, "%s: SCSI_IOCTL_GET_BUS_NUMBER%s\n",
e9a6fc36629575 Douglas Gilbert 2020-02-27 2054 __func__, pmlp);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2055 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2056 case SCSI_IOCTL_PROBE_HOST:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2057 SG_LOG(3, sfp, "%s: SCSI_IOCTL_PROBE_HOST%s",
e9a6fc36629575 Douglas Gilbert 2020-02-27 2058 __func__, pmlp);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2059 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2060 case SG_GET_TRANSFORM:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2061 SG_LOG(3, sfp, "%s: SG_GET_TRANSFORM%s\n", __func__, pmlp);
906d15fbd23c12 Christoph Hellwig 2014-10-11 2062 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2063 default:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2064 SG_LOG(3, sfp, "%s: unrecognized ioctl [0x%x]%s\n",
e9a6fc36629575 Douglas Gilbert 2020-02-27 2065 __func__, cmd_in, pmlp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2066 if (read_only)
e9a6fc36629575 Douglas Gilbert 2020-02-27 2067 return -EPERM; /* don't know, so take safer approach */
906d15fbd23c12 Christoph Hellwig 2014-10-11 2068 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2069 }
98dd8630b9e9cb Douglas Gilbert 2020-02-27 2070 result = sg_allow_if_err_recovery(sdp, filp->f_flags & O_NDELAY);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2071 if (unlikely(result))
906d15fbd23c12 Christoph Hellwig 2014-10-11 2072 return result;
d320a9551e394c Arnd Bergmann 2019-03-15 2073 return -ENOIOCTLCMD;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2074 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2075
:::::: The code at line 2074 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71468 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v7 29/38] sg: add 8 byte SCSI LUN to sg_scsi_id
Date: Sat, 29 Feb 2020 07:27:28 +0800 [thread overview]
Message-ID: <202002290734.v2Eh007t%lkp@intel.com> (raw)
In-Reply-To: <20200227165902.11861-30-dgilbert@interlog.com>
[-- Attachment #1: Type: text/plain, Size: 19807 bytes --]
Hi Douglas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next linus/master v5.6-rc3 next-20200228]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20200228-205828
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers//scsi/sg.c: In function 'sg_receive_v4':
drivers//scsi/sg.c:1234:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
h4p->response = (u64)srp->s_hdr4.sbp;
^
drivers//scsi/sg.c: In function 'sg_ioctl_common':
>> drivers//scsi/sg.c:2074:1: warning: the frame size of 2056 bytes is larger than 2048 bytes [-Wframe-larger-than=]
}
^
vim +2074 drivers//scsi/sg.c
e9a6fc36629575 Douglas Gilbert 2020-02-27 1863
37b9d1e0017b2d Jörn Engel 2012-04-12 1864 static long
2e69ea3df607a4 Douglas Gilbert 2020-02-27 1865 sg_ioctl_common(struct file *filp, struct sg_device *sdp, struct sg_fd *sfp,
d320a9551e394c Arnd Bergmann 2019-03-15 1866 unsigned int cmd_in, void __user *p)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1867 {
e9a6fc36629575 Douglas Gilbert 2020-02-27 1868 bool read_only = O_RDWR != (filp->f_flags & O_ACCMODE);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1869 int val;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1870 int result = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1871 int __user *ip = p;
2e69ea3df607a4 Douglas Gilbert 2020-02-27 1872 struct sg_request *srp;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1873 struct scsi_device *sdev;
f6652476691f24 Douglas Gilbert 2020-02-27 1874 unsigned long idx;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1875 __maybe_unused const char *pmlp = ", pass to mid-level";
^1da177e4c3f41 Linus Torvalds 2005-04-16 1876
d92b69363fbad1 Douglas Gilbert 2020-02-27 1877 SG_LOG(6, sfp, "%s: cmd=0x%x, O_NONBLOCK=%d\n", __func__, cmd_in,
d92b69363fbad1 Douglas Gilbert 2020-02-27 1878 !!(filp->f_flags & O_NONBLOCK));
e9a6fc36629575 Douglas Gilbert 2020-02-27 1879 if (unlikely(SG_IS_DETACHING(sdp)))
e9a6fc36629575 Douglas Gilbert 2020-02-27 1880 return -ENODEV;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1881 sdev = sdp->device;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1882
^1da177e4c3f41 Linus Torvalds 2005-04-16 1883 switch (cmd_in) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1884 case SG_IO:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1885 return sg_ctl_sg_io(filp, sdp, sfp, p);
164fadf16aae69 Douglas Gilbert 2020-02-27 1886 case SG_IOSUBMIT:
164fadf16aae69 Douglas Gilbert 2020-02-27 1887 SG_LOG(3, sfp, "%s: SG_IOSUBMIT\n", __func__);
164fadf16aae69 Douglas Gilbert 2020-02-27 1888 return sg_ctl_iosubmit(filp, sfp, p);
164fadf16aae69 Douglas Gilbert 2020-02-27 1889 case SG_IORECEIVE:
164fadf16aae69 Douglas Gilbert 2020-02-27 1890 SG_LOG(3, sfp, "%s: SG_IORECEIVE\n", __func__);
164fadf16aae69 Douglas Gilbert 2020-02-27 1891 return sg_ctl_ioreceive(filp, sfp, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1892 case SG_GET_SCSI_ID:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1893 return sg_ctl_scsi_id(sdev, sfp, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1894 case SG_SET_FORCE_PACK_ID:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1895 SG_LOG(3, sfp, "%s: SG_SET_FORCE_PACK_ID\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1896 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1897 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1898 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1899 assign_bit(SG_FFD_FORCE_PACKID, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1900 return 0;
5c0a9d591daedc Douglas Gilbert 2020-02-27 1901 case SG_GET_PACK_ID: /* or tag of oldest "read"-able, -1 if none */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1902 val = -1;
f6652476691f24 Douglas Gilbert 2020-02-27 1903 xa_for_each_marked(&sfp->srp_arr, idx, srp, SG_XA_RQ_AWAIT) {
f6652476691f24 Douglas Gilbert 2020-02-27 1904 if (!srp)
f6652476691f24 Douglas Gilbert 2020-02-27 1905 continue;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1906 val = srp->pack_id;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1907 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1908 }
e9a6fc36629575 Douglas Gilbert 2020-02-27 1909 SG_LOG(3, sfp, "%s: SG_GET_PACK_ID=%d\n", __func__, val);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1910 return put_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1911 case SG_GET_NUM_WAITING:
dafd31b0fcfdc9 Douglas Gilbert 2020-02-27 1912 return put_user(atomic_read(&sfp->waiting), ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1913 case SG_GET_SG_TABLESIZE:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1914 SG_LOG(3, sfp, "%s: SG_GET_SG_TABLESIZE=%d\n", __func__,
e9a6fc36629575 Douglas Gilbert 2020-02-27 1915 sdp->max_sgat_sz);
1ee385d070dc3b Douglas Gilbert 2020-02-27 1916 return put_user(sdp->max_sgat_sz, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1917 case SG_SET_RESERVED_SIZE:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1918 result = get_user(val, ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1919 if (!result) {
e9a6fc36629575 Douglas Gilbert 2020-02-27 1920 if (val >= 0 && val <= (1024 * 1024 * 1024)) {
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1921 mutex_lock(&sfp->f_mutex);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1922 result = sg_set_reserved_sz(sfp, val);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1923 mutex_unlock(&sfp->f_mutex);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1924 } else {
e9a6fc36629575 Douglas Gilbert 2020-02-27 1925 SG_LOG(3, sfp, "%s: invalid size\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1926 result = -EINVAL;
1bc0eb0446158c Hannes Reinecke 2017-04-07 1927 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1928 }
e9a6fc36629575 Douglas Gilbert 2020-02-27 1929 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1930 case SG_GET_RESERVED_SIZE:
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1931 mutex_lock(&sfp->f_mutex);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1932 val = min_t(int, sfp->rsv_srp->sgat_h.buflen,
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1933 sdp->max_sgat_sz);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1934 mutex_unlock(&sfp->f_mutex);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1935 SG_LOG(3, sfp, "%s: SG_GET_RESERVED_SIZE=%d\n",
e9a6fc36629575 Douglas Gilbert 2020-02-27 1936 __func__, val);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1937 result = put_user(val, ip);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1938 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1939 case SG_SET_COMMAND_Q:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1940 SG_LOG(3, sfp, "%s: SG_SET_COMMAND_Q\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1941 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1942 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1943 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1944 assign_bit(SG_FFD_CMD_Q, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1945 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1946 case SG_GET_COMMAND_Q:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1947 SG_LOG(3, sfp, "%s: SG_GET_COMMAND_Q\n", __func__);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1948 return put_user(test_bit(SG_FFD_CMD_Q, sfp->ffd_bm), ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1949 case SG_SET_KEEP_ORPHAN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1950 SG_LOG(3, sfp, "%s: SG_SET_KEEP_ORPHAN\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1951 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1952 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1953 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1954 assign_bit(SG_FFD_KEEP_ORPHAN, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1955 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1956 case SG_GET_KEEP_ORPHAN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1957 SG_LOG(3, sfp, "%s: SG_GET_KEEP_ORPHAN\n", __func__);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1958 return put_user(test_bit(SG_FFD_KEEP_ORPHAN, sfp->ffd_bm),
20d8ebcd78db48 Douglas Gilbert 2020-02-27 1959 ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1960 case SG_GET_VERSION_NUM:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1961 SG_LOG(3, sfp, "%s: SG_GET_VERSION_NUM\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1962 return put_user(sg_version_num, ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1963 case SG_GET_REQUEST_TABLE:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1964 return sg_ctl_req_tbl(sfp, p);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1965 case SG_SCSI_RESET:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1966 SG_LOG(3, sfp, "%s: SG_SCSI_RESET\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1967 break;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1968 case SG_SET_TIMEOUT:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1969 SG_LOG(3, sfp, "%s: SG_SET_TIMEOUT\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1970 result = get_user(val, ip);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1971 if (result)
e9a6fc36629575 Douglas Gilbert 2020-02-27 1972 return result;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1973 if (val < 0)
e9a6fc36629575 Douglas Gilbert 2020-02-27 1974 return -EIO;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1975 if (val >= mult_frac((s64)INT_MAX, USER_HZ, HZ))
e9a6fc36629575 Douglas Gilbert 2020-02-27 1976 val = min_t(s64, mult_frac((s64)INT_MAX, USER_HZ, HZ),
e9a6fc36629575 Douglas Gilbert 2020-02-27 1977 INT_MAX);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1978 sfp->timeout_user = val;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1979 sfp->timeout = mult_frac(val, HZ, USER_HZ);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1980 return 0;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1981 case SG_GET_TIMEOUT: /* N.B. User receives timeout as return value */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1982 /* strange ..., for backward compatibility */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1983 SG_LOG(3, sfp, "%s: SG_GET_TIMEOUT\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1984 return sfp->timeout_user;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1985 case SG_SET_FORCE_LOW_DMA:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1986 /*
e9a6fc36629575 Douglas Gilbert 2020-02-27 1987 * N.B. This ioctl never worked properly, but failed to
e9a6fc36629575 Douglas Gilbert 2020-02-27 1988 * return an error value. So returning '0' to keep
e9a6fc36629575 Douglas Gilbert 2020-02-27 1989 * compatibility with legacy applications.
e9a6fc36629575 Douglas Gilbert 2020-02-27 1990 */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1991 SG_LOG(3, sfp, "%s: SG_SET_FORCE_LOW_DMA\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1992 return 0;
e9a6fc36629575 Douglas Gilbert 2020-02-27 1993 case SG_GET_LOW_DMA:
e9a6fc36629575 Douglas Gilbert 2020-02-27 1994 SG_LOG(3, sfp, "%s: SG_GET_LOW_DMA\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 1995 return put_user((int)sdev->host->unchecked_isa_dma, ip);
b2b2e4df0305e7 Douglas Gilbert 2020-02-27 1996 case SG_NEXT_CMD_LEN: /* active only in v2 interface */
e9a6fc36629575 Douglas Gilbert 2020-02-27 1997 SG_LOG(3, sfp, "%s: SG_NEXT_CMD_LEN\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1998 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1999 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2000 return result;
bf33f87dd04c37 peter chang 2017-02-15 2001 if (val > SG_MAX_CDB_SIZE)
bf33f87dd04c37 peter chang 2017-02-15 2002 return -ENOMEM;
671c65317016c2 Douglas Gilbert 2020-02-27 2003 mutex_lock(&sfp->f_mutex);
671c65317016c2 Douglas Gilbert 2020-02-27 2004 sfp->next_cmd_len = max_t(int, val, 0);
671c65317016c2 Douglas Gilbert 2020-02-27 2005 mutex_unlock(&sfp->f_mutex);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2006 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2007 case SG_GET_ACCESS_COUNT:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2008 SG_LOG(3, sfp, "%s: SG_GET_ACCESS_COUNT\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2009 /* faked - we don't have a real access count anymore */
e9a6fc36629575 Douglas Gilbert 2020-02-27 2010 val = (sdev ? 1 : 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2011 return put_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2012 case SG_EMULATED_HOST:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2013 SG_LOG(3, sfp, "%s: SG_EMULATED_HOST\n", __func__);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2014 if (unlikely(SG_IS_DETACHING(sdp)))
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2015 return -ENODEV;
e9a6fc36629575 Douglas Gilbert 2020-02-27 2016 return put_user(sdev->host->hostt->emulated, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2017 case SCSI_IOCTL_SEND_COMMAND:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2018 SG_LOG(3, sfp, "%s: SCSI_IOCTL_SEND_COMMAND\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2019 return sg_scsi_ioctl(sdev->request_queue, NULL, filp->f_mode,
e9a6fc36629575 Douglas Gilbert 2020-02-27 2020 p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2021 case SG_SET_DEBUG:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2022 SG_LOG(3, sfp, "%s: SG_SET_DEBUG\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2023 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2024 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2025 return result;
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2026 assign_bit(SG_FDEV_LOG_SENSE, sdp->fdev_bm, !!val);
0b192c5441f451 Douglas Gilbert 2020-02-27 2027 if (val == 0) /* user can force recalculation */
0b192c5441f451 Douglas Gilbert 2020-02-27 2028 sg_calc_sgat_param(sdp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2029 return 0;
44ec95425c1d9d Alan Stern 2007-02-20 2030 case BLKSECTGET:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2031 SG_LOG(3, sfp, "%s: BLKSECTGET\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2032 return put_user(max_sectors_bytes(sdev->request_queue), ip);
6da127ad0918f9 Christof Schmitt 2008-01-11 2033 case BLKTRACESETUP:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2034 SG_LOG(3, sfp, "%s: BLKTRACESETUP\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2035 return blk_trace_setup(sdev->request_queue,
6da127ad0918f9 Christof Schmitt 2008-01-11 2036 sdp->disk->disk_name,
76e3a19d0691bb Martin Peschke 2009-01-30 2037 MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
7475c8ae1b7bfc Bart Van Assche 2017-08-25 2038 NULL, p);
6da127ad0918f9 Christof Schmitt 2008-01-11 2039 case BLKTRACESTART:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2040 SG_LOG(3, sfp, "%s: BLKTRACESTART\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2041 return blk_trace_startstop(sdev->request_queue, 1);
6da127ad0918f9 Christof Schmitt 2008-01-11 2042 case BLKTRACESTOP:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2043 SG_LOG(3, sfp, "%s: BLKTRACESTOP\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2044 return blk_trace_startstop(sdev->request_queue, 0);
6da127ad0918f9 Christof Schmitt 2008-01-11 2045 case BLKTRACETEARDOWN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2046 SG_LOG(3, sfp, "%s: BLKTRACETEARDOWN\n", __func__);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2047 return blk_trace_remove(sdev->request_queue);
906d15fbd23c12 Christoph Hellwig 2014-10-11 2048 case SCSI_IOCTL_GET_IDLUN:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2049 SG_LOG(3, sfp, "%s: SCSI_IOCTL_GET_IDLUN %s\n", __func__,
e9a6fc36629575 Douglas Gilbert 2020-02-27 2050 pmlp);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2051 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2052 case SCSI_IOCTL_GET_BUS_NUMBER:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2053 SG_LOG(3, sfp, "%s: SCSI_IOCTL_GET_BUS_NUMBER%s\n",
e9a6fc36629575 Douglas Gilbert 2020-02-27 2054 __func__, pmlp);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2055 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2056 case SCSI_IOCTL_PROBE_HOST:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2057 SG_LOG(3, sfp, "%s: SCSI_IOCTL_PROBE_HOST%s",
e9a6fc36629575 Douglas Gilbert 2020-02-27 2058 __func__, pmlp);
e9a6fc36629575 Douglas Gilbert 2020-02-27 2059 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2060 case SG_GET_TRANSFORM:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2061 SG_LOG(3, sfp, "%s: SG_GET_TRANSFORM%s\n", __func__, pmlp);
906d15fbd23c12 Christoph Hellwig 2014-10-11 2062 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2063 default:
e9a6fc36629575 Douglas Gilbert 2020-02-27 2064 SG_LOG(3, sfp, "%s: unrecognized ioctl [0x%x]%s\n",
e9a6fc36629575 Douglas Gilbert 2020-02-27 2065 __func__, cmd_in, pmlp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2066 if (read_only)
e9a6fc36629575 Douglas Gilbert 2020-02-27 2067 return -EPERM; /* don't know, so take safer approach */
906d15fbd23c12 Christoph Hellwig 2014-10-11 2068 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2069 }
98dd8630b9e9cb Douglas Gilbert 2020-02-27 2070 result = sg_allow_if_err_recovery(sdp, filp->f_flags & O_NDELAY);
20d8ebcd78db48 Douglas Gilbert 2020-02-27 2071 if (unlikely(result))
906d15fbd23c12 Christoph Hellwig 2014-10-11 2072 return result;
d320a9551e394c Arnd Bergmann 2019-03-15 2073 return -ENOIOCTLCMD;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2074 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2075
:::::: The code at line 2074 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
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: 71468 bytes --]
next prev parent reply other threads:[~2020-02-28 23:28 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 16:58 [PATCH v7 00/38] sg: add v4 interface Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 01/38] sg: move functions around Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 02/38] sg: remove typedefs, type+formatting cleanup Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 03/38] sg: sg_log and is_enabled Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 04/38] sg: rework sg_poll(), minor changes Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 05/38] sg: bitops in sg_device Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 06/38] sg: make open count an atomic Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 07/38] sg: move header to uapi section Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 08/38] sg: speed sg_poll and sg_get_num_waiting Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 09/38] sg: sg_allow_if_err_recovery and renames Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 10/38] sg: improve naming Douglas Gilbert
2020-02-28 8:27 ` Hannes Reinecke
2020-02-28 16:25 ` Douglas Gilbert
2020-02-28 16:37 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 11/38] sg: change rwlock to spinlock Douglas Gilbert
2020-02-28 8:31 ` Hannes Reinecke
2020-02-28 16:25 ` Douglas Gilbert
2020-02-28 16:38 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 12/38] sg: ioctl handling Douglas Gilbert
2020-02-28 8:33 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 13/38] sg: split sg_read Douglas Gilbert
2020-02-28 8:35 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 14/38] sg: sg_common_write add structure for arguments Douglas Gilbert
2020-02-28 8:36 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 15/38] sg: rework sg_vma_fault Douglas Gilbert
2020-02-28 8:37 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 16/38] sg: rework sg_mmap Douglas Gilbert
2020-02-28 8:38 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 17/38] sg: replace sg_allow_access Douglas Gilbert
2020-02-28 8:40 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 18/38] sg: rework scatter gather handling Douglas Gilbert
2020-02-28 8:41 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 19/38] sg: introduce request state machine Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 20/38] sg: sg_find_srp_by_id Douglas Gilbert
2020-02-28 8:45 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 21/38] sg: sg_fill_request_element Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 22/38] sg: printk change %p to %pK Douglas Gilbert
2020-02-28 8:46 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 23/38] sg: xarray for fds in device Douglas Gilbert
2020-02-28 8:47 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 24/38] sg: xarray for reqs in fd Douglas Gilbert
2020-02-28 9:00 ` Hannes Reinecke
2020-02-28 18:55 ` Douglas Gilbert
2020-02-29 1:18 ` Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 25/38] sg: replace rq array with lists Douglas Gilbert
2020-02-28 9:02 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 26/38] sg: sense buffer rework Douglas Gilbert
2020-02-28 9:04 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 27/38] sg: add sg v4 interface support Douglas Gilbert
2020-02-28 9:08 ` Hannes Reinecke
2020-02-28 20:20 ` Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 28/38] sg: rework debug info Douglas Gilbert
2020-02-28 9:14 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 29/38] sg: add 8 byte SCSI LUN to sg_scsi_id Douglas Gilbert
2020-02-28 9:15 ` Hannes Reinecke
2020-02-28 23:27 ` kbuild test robot [this message]
2020-02-28 23:27 ` kbuild test robot
2020-02-27 16:58 ` [PATCH v7 30/38] sg: expand sg_comm_wr_t Douglas Gilbert
2020-02-27 16:58 ` [PATCH v7 31/38] sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls Douglas Gilbert
2020-02-28 9:16 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 32/38] sg: add some __must_hold macros Douglas Gilbert
2020-02-28 9:16 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 33/38] sg: move procfs objects to avoid forward decls Douglas Gilbert
2020-02-28 9:17 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 34/38] sg: protect multiple receivers Douglas Gilbert
2020-02-28 9:18 ` Hannes Reinecke
2020-02-27 16:58 ` [PATCH v7 35/38] sg: first debugfs support Douglas Gilbert
2020-02-28 9:18 ` Hannes Reinecke
2020-02-27 16:59 ` [PATCH v7 36/38] sg: rework mmap support Douglas Gilbert
2020-02-28 9:20 ` Hannes Reinecke
2020-02-27 16:59 ` [PATCH v7 37/38] sg: warn v3 write system call users Douglas Gilbert
2020-02-28 9:20 ` Hannes Reinecke
2020-02-27 16:59 ` [PATCH v7 38/38] sg: bump version to 4.0.08 Douglas Gilbert
2020-02-28 9:21 ` Hannes Reinecke
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=202002290734.v2Eh007t%lkp@intel.com \
--to=lkp@intel.com \
--cc=dgilbert@interlog.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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.