[dhowells-fs:keys-acl 24/24] security/keys/keyctl.c:2062: undefined reference to `keyctl_get_container_keyring'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-acl
head: 06a67e452fb9c5815f6181878949ab31178c6d67
commit: 06a67e452fb9c5815f6181878949ab31178c6d67 [24/24] keys: Implement a 'container' keyring
config: x86_64-randconfig-r033-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs keys-acl
git checkout 06a67e452fb9c5815f6181878949ab31178c6d67
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: security/keys/keyctl.o: in function `__do_sys_keyctl':
>> security/keys/keyctl.c:2062: undefined reference to `keyctl_get_container_keyring'
>> ld: security/keys/keyctl.c:2062: undefined reference to `keyctl_get_container_keyring'
ld: security/keys/compat.o: in function `__do_compat_sys_keyctl':
>> security/keys/compat.c:132: undefined reference to `keyctl_get_container_keyring'
>> ld: security/keys/compat.c:132: undefined reference to `keyctl_get_container_keyring'
vim +2062 security/keys/keyctl.c
1903
1904 /*
1905 * The key control system call
1906 */
1907 SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3,
1908 unsigned long, arg4, unsigned long, arg5)
1909 {
1910 switch (option) {
1911 case KEYCTL_GET_KEYRING_ID:
1912 return keyctl_get_keyring_ID((key_serial_t) arg2,
1913 (int) arg3);
1914
1915 case KEYCTL_JOIN_SESSION_KEYRING:
1916 return keyctl_join_session_keyring((const char __user *) arg2);
1917
1918 case KEYCTL_UPDATE:
1919 return keyctl_update_key((key_serial_t) arg2,
1920 (const void __user *) arg3,
1921 (size_t) arg4);
1922
1923 case KEYCTL_REVOKE:
1924 return keyctl_revoke_key((key_serial_t) arg2);
1925
1926 case KEYCTL_DESCRIBE:
1927 return keyctl_describe_key((key_serial_t) arg2,
1928 (char __user *) arg3,
1929 (unsigned) arg4);
1930
1931 case KEYCTL_CLEAR:
1932 return keyctl_keyring_clear((key_serial_t) arg2);
1933
1934 case KEYCTL_LINK:
1935 return keyctl_keyring_link((key_serial_t) arg2,
1936 (key_serial_t) arg3);
1937
1938 case KEYCTL_UNLINK:
1939 return keyctl_keyring_unlink((key_serial_t) arg2,
1940 (key_serial_t) arg3);
1941
1942 case KEYCTL_SEARCH:
1943 return keyctl_keyring_search((key_serial_t) arg2,
1944 (const char __user *) arg3,
1945 (const char __user *) arg4,
1946 (key_serial_t) arg5);
1947
1948 case KEYCTL_READ:
1949 return keyctl_read_key((key_serial_t) arg2,
1950 (char __user *) arg3,
1951 (size_t) arg4);
1952
1953 case KEYCTL_CHOWN:
1954 return keyctl_chown_key((key_serial_t) arg2,
1955 (uid_t) arg3,
1956 (gid_t) arg4);
1957
1958 case KEYCTL_SETPERM:
1959 return keyctl_setperm_key((key_serial_t) arg2,
1960 (unsigned int)arg3);
1961
1962 case KEYCTL_INSTANTIATE:
1963 return keyctl_instantiate_key((key_serial_t) arg2,
1964 (const void __user *) arg3,
1965 (size_t) arg4,
1966 (key_serial_t) arg5);
1967
1968 case KEYCTL_NEGATE:
1969 return keyctl_negate_key((key_serial_t) arg2,
1970 (unsigned) arg3,
1971 (key_serial_t) arg4);
1972
1973 case KEYCTL_SET_REQKEY_KEYRING:
1974 return keyctl_set_reqkey_keyring(arg2);
1975
1976 case KEYCTL_SET_TIMEOUT:
1977 return keyctl_set_timeout((key_serial_t) arg2,
1978 (unsigned) arg3);
1979
1980 case KEYCTL_ASSUME_AUTHORITY:
1981 return keyctl_assume_authority((key_serial_t) arg2);
1982
1983 case KEYCTL_GET_SECURITY:
1984 return keyctl_get_security((key_serial_t) arg2,
1985 (char __user *) arg3,
1986 (size_t) arg4);
1987
1988 case KEYCTL_SESSION_TO_PARENT:
1989 return keyctl_session_to_parent();
1990
1991 case KEYCTL_REJECT:
1992 return keyctl_reject_key((key_serial_t) arg2,
1993 (unsigned) arg3,
1994 (unsigned) arg4,
1995 (key_serial_t) arg5);
1996
1997 case KEYCTL_INSTANTIATE_IOV:
1998 return keyctl_instantiate_key_iov(
1999 (key_serial_t) arg2,
2000 (const struct iovec __user *) arg3,
2001 (unsigned) arg4,
2002 (key_serial_t) arg5);
2003
2004 case KEYCTL_INVALIDATE:
2005 return keyctl_invalidate_key((key_serial_t) arg2);
2006
2007 case KEYCTL_GET_PERSISTENT:
2008 return keyctl_get_persistent((uid_t)arg2, (key_serial_t)arg3);
2009
2010 case KEYCTL_DH_COMPUTE:
2011 return keyctl_dh_compute((struct keyctl_dh_params __user *) arg2,
2012 (char __user *) arg3, (size_t) arg4,
2013 (struct keyctl_kdf_params __user *) arg5);
2014
2015 case KEYCTL_RESTRICT_KEYRING:
2016 return keyctl_restrict_keyring((key_serial_t) arg2,
2017 (const char __user *) arg3,
2018 (const char __user *) arg4);
2019
2020 case KEYCTL_PKEY_QUERY:
2021 if (arg3 != 0)
2022 return -EINVAL;
2023 return keyctl_pkey_query((key_serial_t)arg2,
2024 (const char __user *)arg4,
2025 (struct keyctl_pkey_query __user *)arg5);
2026
2027 case KEYCTL_PKEY_ENCRYPT:
2028 case KEYCTL_PKEY_DECRYPT:
2029 case KEYCTL_PKEY_SIGN:
2030 return keyctl_pkey_e_d_s(
2031 option,
2032 (const struct keyctl_pkey_params __user *)arg2,
2033 (const char __user *)arg3,
2034 (const void __user *)arg4,
2035 (void __user *)arg5);
2036
2037 case KEYCTL_PKEY_VERIFY:
2038 return keyctl_pkey_verify(
2039 (const struct keyctl_pkey_params __user *)arg2,
2040 (const char __user *)arg3,
2041 (const void __user *)arg4,
2042 (const void __user *)arg5);
2043
2044 case KEYCTL_MOVE:
2045 return keyctl_keyring_move((key_serial_t)arg2,
2046 (key_serial_t)arg3,
2047 (key_serial_t)arg4,
2048 (unsigned int)arg5);
2049 case KEYCTL_GRANT_PERMISSION:
2050 return keyctl_grant_permission((key_serial_t)arg2,
2051 (enum key_ace_subject_type)arg3,
2052 (unsigned int)arg4,
2053 (unsigned int)arg5);
2054
2055 case KEYCTL_CAPABILITIES:
2056 return keyctl_capabilities((unsigned char __user *)arg2, (size_t)arg3);
2057
2058 case KEYCTL_WATCH_KEY:
2059 return keyctl_watch_key((key_serial_t)arg2, (int)arg3, (int)arg4);
2060
2061 case KEYCTL_GET_CONTAINER_KEYRING:
> 2062 return keyctl_get_container_keyring((int)arg2, (key_serial_t)arg3);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[android-common:android12-5.4 6/15] lib/kunit/test.c:19:2: warning: function 'kunit_vprintk_emit' might be a candidate for 'gnu_printf' format attribute
by kernel test robot
Hi Brendan,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 150b1f5ee2833587c93b2931f3139b5b9d4ef616
commit: 5063607dbf3a4cef1150af59fd04611e4e9ddc09 [6/15] UPSTREAM: lib: enable building KUnit in lib/
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 5063607dbf3a4cef1150af59fd04611e4e9ddc09
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
lib/kunit/test.c: In function 'kunit_vprintk_emit':
>> lib/kunit/test.c:19:2: warning: function 'kunit_vprintk_emit' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
19 | return vprintk_emit(0, level, NULL, 0, fmt, args);
| ^~~~~~
vim +19 lib/kunit/test.c
ff82dbcb3e2cc5 Brendan Higgins 2019-09-23 16
ff82dbcb3e2cc5 Brendan Higgins 2019-09-23 17 static int kunit_vprintk_emit(int level, const char *fmt, va_list args)
ff82dbcb3e2cc5 Brendan Higgins 2019-09-23 18 {
ff82dbcb3e2cc5 Brendan Higgins 2019-09-23 @19 return vprintk_emit(0, level, NULL, 0, fmt, args);
ff82dbcb3e2cc5 Brendan Higgins 2019-09-23 20 }
ff82dbcb3e2cc5 Brendan Higgins 2019-09-23 21
:::::: The code at line 19 was first introduced by commit
:::::: ff82dbcb3e2cc596f464302579fdf331f7422384 UPSTREAM: kunit: test: add KUnit test runner core
:::::: TO: Brendan Higgins <brendanhiggins(a)google.com>
:::::: CC: Alexander Potapenko <glider(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[hyperv-linux:hyperv-next 25/32] arch/x86/hyperv/hv_proc.c:138:24: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head: 9c9e1c68259d6cf8a348289fd13ed8f320c0d662
commit: ad989287208ec5e689574916ecffe730f4592a86 [25/32] x86/hyperv: provide a bunch of helper functions
config: x86_64-randconfig-s022-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/commit/?...
git remote add hyperv-linux https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
git fetch --no-tags hyperv-linux hyperv-next
git checkout ad989287208ec5e689574916ecffe730f4592a86
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
arch/x86/hyperv/hv_proc.c:83:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:83:23: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_proc.c:83:23: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_proc.c:83:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_deposit_memory *input_page @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:83:20: sparse: expected struct hv_deposit_memory *input_page
arch/x86/hyperv/hv_proc.c:83:20: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_proc.c:136:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:136:26: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_proc.c:136:26: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_proc.c:136:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_add_logical_processor_in *input @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:136:23: sparse: expected struct hv_add_logical_processor_in *input
arch/x86/hyperv/hv_proc.c:136:23: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_proc.c:138:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:138:27: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_proc.c:138:27: sparse: got void [noderef] __percpu **
>> arch/x86/hyperv/hv_proc.c:138:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_add_logical_processor_out *output @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:138:24: sparse: expected struct hv_add_logical_processor_out *output
arch/x86/hyperv/hv_proc.c:138:24: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_proc.c:186:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:186:26: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_proc.c:186:26: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_proc.c:186:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_create_vp *input @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:186:23: sparse: expected struct hv_create_vp *input
arch/x86/hyperv/hv_proc.c:186:23: sparse: got void [noderef] __percpu *
vim +138 arch/x86/hyperv/hv_proc.c
118
119 int hv_call_add_logical_proc(int node, u32 lp_index, u32 apic_id)
120 {
121 struct hv_add_logical_processor_in *input;
122 struct hv_add_logical_processor_out *output;
123 u64 status;
124 unsigned long flags;
125 int ret = 0;
126 int pxm = node_to_pxm(node);
127
128 /*
129 * When adding a logical processor, the hypervisor may return
130 * HV_STATUS_INSUFFICIENT_MEMORY. When that happens, we deposit more
131 * pages and retry.
132 */
133 do {
134 local_irq_save(flags);
135
> 136 input = *this_cpu_ptr(hyperv_pcpu_input_arg);
137 /* We don't do anything with the output right now */
> 138 output = *this_cpu_ptr(hyperv_pcpu_output_arg);
139
140 input->lp_index = lp_index;
141 input->apic_id = apic_id;
142 input->flags = 0;
143 input->proximity_domain_info.domain_id = pxm;
144 input->proximity_domain_info.flags.reserved = 0;
145 input->proximity_domain_info.flags.proximity_info_valid = 1;
146 input->proximity_domain_info.flags.proximity_preferred = 1;
147 status = hv_do_hypercall(HVCALL_ADD_LOGICAL_PROCESSOR,
148 input, output);
149 local_irq_restore(flags);
150
151 status &= HV_HYPERCALL_RESULT_MASK;
152
153 if (status != HV_STATUS_INSUFFICIENT_MEMORY) {
154 if (status != HV_STATUS_SUCCESS) {
155 pr_err("%s: cpu %u apic ID %u, %lld\n", __func__,
156 lp_index, apic_id, status);
157 ret = status;
158 }
159 break;
160 }
161 ret = hv_call_deposit_pages(node, hv_current_partition_id, 1);
162 } while (!ret);
163
164 return ret;
165 }
166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH 02/13] target: split target_submit_cmd_map_sgls
by kernel test robot
Hi Mike,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on vhost/linux-next v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mike-Christie/target-move-t_task...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: h8300-randconfig-s031-20210209 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/3382952197b63f11c166ff293f819ce6a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mike-Christie/target-move-t_task_cdb-initialization/20210209-213926
git checkout 3382952197b63f11c166ff293f819ce6ac4d52ae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/target/target_core_transport.c:1695:12: sparse: sparse: incorrect type in assignment (different base types) @@ expected int rc @@ got restricted sense_reason_t @@
drivers/target/target_core_transport.c:1695:12: sparse: expected int rc
drivers/target/target_core_transport.c:1695:12: sparse: got restricted sense_reason_t
drivers/target/target_core_transport.c:1699:12: sparse: sparse: incorrect type in assignment (different base types) @@ expected int rc @@ got restricted sense_reason_t @@
drivers/target/target_core_transport.c:1699:12: sparse: expected int rc
drivers/target/target_core_transport.c:1699:12: sparse: got restricted sense_reason_t
>> drivers/target/target_core_transport.c:1736:51: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted sense_reason_t [usertype] @@ got int rc @@
drivers/target/target_core_transport.c:1736:51: sparse: expected restricted sense_reason_t [usertype]
drivers/target/target_core_transport.c:1736:51: sparse: got int rc
vim +1695 drivers/target/target_core_transport.c
1678
1679 /**
1680 * target_submit - perform final initialization and submit cmd to LIO core
1681 * @se_cmd: command descriptor to submit
1682 * @cdb: pointer to SCSI CDB
1683 *
1684 * target_submit_prep must have been called on the cmd, and this must be
1685 * called from process context.
1686 */
1687 static void target_submit(struct se_cmd *se_cmd, unsigned char *cdb)
1688 {
1689 struct scatterlist *sgl = se_cmd->t_data_sg;
1690 unsigned char *buf = NULL;
1691 int rc;
1692
1693 might_sleep();
1694
> 1695 rc = target_cmd_init_cdb(se_cmd, cdb);
1696 if (rc)
1697 goto fail;
1698
1699 rc = target_cmd_parse_cdb(se_cmd);
1700 if (rc != 0)
1701 goto fail;
1702
1703 if (se_cmd->t_data_nents != 0) {
1704 BUG_ON(!sgl);
1705 /*
1706 * A work-around for tcm_loop as some userspace code via
1707 * scsi-generic do not memset their associated read buffers,
1708 * so go ahead and do that here for type non-data CDBs. Also
1709 * note that this is currently guaranteed to be a single SGL
1710 * for this case by target core in target_setup_cmd_from_cdb()
1711 * -> transport_generic_cmd_sequencer().
1712 */
1713 if (!(se_cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) &&
1714 se_cmd->data_direction == DMA_FROM_DEVICE) {
1715 if (sgl)
1716 buf = kmap(sg_page(sgl)) + sgl->offset;
1717
1718 if (buf) {
1719 memset(buf, 0, sgl->length);
1720 kunmap(sg_page(sgl));
1721 }
1722 }
1723
1724 }
1725
1726 /*
1727 * Check if we need to delay processing because of ALUA
1728 * Active/NonOptimized primary access state..
1729 */
1730 core_alua_check_nonop_delay(se_cmd);
1731
1732 transport_handle_cdb_direct(se_cmd);
1733 return;
1734
1735 fail:
> 1736 transport_generic_request_failure(se_cmd, rc);
1737 }
1738
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
commit: 04a834592bf51355383db6fc00cb09f776a6b8dc ionic: dynamic interrupt moderation
config: s390-randconfig-m031-20210209 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
vim +855 drivers/net/ethernet/pensando/ionic/ionic_lif.c
1d062b7b6f6408 Shannon Nelson 2019-09-03 834 static int ionic_adminq_napi(struct napi_struct *napi, int budget)
1d062b7b6f6408 Shannon Nelson 2019-09-03 835 {
b4280948aa22ab Shannon Nelson 2020-09-01 836 struct ionic_intr_info *intr = napi_to_cq(napi)->bound_intr;
77ceb68e29ccd2 Shannon Nelson 2019-09-03 837 struct ionic_lif *lif = napi_to_cq(napi)->lif;
b4280948aa22ab Shannon Nelson 2020-09-01 838 struct ionic_dev *idev = &lif->ionic->idev;
b4280948aa22ab Shannon Nelson 2020-09-01 839 unsigned int flags = 0;
77ceb68e29ccd2 Shannon Nelson 2019-09-03 840 int n_work = 0;
77ceb68e29ccd2 Shannon Nelson 2019-09-03 841 int a_work = 0;
b4280948aa22ab Shannon Nelson 2020-09-01 842 int work_done;
b4280948aa22ab Shannon Nelson 2020-09-01 843
b4280948aa22ab Shannon Nelson 2020-09-01 844 if (lif->notifyqcq && lif->notifyqcq->flags & IONIC_QCQ_F_INITED)
b4280948aa22ab Shannon Nelson 2020-09-01 845 n_work = ionic_cq_service(&lif->notifyqcq->cq, budget,
b4280948aa22ab Shannon Nelson 2020-09-01 846 ionic_notifyq_service, NULL, NULL);
77ceb68e29ccd2 Shannon Nelson 2019-09-03 847
b4280948aa22ab Shannon Nelson 2020-09-01 @848 if (lif->adminqcq && lif->adminqcq->flags & IONIC_QCQ_F_INITED)
^^^^^^^^^^^^^
Check for NULL
b4280948aa22ab Shannon Nelson 2020-09-01 849 a_work = ionic_cq_service(&lif->adminqcq->cq, budget,
b4280948aa22ab Shannon Nelson 2020-09-01 850 ionic_adminq_service, NULL, NULL);
b4280948aa22ab Shannon Nelson 2020-09-01 851
b4280948aa22ab Shannon Nelson 2020-09-01 852 work_done = max(n_work, a_work);
b4280948aa22ab Shannon Nelson 2020-09-01 853 if (work_done < budget && napi_complete_done(napi, work_done)) {
b4280948aa22ab Shannon Nelson 2020-09-01 854 flags |= IONIC_INTR_CRED_UNMASK;
04a834592bf513 Shannon Nelson 2020-09-15 @855 lif->adminqcq->cq.bound_intr->rearm_count++;
^^^^^^^^^^^^^
Unchecked dereference
b4280948aa22ab Shannon Nelson 2020-09-01 856 }
77ceb68e29ccd2 Shannon Nelson 2019-09-03 857
b4280948aa22ab Shannon Nelson 2020-09-01 858 if (work_done || flags) {
b4280948aa22ab Shannon Nelson 2020-09-01 859 flags |= IONIC_INTR_CRED_RESET_COALESCE;
b4280948aa22ab Shannon Nelson 2020-09-01 860 ionic_intr_credits(idev->intr_ctrl,
b4280948aa22ab Shannon Nelson 2020-09-01 861 intr->index,
b4280948aa22ab Shannon Nelson 2020-09-01 862 n_work + a_work, flags);
b4280948aa22ab Shannon Nelson 2020-09-01 863 }
b4280948aa22ab Shannon Nelson 2020-09-01 864
b4280948aa22ab Shannon Nelson 2020-09-01 865 return work_done;
1d062b7b6f6408 Shannon Nelson 2019-09-03 866 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[linuxppc:next-test 129/174] arch/powerpc/mm/book3s64/radix_tlb.c:646:6: error: no previous prototype for function 'exit_lazy_flush_tlb'
by kernel test robot
tree: https://github.com/linuxppc/linux next-test
head: f538b53fd47a5d34c63a078fab30f83c19b0c000
commit: 032b7f08932c9b212952d6d585e45b2941b3e8be [129/174] powerpc/64s/radix: serialize_against_pte_lookup IPIs trim mm_cpumask
config: powerpc-randconfig-r025-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/linuxppc/linux/commit/032b7f08932c9b212952d6d585e45b29...
git remote add linuxppc https://github.com/linuxppc/linux
git fetch --no-tags linuxppc next-test
git checkout 032b7f08932c9b212952d6d585e45b2941b3e8be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/book3s64/radix_tlb.c:646:6: error: no previous prototype for function 'exit_lazy_flush_tlb' [-Werror,-Wmissing-prototypes]
void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
^
arch/powerpc/mm/book3s64/radix_tlb.c:646:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
^
static
1 error generated.
vim +/exit_lazy_flush_tlb +646 arch/powerpc/mm/book3s64/radix_tlb.c
641
642 /*
643 * If always_flush is true, then flush even if this CPU can't be removed
644 * from mm_cpumask.
645 */
> 646 void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
647 {
648 unsigned long pid = mm->context.id;
649 int cpu = smp_processor_id();
650
651 /*
652 * A kthread could have done a mmget_not_zero() after the flushing CPU
653 * checked mm_cpumask, and be in the process of kthread_use_mm when
654 * interrupted here. In that case, current->mm will be set to mm,
655 * because kthread_use_mm() setting ->mm and switching to the mm is
656 * done with interrupts off.
657 */
658 if (current->mm == mm)
659 goto out;
660
661 if (current->active_mm == mm) {
662 WARN_ON_ONCE(current->mm != NULL);
663 /* Is a kernel thread and is using mm as the lazy tlb */
664 mmgrab(&init_mm);
665 current->active_mm = &init_mm;
666 switch_mm_irqs_off(mm, &init_mm, current);
667 mmdrop(mm);
668 }
669
670 /*
671 * This IPI may be initiated from any source including those not
672 * running the mm, so there may be a racing IPI that comes after
673 * this one which finds the cpumask already clear. Check and avoid
674 * underflowing the active_cpus count in that case. The race should
675 * not otherwise be a problem, but the TLB must be flushed because
676 * that's what the caller expects.
677 */
678 if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
679 atomic_dec(&mm->context.active_cpus);
680 cpumask_clear_cpu(cpu, mm_cpumask(mm));
681 always_flush = true;
682 }
683
684 out:
685 if (always_flush)
686 _tlbiel_pid(pid, RIC_FLUSH_ALL);
687 }
688
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH] IOCTL support for dell-wmi-sysman driver
by kernel test robot
Hi KSR",
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Prasanth-KSR/IOCTL-support-for-d...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 61556703b610a104de324e4f061dc6cf7b218b46
config: i386-randconfig-a002-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/00141bcb2495c75a902d3070e149760b1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Prasanth-KSR/IOCTL-support-for-dell-wmi-sysman-driver/20210209-223343
git checkout 00141bcb2495c75a902d3070e149760b1050322e
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
ld: drivers/platform/x86/dell-wmi-sysman/biosattr-interface.o: in function `run_sysman_call':
>> drivers/platform/x86/dell-wmi-sysman/biosattr-interface.c:228: undefined reference to `__udivdi3'
--
>> drivers/platform/x86/dell-wmi-sysman/sysman.c:310:5: warning: no previous prototype for 'validate_acpi_type' [-Wmissing-prototypes]
310 | int validate_acpi_type(union acpi_object *obj, const char *guid_string)
| ^~~~~~~~~~~~~~~~~~
--
>> drivers/platform/x86/dell-wmi-sysman/biosattr-interface.c:218:5: warning: no previous prototype for 'run_sysman_call' [-Wmissing-prototypes]
218 | int run_sysman_call(struct dell_wmi_sysman_buffer *buf)
| ^~~~~~~~~~~~~~~
vim +228 drivers/platform/x86/dell-wmi-sysman/biosattr-interface.c
217
> 218 int run_sysman_call(struct dell_wmi_sysman_buffer *buf)
219 {
220 struct dell_set_password *pass_set_data;
221 struct dell_set_data *in_data;
222 int ret = -ENOIOCTLCMD;
223 char *tmp_system = NULL;
224 char *tmp_admin = NULL;
225
226 switch (buf->command) {
227 case ENUMERATE_ALL:
> 228 buf->count = get_attrs_size() / sizeof(struct dell_attributes_data);
229 get_enumeration_data(buf);
230 get_integer_data(buf);
231 get_string_data(buf);
232 ret = 0;
233 break;
234 case SET_ATTRIBUTES:
235 case SET_DEFAULTS:
236 if (!buf->count)
237 goto out;
238 in_data = (struct dell_set_data *)buf->data;
239 tmp_admin = kstrdup(wmi_priv.current_admin_password, GFP_KERNEL);
240 strlcpy_attr(wmi_priv.current_admin_password, buf->admin_password);
241 ret = set_attributes(in_data, buf->count, buf->command);
242 strlcpy_attr(wmi_priv.current_admin_password, tmp_admin);
243 kfree(tmp_admin);
244 break;
245 case GET_PASS:
246 get_po_data(buf);
247 ret = 0;
248 break;
249 case SET_PASS:
250 pass_set_data = (struct dell_set_password *)buf->data;
251 tmp_admin = kstrdup(wmi_priv.current_admin_password, GFP_KERNEL);
252 strlcpy_attr(wmi_priv.current_admin_password, buf->admin_password);
253
254 if (strcmp(pass_set_data->attribute_name, "System") == 0) {
255 tmp_system = kstrdup(wmi_priv.current_system_password, GFP_KERNEL);
256 strlcpy_attr(wmi_priv.current_system_password,
257 pass_set_data->system_password);
258 }
259
260 ret = set_new_password(pass_set_data->attribute_name, pass_set_data->new_password);
261 strlcpy_attr(wmi_priv.current_admin_password, tmp_admin);
262 kfree(tmp_admin);
263
264 if (tmp_system != NULL) {
265 strlcpy_attr(wmi_priv.current_system_password, tmp_system);
266 kfree(tmp_system);
267 }
268 break;
269 }
270 out:
271 return ret;
272 }
273
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH 06/13] tcm loop: use lio wq cmd submission helper
by kernel test robot
Hi Mike,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on vhost/linux-next v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mike-Christie/target-move-t_task...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: h8300-randconfig-s031-20210209 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/b5a5f1dde145805b1ea13be05f6a28386...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mike-Christie/target-move-t_task_cdb-initialization/20210209-213926
git checkout b5a5f1dde145805b1ea13be05f6a28386284ac2e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/target/loopback/tcm_loop.c: In function 'tcm_loop_queuecommand':
>> drivers/target/loopback/tcm_loop.c:188:23: warning: variable 'tl_tpg' set but not used [-Wunused-but-set-variable]
188 | struct tcm_loop_tpg *tl_tpg;
| ^~~~~~
vim +/tl_tpg +188 drivers/target/loopback/tcm_loop.c
179
180 /*
181 * ->queuecommand can be and usually is called from interrupt context, so
182 * defer the actual submission to a workqueue.
183 */
184 static int tcm_loop_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
185 {
186 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc);
187 struct tcm_loop_hba *tl_hba;
> 188 struct tcm_loop_tpg *tl_tpg;
189
190 tl_hba = *(struct tcm_loop_hba **)shost_priv(sc->device->host);
191 tl_tpg = &tl_hba->tl_hba_tpgs[sc->device->id];
192
193 pr_debug("%s() %d:%d:%d:%llu got CDB: 0x%02x scsi_buf_len: %u\n",
194 __func__, sc->device->host->host_no, sc->device->id,
195 sc->device->channel, sc->device->lun, sc->cmnd[0],
196 scsi_bufflen(sc));
197
198 memset(tl_cmd, 0, sizeof(*tl_cmd));
199 tl_cmd->sc = sc;
200 tl_cmd->sc_cmd_tag = sc->request->tag;
201
202 tcm_loop_target_queue_cmd(tl_cmd);
203 return 0;
204 }
205
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
by Florian Fainelli
On 2/9/21 9:23 AM, Vladimir Oltean wrote:
> On Tue, Feb 09, 2021 at 11:18:12AM -0600, George McCollister wrote:
>> On Tue, Feb 9, 2021 at 10:33 AM Souptick Joarder <jrdr.linux(a)gmail.com> wrote:
>>> I think, this can defined under #ifdef CONFIG_OF.
>>
>> Was this robot reporting this warning for other DSA drivers? A lot of
>> them appear to use of_device_id in the same manner (unless I'm missing
>> something). Do we need to do something DSA wide to deal with this?
>
> Probably not DSA-wide since we still have drivers that probe on platform
> data and not OF (dsa_loop), but individual drivers should have "depends
> on OF" in Kconfig as far as I can tell.
Not necessarily, there is a runtime dependency on OF being available for
probing but as far as building goes there are stubs provided for when
CONFIG_OF=n which allow the driver to continue to build.
Adding either an #ifdef CONFIG_OF or __maybe_unused should silence those
warnings.
--
Florian
1 year, 7 months