[linux-arm:sa1100 50/57] ERROR: modpost: "ipaq_micro_tx_msg" undefined!
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm sa1100
head: 1f8db1c798717a711cdf8fc6b223b41e86ca5fcf
commit: b8ed2eca34fc3d57d2eadbc31c12a521fe08e221 [50/57] ARM: sa1100/h3xxx: sleeve support
config: arm-hackkit_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
git remote add linux-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags linux-arm sa1100
git checkout b8ed2eca34fc3d57d2eadbc31c12a521fe08e221
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>, old ones prefixed by <<):
>> ERROR: modpost: "ipaq_micro_tx_msg" [arch/arm/mach-sa1100/h3xxx-sleeve.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-arm:cex7 34/60] drivers/pci/controller/mobiveil/pcie-mobiveil-host.c:85:24: error: no member named 'root_bus_nr' in 'struct mobiveil_root_port'
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm cex7
head: 5804a6c03966ed6abc3979e10435362a1cd72505
commit: 80fa88ccaefb71c334bd923f23eacdf9714d20c6 [34/60] PCI: mobiveil: ls_pcie_g4: add Workaround for A-011577
config: x86_64-randconfig-a012-20201019 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2a75e956e5ce7ea212333a86fe65fc68185cbf48)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add linux-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags linux-arm cex7
git checkout 80fa88ccaefb71c334bd923f23eacdf9714d20c6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> drivers/pci/controller/mobiveil/pcie-mobiveil-host.c:85:24: error: no member named 'root_bus_nr' in 'struct mobiveil_root_port'
if (bus->number > rp->root_bus_nr && rp->ops->read_other_conf)
~~ ^
1 error generated.
vim +85 drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
78
79 static int mobiveil_pcie_config_read(struct pci_bus *bus, unsigned int devfn,
80 int where, int size, u32 *val)
81 {
82 struct mobiveil_pcie *pcie = bus->sysdata;
83 struct mobiveil_root_port *rp = &pcie->rp;
84
> 85 if (bus->number > rp->root_bus_nr && rp->ops->read_other_conf)
86 return rp->ops->read_other_conf(bus, devfn, where, size, val);
87
88 return pci_generic_config_read(bus, devfn, where, size, val);
89 }
90 static struct pci_ops mobiveil_pcie_ops = {
91 .map_bus = mobiveil_pcie_map_bus,
92 .read = mobiveil_pcie_config_read,
93 .write = pci_generic_config_write,
94 };
95
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
fs/btrfs/volumes.c:888:50: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7cf726a59435301046250c42131554d9ccc566b8
commit: 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b btrfs: annotate device name rcu_string with __rcu
date: 12 days ago
config: s390-randconfig-s032-20201019 (attached as .config)
compiler: s390-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-rc1-2-g368fd9ce-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b
# 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=s390
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 >>)"
fs/btrfs/volumes.c:374:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rcu_string *str @@ got struct rcu_string [noderef] __rcu *name @@
fs/btrfs/volumes.c:374:31: sparse: expected struct rcu_string *str
fs/btrfs/volumes.c:374:31: sparse: got struct rcu_string [noderef] __rcu *name
fs/btrfs/volumes.c:631:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *device_path @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:631:43: sparse: expected char const *device_path
fs/btrfs/volumes.c:631:43: sparse: got char [noderef] __rcu *
>> fs/btrfs/volumes.c:888:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *s1 @@ got char [noderef] __rcu * @@
>> fs/btrfs/volumes.c:888:50: sparse: expected char const *s1
fs/btrfs/volumes.c:888:50: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:963:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rcu_string *str @@ got struct rcu_string [noderef] __rcu *name @@
fs/btrfs/volumes.c:963:39: sparse: expected struct rcu_string *str
fs/btrfs/volumes.c:963:39: sparse: got struct rcu_string [noderef] __rcu *name
fs/btrfs/volumes.c:1018:58: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *src @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:1018:58: sparse: expected char const *src
fs/btrfs/volumes.c:1018:58: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:2165:49: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected char const *device_path @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:2165:49: sparse: expected char const *device_path
fs/btrfs/volumes.c:2165:49: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:2273:41: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected char const *device_path @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:2273:41: sparse: expected char const *device_path
fs/btrfs/volumes.c:2273:41: sparse: got char [noderef] __rcu *
vim +888 fs/btrfs/volumes.c
1362089d2ad7e20 Nikolay Borisov 2020-01-10 745
1362089d2ad7e20 Nikolay Borisov 2020-01-10 746 static struct btrfs_fs_devices *find_fsid_reverted_metadata(
1362089d2ad7e20 Nikolay Borisov 2020-01-10 747 struct btrfs_super_block *disk_super)
1362089d2ad7e20 Nikolay Borisov 2020-01-10 748 {
1362089d2ad7e20 Nikolay Borisov 2020-01-10 749 struct btrfs_fs_devices *fs_devices;
1362089d2ad7e20 Nikolay Borisov 2020-01-10 750
1362089d2ad7e20 Nikolay Borisov 2020-01-10 751 /*
1362089d2ad7e20 Nikolay Borisov 2020-01-10 752 * Handle the case where the scanned device is part of an fs whose last
1362089d2ad7e20 Nikolay Borisov 2020-01-10 753 * metadata UUID change reverted it to the original FSID. At the same
1362089d2ad7e20 Nikolay Borisov 2020-01-10 754 * time * fs_devices was first created by another constitutent device
1362089d2ad7e20 Nikolay Borisov 2020-01-10 755 * which didn't fully observe the operation. This results in an
1362089d2ad7e20 Nikolay Borisov 2020-01-10 756 * btrfs_fs_devices created with metadata/fsid different AND
1362089d2ad7e20 Nikolay Borisov 2020-01-10 757 * btrfs_fs_devices::fsid_change set AND the metadata_uuid of the
1362089d2ad7e20 Nikolay Borisov 2020-01-10 758 * fs_devices equal to the FSID of the disk.
1362089d2ad7e20 Nikolay Borisov 2020-01-10 759 */
1362089d2ad7e20 Nikolay Borisov 2020-01-10 760 list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
1362089d2ad7e20 Nikolay Borisov 2020-01-10 761 if (memcmp(fs_devices->fsid, fs_devices->metadata_uuid,
1362089d2ad7e20 Nikolay Borisov 2020-01-10 762 BTRFS_FSID_SIZE) != 0 &&
1362089d2ad7e20 Nikolay Borisov 2020-01-10 763 memcmp(fs_devices->metadata_uuid, disk_super->fsid,
1362089d2ad7e20 Nikolay Borisov 2020-01-10 764 BTRFS_FSID_SIZE) == 0 &&
1362089d2ad7e20 Nikolay Borisov 2020-01-10 765 fs_devices->fsid_change)
1362089d2ad7e20 Nikolay Borisov 2020-01-10 766 return fs_devices;
1362089d2ad7e20 Nikolay Borisov 2020-01-10 767 }
1362089d2ad7e20 Nikolay Borisov 2020-01-10 768
1362089d2ad7e20 Nikolay Borisov 2020-01-10 769 return NULL;
1362089d2ad7e20 Nikolay Borisov 2020-01-10 770 }
60999ca4b4033ee David Sterba 2014-03-26 771 /*
60999ca4b4033ee David Sterba 2014-03-26 772 * Add new device to list of registered devices
60999ca4b4033ee David Sterba 2014-03-26 773 *
60999ca4b4033ee David Sterba 2014-03-26 774 * Returns:
e124ece53edf3a8 Anand Jain 2018-01-18 775 * device pointer which was just added or updated when successful
e124ece53edf3a8 Anand Jain 2018-01-18 776 * error pointer when failed
60999ca4b4033ee David Sterba 2014-03-26 777 */
e124ece53edf3a8 Anand Jain 2018-01-18 778 static noinline struct btrfs_device *device_list_add(const char *path,
4306a97449f9a0f Anand Jain 2018-05-29 779 struct btrfs_super_block *disk_super,
4306a97449f9a0f Anand Jain 2018-05-29 780 bool *new_device_added)
8a4b83cc8bd75fc Chris Mason 2008-03-24 781 {
8a4b83cc8bd75fc Chris Mason 2008-03-24 782 struct btrfs_device *device;
7a62d0f07377b51 Nikolay Borisov 2018-10-30 783 struct btrfs_fs_devices *fs_devices = NULL;
606686eeac4550d Josef Bacik 2012-06-04 784 struct rcu_string *name;
8a4b83cc8bd75fc Chris Mason 2008-03-24 785 u64 found_transid = btrfs_super_generation(disk_super);
3acbcbfc8f06d4a Anand Jain 2018-01-18 786 u64 devid = btrfs_stack_device_id(&disk_super->dev_item);
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 787 bool has_metadata_uuid = (btrfs_super_incompat_flags(disk_super) &
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 788 BTRFS_FEATURE_INCOMPAT_METADATA_UUID);
d1a63002829a4d8 Nikolay Borisov 2018-10-30 789 bool fsid_change_in_progress = (btrfs_super_flags(disk_super) &
d1a63002829a4d8 Nikolay Borisov 2018-10-30 790 BTRFS_SUPER_FLAG_CHANGING_FSID_V2);
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 791
cc5de4e70256cbf Nikolay Borisov 2018-10-30 792 if (fsid_change_in_progress) {
c0d81c7cb236782 Su Yue 2020-01-10 793 if (!has_metadata_uuid)
7a62d0f07377b51 Nikolay Borisov 2018-10-30 794 fs_devices = find_fsid_inprogress(disk_super);
c0d81c7cb236782 Su Yue 2020-01-10 795 else
cc5de4e70256cbf Nikolay Borisov 2018-10-30 796 fs_devices = find_fsid_changed(disk_super);
7a62d0f07377b51 Nikolay Borisov 2018-10-30 797 } else if (has_metadata_uuid) {
c6730a0e5778bf2 Su Yue 2020-01-10 798 fs_devices = find_fsid_with_metadata_uuid(disk_super);
7a62d0f07377b51 Nikolay Borisov 2018-10-30 799 } else {
1362089d2ad7e20 Nikolay Borisov 2020-01-10 800 fs_devices = find_fsid_reverted_metadata(disk_super);
1362089d2ad7e20 Nikolay Borisov 2020-01-10 801 if (!fs_devices)
7a62d0f07377b51 Nikolay Borisov 2018-10-30 802 fs_devices = find_fsid(disk_super->fsid, NULL);
7a62d0f07377b51 Nikolay Borisov 2018-10-30 803 }
7a62d0f07377b51 Nikolay Borisov 2018-10-30 804
7a62d0f07377b51 Nikolay Borisov 2018-10-30 805
8a4b83cc8bd75fc Chris Mason 2008-03-24 806 if (!fs_devices) {
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 807 if (has_metadata_uuid)
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 808 fs_devices = alloc_fs_devices(disk_super->fsid,
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 809 disk_super->metadata_uuid);
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 810 else
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 811 fs_devices = alloc_fs_devices(disk_super->fsid, NULL);
7239ff4b2be8ec0 Nikolay Borisov 2018-10-30 812
2208a378f35fea7 Ilya Dryomov 2013-08-12 813 if (IS_ERR(fs_devices))
e124ece53edf3a8 Anand Jain 2018-01-18 814 return ERR_CAST(fs_devices);
2208a378f35fea7 Ilya Dryomov 2013-08-12 815
92900e5160a5444 Al Viro 2019-01-27 816 fs_devices->fsid_change = fsid_change_in_progress;
92900e5160a5444 Al Viro 2019-01-27 817
9c6d173ea6e4c8c Anand Jain 2018-05-29 818 mutex_lock(&fs_devices->device_list_mutex);
c4babc5e38e94e7 Anand Jain 2018-04-12 819 list_add(&fs_devices->fs_list, &fs_uuids);
2208a378f35fea7 Ilya Dryomov 2013-08-12 820
8a4b83cc8bd75fc Chris Mason 2008-03-24 821 device = NULL;
8a4b83cc8bd75fc Chris Mason 2008-03-24 822 } else {
9c6d173ea6e4c8c Anand Jain 2018-05-29 823 mutex_lock(&fs_devices->device_list_mutex);
09ba3bc9dd15045 Anand Jain 2019-01-19 824 device = btrfs_find_device(fs_devices, devid,
09ba3bc9dd15045 Anand Jain 2019-01-19 825 disk_super->dev_item.uuid, NULL, false);
7a62d0f07377b51 Nikolay Borisov 2018-10-30 826
7a62d0f07377b51 Nikolay Borisov 2018-10-30 827 /*
7a62d0f07377b51 Nikolay Borisov 2018-10-30 828 * If this disk has been pulled into an fs devices created by
7a62d0f07377b51 Nikolay Borisov 2018-10-30 829 * a device which had the CHANGING_FSID_V2 flag then replace the
7a62d0f07377b51 Nikolay Borisov 2018-10-30 830 * metadata_uuid/fsid values of the fs_devices.
7a62d0f07377b51 Nikolay Borisov 2018-10-30 831 */
1362089d2ad7e20 Nikolay Borisov 2020-01-10 832 if (fs_devices->fsid_change &&
7a62d0f07377b51 Nikolay Borisov 2018-10-30 833 found_transid > fs_devices->latest_generation) {
7a62d0f07377b51 Nikolay Borisov 2018-10-30 834 memcpy(fs_devices->fsid, disk_super->fsid,
7a62d0f07377b51 Nikolay Borisov 2018-10-30 835 BTRFS_FSID_SIZE);
1362089d2ad7e20 Nikolay Borisov 2020-01-10 836
1362089d2ad7e20 Nikolay Borisov 2020-01-10 837 if (has_metadata_uuid)
1362089d2ad7e20 Nikolay Borisov 2020-01-10 838 memcpy(fs_devices->metadata_uuid,
1362089d2ad7e20 Nikolay Borisov 2020-01-10 839 disk_super->metadata_uuid,
1362089d2ad7e20 Nikolay Borisov 2020-01-10 840 BTRFS_FSID_SIZE);
1362089d2ad7e20 Nikolay Borisov 2020-01-10 841 else
7a62d0f07377b51 Nikolay Borisov 2018-10-30 842 memcpy(fs_devices->metadata_uuid,
1362089d2ad7e20 Nikolay Borisov 2020-01-10 843 disk_super->fsid, BTRFS_FSID_SIZE);
7a62d0f07377b51 Nikolay Borisov 2018-10-30 844
7a62d0f07377b51 Nikolay Borisov 2018-10-30 845 fs_devices->fsid_change = false;
7a62d0f07377b51 Nikolay Borisov 2018-10-30 846 }
8a4b83cc8bd75fc Chris Mason 2008-03-24 847 }
443f24fee731703 Miao Xie 2014-07-24 848
8a4b83cc8bd75fc Chris Mason 2008-03-24 849 if (!device) {
9c6d173ea6e4c8c Anand Jain 2018-05-29 850 if (fs_devices->opened) {
9c6d173ea6e4c8c Anand Jain 2018-05-29 851 mutex_unlock(&fs_devices->device_list_mutex);
e124ece53edf3a8 Anand Jain 2018-01-18 852 return ERR_PTR(-EBUSY);
9c6d173ea6e4c8c Anand Jain 2018-05-29 853 }
2b82032c34ec405 Yan Zheng 2008-11-17 854
12bd2fc0d2f589f Ilya Dryomov 2013-08-23 855 device = btrfs_alloc_device(NULL, &devid,
12bd2fc0d2f589f Ilya Dryomov 2013-08-23 856 disk_super->dev_item.uuid);
12bd2fc0d2f589f Ilya Dryomov 2013-08-23 857 if (IS_ERR(device)) {
9c6d173ea6e4c8c Anand Jain 2018-05-29 858 mutex_unlock(&fs_devices->device_list_mutex);
8a4b83cc8bd75fc Chris Mason 2008-03-24 859 /* we can safely leave the fs_devices entry around */
e124ece53edf3a8 Anand Jain 2018-01-18 860 return device;
8a4b83cc8bd75fc Chris Mason 2008-03-24 861 }
606686eeac4550d Josef Bacik 2012-06-04 862
606686eeac4550d Josef Bacik 2012-06-04 863 name = rcu_string_strdup(path, GFP_NOFS);
606686eeac4550d Josef Bacik 2012-06-04 864 if (!name) {
a425f9d4755a14f David Sterba 2018-03-20 865 btrfs_free_device(device);
9c6d173ea6e4c8c Anand Jain 2018-05-29 866 mutex_unlock(&fs_devices->device_list_mutex);
e124ece53edf3a8 Anand Jain 2018-01-18 867 return ERR_PTR(-ENOMEM);
8a4b83cc8bd75fc Chris Mason 2008-03-24 868 }
606686eeac4550d Josef Bacik 2012-06-04 869 rcu_assign_pointer(device->name, name);
90519d66abbccc2 Arne Jansen 2011-05-23 870
1f78160ce1b1b8e Xiao Guangrong 2011-04-20 871 list_add_rcu(&device->dev_list, &fs_devices->devices);
f71717502460c5c Filipe David Borba Manana 2013-08-12 872 fs_devices->num_devices++;
e5e9a5206a171b2 Chris Mason 2009-06-10 873
2b82032c34ec405 Yan Zheng 2008-11-17 874 device->fs_devices = fs_devices;
4306a97449f9a0f Anand Jain 2018-05-29 875 *new_device_added = true;
327f18cc7f44bc0 Anand Jain 2018-01-18 876
327f18cc7f44bc0 Anand Jain 2018-01-18 877 if (disk_super->label[0])
aa6c0df73e3b3fc Anand Jain 2019-10-02 878 pr_info(
aa6c0df73e3b3fc Anand Jain 2019-10-02 879 "BTRFS: device label %s devid %llu transid %llu %s scanned by %s (%d)\n",
aa6c0df73e3b3fc Anand Jain 2019-10-02 880 disk_super->label, devid, found_transid, path,
aa6c0df73e3b3fc Anand Jain 2019-10-02 881 current->comm, task_pid_nr(current));
327f18cc7f44bc0 Anand Jain 2018-01-18 882 else
aa6c0df73e3b3fc Anand Jain 2019-10-02 883 pr_info(
aa6c0df73e3b3fc Anand Jain 2019-10-02 884 "BTRFS: device fsid %pU devid %llu transid %llu %s scanned by %s (%d)\n",
aa6c0df73e3b3fc Anand Jain 2019-10-02 885 disk_super->fsid, devid, found_transid, path,
aa6c0df73e3b3fc Anand Jain 2019-10-02 886 current->comm, task_pid_nr(current));
327f18cc7f44bc0 Anand Jain 2018-01-18 887
606686eeac4550d Josef Bacik 2012-06-04 @888 } else if (!device->name || strcmp(device->name->str, path)) {
b96de000bc8bc96 Anand Jain 2014-07-03 889 /*
b96de000bc8bc96 Anand Jain 2014-07-03 890 * When FS is already mounted.
b96de000bc8bc96 Anand Jain 2014-07-03 891 * 1. If you are here and if the device->name is NULL that
b96de000bc8bc96 Anand Jain 2014-07-03 892 * means this device was missing at time of FS mount.
b96de000bc8bc96 Anand Jain 2014-07-03 893 * 2. If you are here and if the device->name is different
b96de000bc8bc96 Anand Jain 2014-07-03 894 * from 'path' that means either
b96de000bc8bc96 Anand Jain 2014-07-03 895 * a. The same device disappeared and reappeared with
b96de000bc8bc96 Anand Jain 2014-07-03 896 * different name. or
b96de000bc8bc96 Anand Jain 2014-07-03 897 * b. The missing-disk-which-was-replaced, has
b96de000bc8bc96 Anand Jain 2014-07-03 898 * reappeared now.
b96de000bc8bc96 Anand Jain 2014-07-03 899 *
b96de000bc8bc96 Anand Jain 2014-07-03 900 * We must allow 1 and 2a above. But 2b would be a spurious
b96de000bc8bc96 Anand Jain 2014-07-03 901 * and unintentional.
b96de000bc8bc96 Anand Jain 2014-07-03 902 *
b96de000bc8bc96 Anand Jain 2014-07-03 903 * Further in case of 1 and 2a above, the disk at 'path'
b96de000bc8bc96 Anand Jain 2014-07-03 904 * would have missed some transaction when it was away and
b96de000bc8bc96 Anand Jain 2014-07-03 905 * in case of 2a the stale bdev has to be updated as well.
b96de000bc8bc96 Anand Jain 2014-07-03 906 * 2b must not be allowed at all time.
b96de000bc8bc96 Anand Jain 2014-07-03 907 */
b96de000bc8bc96 Anand Jain 2014-07-03 908
b96de000bc8bc96 Anand Jain 2014-07-03 909 /*
0f23ae74f589304 Chris Mason 2014-09-18 910 * For now, we do allow update to btrfs_fs_device through the
0f23ae74f589304 Chris Mason 2014-09-18 911 * btrfs dev scan cli after FS has been mounted. We're still
0f23ae74f589304 Chris Mason 2014-09-18 912 * tracking a problem where systems fail mount by subvolume id
0f23ae74f589304 Chris Mason 2014-09-18 913 * when we reject replacement on a mounted FS.
b96de000bc8bc96 Anand Jain 2014-07-03 914 */
0f23ae74f589304 Chris Mason 2014-09-18 915 if (!fs_devices->opened && found_transid < device->generation) {
77bdae4d136e167 Anand Jain 2014-07-03 916 /*
77bdae4d136e167 Anand Jain 2014-07-03 917 * That is if the FS is _not_ mounted and if you
77bdae4d136e167 Anand Jain 2014-07-03 918 * are here, that means there is more than one
77bdae4d136e167 Anand Jain 2014-07-03 919 * disk with same uuid and devid.We keep the one
77bdae4d136e167 Anand Jain 2014-07-03 920 * with larger generation number or the last-in if
77bdae4d136e167 Anand Jain 2014-07-03 921 * generation are equal.
77bdae4d136e167 Anand Jain 2014-07-03 922 */
9c6d173ea6e4c8c Anand Jain 2018-05-29 923 mutex_unlock(&fs_devices->device_list_mutex);
e124ece53edf3a8 Anand Jain 2018-01-18 924 return ERR_PTR(-EEXIST);
77bdae4d136e167 Anand Jain 2014-07-03 925 }
b96de000bc8bc96 Anand Jain 2014-07-03 926
a9261d4125c97ce Anand Jain 2018-10-15 927 /*
a9261d4125c97ce Anand Jain 2018-10-15 928 * We are going to replace the device path for a given devid,
a9261d4125c97ce Anand Jain 2018-10-15 929 * make sure it's the same device if the device is mounted
a9261d4125c97ce Anand Jain 2018-10-15 930 */
a9261d4125c97ce Anand Jain 2018-10-15 931 if (device->bdev) {
a9261d4125c97ce Anand Jain 2018-10-15 932 struct block_device *path_bdev;
a9261d4125c97ce Anand Jain 2018-10-15 933
a9261d4125c97ce Anand Jain 2018-10-15 934 path_bdev = lookup_bdev(path);
a9261d4125c97ce Anand Jain 2018-10-15 935 if (IS_ERR(path_bdev)) {
a9261d4125c97ce Anand Jain 2018-10-15 936 mutex_unlock(&fs_devices->device_list_mutex);
a9261d4125c97ce Anand Jain 2018-10-15 937 return ERR_CAST(path_bdev);
a9261d4125c97ce Anand Jain 2018-10-15 938 }
a9261d4125c97ce Anand Jain 2018-10-15 939
a9261d4125c97ce Anand Jain 2018-10-15 940 if (device->bdev != path_bdev) {
a9261d4125c97ce Anand Jain 2018-10-15 941 bdput(path_bdev);
a9261d4125c97ce Anand Jain 2018-10-15 942 mutex_unlock(&fs_devices->device_list_mutex);
a9261d4125c97ce Anand Jain 2018-10-15 943 btrfs_warn_in_rcu(device->fs_info,
79dae17d8d44b2d Anand Jain 2020-09-03 944 "duplicate device %s devid %llu generation %llu scanned by %s (%d)",
79dae17d8d44b2d Anand Jain 2020-09-03 945 path, devid, found_transid,
79dae17d8d44b2d Anand Jain 2020-09-03 946 current->comm,
79dae17d8d44b2d Anand Jain 2020-09-03 947 task_pid_nr(current));
a9261d4125c97ce Anand Jain 2018-10-15 948 return ERR_PTR(-EEXIST);
a9261d4125c97ce Anand Jain 2018-10-15 949 }
a9261d4125c97ce Anand Jain 2018-10-15 950 bdput(path_bdev);
a9261d4125c97ce Anand Jain 2018-10-15 951 btrfs_info_in_rcu(device->fs_info,
79dae17d8d44b2d Anand Jain 2020-09-03 952 "devid %llu device path %s changed to %s scanned by %s (%d)",
79dae17d8d44b2d Anand Jain 2020-09-03 953 devid, rcu_str_deref(device->name),
79dae17d8d44b2d Anand Jain 2020-09-03 954 path, current->comm,
79dae17d8d44b2d Anand Jain 2020-09-03 955 task_pid_nr(current));
a9261d4125c97ce Anand Jain 2018-10-15 956 }
a9261d4125c97ce Anand Jain 2018-10-15 957
606686eeac4550d Josef Bacik 2012-06-04 958 name = rcu_string_strdup(path, GFP_NOFS);
9c6d173ea6e4c8c Anand Jain 2018-05-29 959 if (!name) {
9c6d173ea6e4c8c Anand Jain 2018-05-29 960 mutex_unlock(&fs_devices->device_list_mutex);
e124ece53edf3a8 Anand Jain 2018-01-18 961 return ERR_PTR(-ENOMEM);
9c6d173ea6e4c8c Anand Jain 2018-05-29 962 }
606686eeac4550d Josef Bacik 2012-06-04 963 rcu_string_free(device->name);
606686eeac4550d Josef Bacik 2012-06-04 964 rcu_assign_pointer(device->name, name);
e6e674bd4d54fe8 Anand Jain 2017-12-04 965 if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) {
cd02dca56442e15 Chris Mason 2010-12-13 966 fs_devices->missing_devices--;
e6e674bd4d54fe8 Anand Jain 2017-12-04 967 clear_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state);
cd02dca56442e15 Chris Mason 2010-12-13 968 }
8a4b83cc8bd75fc Chris Mason 2008-03-24 969 }
8a4b83cc8bd75fc Chris Mason 2008-03-24 970
77bdae4d136e167 Anand Jain 2014-07-03 971 /*
77bdae4d136e167 Anand Jain 2014-07-03 972 * Unmount does not free the btrfs_device struct but would zero
77bdae4d136e167 Anand Jain 2014-07-03 973 * generation along with most of the other members. So just update
77bdae4d136e167 Anand Jain 2014-07-03 974 * it back. We need it to pick the disk with largest generation
77bdae4d136e167 Anand Jain 2014-07-03 975 * (as above).
77bdae4d136e167 Anand Jain 2014-07-03 976 */
d1a63002829a4d8 Nikolay Borisov 2018-10-30 977 if (!fs_devices->opened) {
77bdae4d136e167 Anand Jain 2014-07-03 978 device->generation = found_transid;
d1a63002829a4d8 Nikolay Borisov 2018-10-30 979 fs_devices->latest_generation = max_t(u64, found_transid,
d1a63002829a4d8 Nikolay Borisov 2018-10-30 980 fs_devices->latest_generation);
d1a63002829a4d8 Nikolay Borisov 2018-10-30 981 }
77bdae4d136e167 Anand Jain 2014-07-03 982
f2788d2f76cafef Anand Jain 2018-01-18 983 fs_devices->total_devices = btrfs_super_num_devices(disk_super);
f2788d2f76cafef Anand Jain 2018-01-18 984
9c6d173ea6e4c8c Anand Jain 2018-05-29 985 mutex_unlock(&fs_devices->device_list_mutex);
e124ece53edf3a8 Anand Jain 2018-01-18 986 return device;
8a4b83cc8bd75fc Chris Mason 2008-03-24 987 }
8a4b83cc8bd75fc Chris Mason 2008-03-24 988
:::::: The code at line 888 was first introduced by commit
:::::: 606686eeac4550d2212bf3d621a810407ef5e9bf Btrfs: use rcu to protect device->name
:::::: TO: Josef Bacik <josef(a)redhat.com>
:::::: CC: Chris Mason <chris.mason(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-arm:sa1100 21/57] arch/arm/mach-sa1100/clock.c:92:12: warning: no previous prototype for 'sa11xx_clk_init'
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm sa1100
head: 1f8db1c798717a711cdf8fc6b223b41e86ca5fcf
commit: 736263d8aa20c99d5f40f129e4c9c28ddb3f95ef [21/57] ARM: sa1100: switch to accurate MPLL calculation
config: arm-hackkit_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
git remote add linux-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags linux-arm sa1100
git checkout 736263d8aa20c99d5f40f129e4c9c28ddb3f95ef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
>> arch/arm/mach-sa1100/clock.c:92:12: warning: no previous prototype for 'sa11xx_clk_init' [-Wmissing-prototypes]
92 | int __init sa11xx_clk_init(void)
| ^~~~~~~~~~~~~~~
vim +/sa11xx_clk_init +92 arch/arm/mach-sa1100/clock.c
97d654f8eb4b8fb Russell King 2006-03-15 91
d6c8204659eb184 Russell King 2016-08-31 @92 int __init sa11xx_clk_init(void)
:::::: The code at line 92 was first introduced by commit
:::::: d6c8204659eb1846c444997ee28fe9d7e5442f4e ARM: sa1100: convert to common clock framework
:::::: TO: Russell King <rmk+kernel(a)armlinux.org.uk>
:::::: CC: Russell King <rmk+kernel(a)armlinux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-arm:clearfog 10/11] drivers/pci/pcie/aspm.c:579 pcie_aspm_cap_init() warn: inconsistent indenting
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm clearfog
head: 9573fbf36e132a161223d54b40b42532092f25da
commit: fa41a0502c6bc6d3e793226c597b9762b181c76b [10/11] mvebu/clearfog pcie updates
config: x86_64-randconfig-m001-20201019 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/pci/pcie/aspm.c:579 pcie_aspm_cap_init() warn: inconsistent indenting
vim +579 drivers/pci/pcie/aspm.c
545
546 static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
547 {
548 struct pci_dev *child = link->downstream, *parent = link->pdev;
549 struct pci_bus *linkbus = parent->subordinate;
550 struct aspm_register_info upreg, dwreg;
551
552 if (blacklist) {
553 /* Set enabled/disable so that we will disable ASPM later */
554 link->aspm_enabled = ASPM_STATE_ALL;
555 link->aspm_disable = ASPM_STATE_ALL;
556 return;
557 }
558
559 /* Get upstream/downstream components' register state */
560 pcie_get_aspm_reg(parent, &upreg);
561 pcie_get_aspm_reg(child, &dwreg);
562
563 /*
564 * If ASPM not supported, don't mess with the clocks and link,
565 * bail out now.
566 */
567 if (!(upreg.support & dwreg.support))
568 return;
569
570 /* Configure common clock before checking latencies */
571 pcie_aspm_configure_common_clock(link);
572
573 /*
574 * Re-read upstream/downstream components' register state
575 * after clock configuration
576 */
577 pcie_get_aspm_reg(parent, &upreg);
578 pcie_get_aspm_reg(child, &dwreg);
> 579 dev_info(&parent->dev, "up support %x enabled %x\n", upreg.support, upreg.enabled);
580 dev_info(&parent->dev, "dn support %x enabled %x\n", dwreg.support, dwreg.enabled);
581
582 /*
583 * Setup L0s state
584 *
585 * Note that we must not enable L0s in either direction on a
586 * given link unless components on both sides of the link each
587 * support L0s.
588 */
589 if (dwreg.support & upreg.support & PCIE_LINK_STATE_L0S)
590 link->aspm_support |= ASPM_STATE_L0S;
591 if (dwreg.enabled & PCIE_LINK_STATE_L0S)
592 link->aspm_enabled |= ASPM_STATE_L0S_UP;
593 if (upreg.enabled & PCIE_LINK_STATE_L0S)
594 link->aspm_enabled |= ASPM_STATE_L0S_DW;
595 link->latency_up.l0s = calc_l0s_latency(upreg.latency_encoding_l0s);
596 link->latency_dw.l0s = calc_l0s_latency(dwreg.latency_encoding_l0s);
597
598 /* Setup L1 state */
599 if (upreg.support & dwreg.support & PCIE_LINK_STATE_L1)
600 link->aspm_support |= ASPM_STATE_L1;
601 if (upreg.enabled & dwreg.enabled & PCIE_LINK_STATE_L1)
602 link->aspm_enabled |= ASPM_STATE_L1;
603 link->latency_up.l1 = calc_l1_latency(upreg.latency_encoding_l1);
604 link->latency_dw.l1 = calc_l1_latency(dwreg.latency_encoding_l1);
605
606 /* Setup L1 substate */
607 if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_ASPM_L1_1)
608 link->aspm_support |= ASPM_STATE_L1_1;
609 if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_ASPM_L1_2)
610 link->aspm_support |= ASPM_STATE_L1_2;
611 if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_PCIPM_L1_1)
612 link->aspm_support |= ASPM_STATE_L1_1_PCIPM;
613 if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_PCIPM_L1_2)
614 link->aspm_support |= ASPM_STATE_L1_2_PCIPM;
615
616 if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_ASPM_L1_1)
617 link->aspm_enabled |= ASPM_STATE_L1_1;
618 if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_ASPM_L1_2)
619 link->aspm_enabled |= ASPM_STATE_L1_2;
620 if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_PCIPM_L1_1)
621 link->aspm_enabled |= ASPM_STATE_L1_1_PCIPM;
622 if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_PCIPM_L1_2)
623 link->aspm_enabled |= ASPM_STATE_L1_2_PCIPM;
624
625 if (link->aspm_support & ASPM_STATE_L1SS)
626 aspm_calc_l1ss_info(link, &upreg, &dwreg);
627
628 /* Save default state */
629 link->aspm_default = link->aspm_enabled;
630
631 /* Setup initial capable state. Will be updated later */
632 link->aspm_capable = link->aspm_support;
633
634 /* Get and check endpoint acceptable latencies */
635 list_for_each_entry(child, &linkbus->devices, bus_list) {
636 u32 reg32, encoding;
637 struct aspm_latency *acceptable =
638 &link->acceptable[PCI_FUNC(child->devfn)];
639
640 if (pci_pcie_type(child) != PCI_EXP_TYPE_ENDPOINT &&
641 pci_pcie_type(child) != PCI_EXP_TYPE_LEG_END)
642 continue;
643
644 pcie_capability_read_dword(child, PCI_EXP_DEVCAP, ®32);
645 /* Calculate endpoint L0s acceptable latency */
646 encoding = (reg32 & PCI_EXP_DEVCAP_L0S) >> 6;
647 acceptable->l0s = calc_l0s_acceptable(encoding);
648 /* Calculate endpoint L1 acceptable latency */
649 encoding = (reg32 & PCI_EXP_DEVCAP_L1) >> 9;
650 acceptable->l1 = calc_l1_acceptable(encoding);
651
652 pcie_aspm_check_latency(child);
653 }
654 }
655
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-arm:cex7 34/60] drivers/pci/controller/mobiveil/pcie-mobiveil-host.c:85:22: error: 'struct mobiveil_root_port' has no member named 'root_bus_nr'
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm cex7
head: 5804a6c03966ed6abc3979e10435362a1cd72505
commit: 80fa88ccaefb71c334bd923f23eacdf9714d20c6 [34/60] PCI: mobiveil: ls_pcie_g4: add Workaround for A-011577
config: i386-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 linux-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags linux-arm cex7
git checkout 80fa88ccaefb71c334bd923f23eacdf9714d20c6
# 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 errors (new ones prefixed by >>):
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c: In function 'mobiveil_pcie_config_read':
>> drivers/pci/controller/mobiveil/pcie-mobiveil-host.c:85:22: error: 'struct mobiveil_root_port' has no member named 'root_bus_nr'
85 | if (bus->number > rp->root_bus_nr && rp->ops->read_other_conf)
| ^~
vim +85 drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
78
79 static int mobiveil_pcie_config_read(struct pci_bus *bus, unsigned int devfn,
80 int where, int size, u32 *val)
81 {
82 struct mobiveil_pcie *pcie = bus->sysdata;
83 struct mobiveil_root_port *rp = &pcie->rp;
84
> 85 if (bus->number > rp->root_bus_nr && rp->ops->read_other_conf)
86 return rp->ops->read_other_conf(bus, devfn, where, size, val);
87
88 return pci_generic_config_read(bus, devfn, where, size, val);
89 }
90 static struct pci_ops mobiveil_pcie_ops = {
91 .map_bus = mobiveil_pcie_map_bus,
92 .read = mobiveil_pcie_config_read,
93 .write = pci_generic_config_write,
94 };
95
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[jolsa-perf:bpf/attach 14/18] kernel/bpf/syscall.c:2508:28: error: too many arguments to function call, expected 2, have 3
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/attach
head: 309b598ba309017a35c6659304b00395d39c0ecb
commit: 76d2bc34edffed0466fa45da762d30bf14425f40 [14/18] bpf: Add BPF_TRAMPOLINE_BATCH_DETACH support
config: arm-randconfig-r012-20201018 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2a75e956e5ce7ea212333a86fe65fc68185cbf48)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/attach
git checkout 76d2bc34edffed0466fa45da762d30bf14425f40
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
>> kernel/bpf/syscall.c:2508:28: error: too many arguments to function call, expected 2, have 3
tr_link->trampoline, NULL));
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
include/asm-generic/bug.h:145:27: note: expanded from macro 'WARN_ON_ONCE'
int __ret_warn_once = !!(condition); \
^~~~~~~~~
include/linux/bpf.h:712:19: note: 'bpf_trampoline_unlink_prog' declared here
static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog,
^
kernel/bpf/syscall.c:2919:10: error: implicit declaration of function 'bpf_trampoline_batch_alloc' [-Werror,-Wimplicit-function-declaration]
batch = bpf_trampoline_batch_alloc(count);
^
kernel/bpf/syscall.c:2919:10: note: did you mean 'bpf_trampoline_batch'?
kernel/bpf/syscall.c:2885:12: note: 'bpf_trampoline_batch' declared here
static int bpf_trampoline_batch(const union bpf_attr *attr, int cmd)
^
kernel/bpf/syscall.c:2919:8: warning: incompatible integer to pointer conversion assigning to 'struct bpf_trampoline_batch *' from 'int' [-Wint-conversion]
batch = bpf_trampoline_batch_alloc(count);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2960:64: error: too many arguments to function call, expected 2, have 3
bpf_trampoline_unlink_prog(link->prog, tr_link->trampoline, batch);
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~
include/linux/bpf.h:712:19: note: 'bpf_trampoline_unlink_prog' declared here
static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog,
^
kernel/bpf/syscall.c:2966:9: error: implicit declaration of function 'register_ftrace_direct_ips' [-Werror,-Wimplicit-function-declaration]
ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
^
kernel/bpf/syscall.c:2966:9: note: did you mean 'register_ftrace_direct'?
include/linux/ftrace.h:300:19: note: 'register_ftrace_direct' declared here
static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
^
>> kernel/bpf/syscall.c:2968:9: error: implicit declaration of function 'unregister_ftrace_direct_ips' [-Werror,-Wimplicit-function-declaration]
ret = unregister_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
^
kernel/bpf/syscall.c:2968:9: note: did you mean 'register_ftrace_direct_ips'?
kernel/bpf/syscall.c:2966:9: note: 'register_ftrace_direct_ips' declared here
ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
^
kernel/bpf/syscall.c:2974:2: error: implicit declaration of function 'bpf_trampoline_batch_free' [-Werror,-Wimplicit-function-declaration]
bpf_trampoline_batch_free(batch);
^
1 warning and 6 errors generated.
vim +2508 kernel/bpf/syscall.c
2501
2502 static void bpf_tracing_link_release(struct bpf_link *link)
2503 {
2504 struct bpf_tracing_link *tr_link =
2505 container_of(link, struct bpf_tracing_link, link);
2506
2507 WARN_ON_ONCE(bpf_trampoline_unlink_prog(link->prog,
> 2508 tr_link->trampoline, NULL));
2509
2510 bpf_trampoline_put(tr_link->trampoline);
2511
2512 /* tgt_prog is NULL if target is a kernel function */
2513 if (tr_link->tgt_prog)
2514 bpf_prog_put(tr_link->tgt_prog);
2515 }
2516
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[jolsa-perf:bpf/attach 13/18] kernel/bpf/syscall.c:2919:10: error: implicit declaration of function 'bpf_trampoline_batch_alloc'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/attach
head: 309b598ba309017a35c6659304b00395d39c0ecb
commit: 74674c0d67be89d274546c46f8715315099c2b9d [13/18] bpf: Add BPF_TRAMPOLINE_BATCH_ATTACH support
config: arm-randconfig-r012-20201018 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2a75e956e5ce7ea212333a86fe65fc68185cbf48)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/attach
git checkout 74674c0d67be89d274546c46f8715315099c2b9d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
>> kernel/bpf/syscall.c:2919:10: error: implicit declaration of function 'bpf_trampoline_batch_alloc' [-Werror,-Wimplicit-function-declaration]
batch = bpf_trampoline_batch_alloc(count);
^
kernel/bpf/syscall.c:2919:10: note: did you mean 'bpf_trampoline_batch'?
kernel/bpf/syscall.c:2885:12: note: 'bpf_trampoline_batch' declared here
static int bpf_trampoline_batch(const union bpf_attr *attr, int cmd)
^
>> kernel/bpf/syscall.c:2919:8: warning: incompatible integer to pointer conversion assigning to 'struct bpf_trampoline_batch *' from 'int' [-Wint-conversion]
batch = bpf_trampoline_batch_alloc(count);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/syscall.c:2946:8: error: implicit declaration of function 'register_ftrace_direct_ips' [-Werror,-Wimplicit-function-declaration]
ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
^
kernel/bpf/syscall.c:2946:8: note: did you mean 'register_ftrace_direct'?
include/linux/ftrace.h:300:19: note: 'register_ftrace_direct' declared here
static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
^
>> kernel/bpf/syscall.c:2951:2: error: implicit declaration of function 'bpf_trampoline_batch_free' [-Werror,-Wimplicit-function-declaration]
bpf_trampoline_batch_free(batch);
^
1 warning and 3 errors generated.
vim +/bpf_trampoline_batch_alloc +2919 kernel/bpf/syscall.c
2884
2885 static int bpf_trampoline_batch(const union bpf_attr *attr, int cmd)
2886 {
2887 void __user *uout = u64_to_user_ptr(attr->trampoline_batch.out);
2888 void __user *uin = u64_to_user_ptr(attr->trampoline_batch.in);
2889 struct bpf_trampoline_batch *batch = NULL;
2890 struct bpf_prog *prog;
2891 int count, ret, i, fd;
2892 u32 *in, *out;
2893
2894 if (CHECK_ATTR(BPF_RAW_TRACEPOINT_OPEN_BATCH))
2895 return -EINVAL;
2896
2897 if (!uin || !uout)
2898 return -EINVAL;
2899
2900 count = attr->trampoline_batch.count;
2901
2902 in = kcalloc(count, sizeof(u32), GFP_KERNEL);
2903 out = kcalloc(count, sizeof(u32), GFP_KERNEL);
2904 if (!in || !out) {
2905 kfree(in);
2906 kfree(out);
2907 return -ENOMEM;
2908 }
2909
2910 ret = copy_from_user(in, uin, count * sizeof(u32));
2911 if (ret)
2912 goto out_clean;
2913
2914 /* test read out array */
2915 ret = copy_to_user(uout, out, count * sizeof(u32));
2916 if (ret)
2917 goto out_clean;
2918
> 2919 batch = bpf_trampoline_batch_alloc(count);
2920 if (!batch)
2921 goto out_clean;
2922
2923 for (i = 0; i < count; i++) {
2924 if (cmd == BPF_TRAMPOLINE_BATCH_ATTACH) {
2925 prog = bpf_prog_get(in[i]);
2926 if (IS_ERR(prog)) {
2927 ret = PTR_ERR(prog);
2928 goto out_clean;
2929 }
2930
2931 ret = -EINVAL;
2932 if (prog->type != BPF_PROG_TYPE_TRACING)
2933 goto out_clean;
2934 if (prog->type == BPF_PROG_TYPE_TRACING &&
2935 prog->expected_attach_type == BPF_TRACE_RAW_TP)
2936 goto out_clean;
2937
2938 fd = bpf_tracing_prog_attach(prog, 0, 0, batch);
2939 if (fd < 0)
2940 goto out_clean;
2941
2942 out[i] = fd;
2943 }
2944 }
2945
> 2946 ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
2947 if (!ret)
2948 WARN_ON_ONCE(copy_to_user(uout, out, count * sizeof(u32)));
2949
2950 out_clean:
> 2951 bpf_trampoline_batch_free(batch);
2952 kfree(in);
2953 kfree(out);
2954 return ret;
2955 }
2956
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[jolsa-perf:bpf/attach 13/18] kernel/bpf/syscall.c:2919:10: error: implicit declaration of function 'bpf_trampoline_batch_alloc'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/attach
head: 309b598ba309017a35c6659304b00395d39c0ecb
commit: 74674c0d67be89d274546c46f8715315099c2b9d [13/18] bpf: Add BPF_TRAMPOLINE_BATCH_ATTACH support
config: x86_64-randconfig-p001-20201018 (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/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/attach
git checkout 74674c0d67be89d274546c46f8715315099c2b9d
# 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 error/warnings (new ones prefixed by >>):
kernel/bpf/syscall.c: In function 'bpf_trampoline_batch':
>> kernel/bpf/syscall.c:2919:10: error: implicit declaration of function 'bpf_trampoline_batch_alloc'; did you mean 'bpf_trampoline_batch'? [-Werror=implicit-function-declaration]
2919 | batch = bpf_trampoline_batch_alloc(count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_trampoline_batch
>> kernel/bpf/syscall.c:2919:8: warning: assignment to 'struct bpf_trampoline_batch *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2919 | batch = bpf_trampoline_batch_alloc(count);
| ^
>> kernel/bpf/syscall.c:2946:8: error: implicit declaration of function 'register_ftrace_direct_ips'; did you mean 'register_ftrace_direct'? [-Werror=implicit-function-declaration]
2946 | ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| register_ftrace_direct
>> kernel/bpf/syscall.c:2951:2: error: implicit declaration of function 'bpf_trampoline_batch_free'; did you mean 'bpf_trampoline_batch'? [-Werror=implicit-function-declaration]
2951 | bpf_trampoline_batch_free(batch);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_trampoline_batch
cc1: some warnings being treated as errors
vim +2919 kernel/bpf/syscall.c
2884
2885 static int bpf_trampoline_batch(const union bpf_attr *attr, int cmd)
2886 {
2887 void __user *uout = u64_to_user_ptr(attr->trampoline_batch.out);
2888 void __user *uin = u64_to_user_ptr(attr->trampoline_batch.in);
2889 struct bpf_trampoline_batch *batch = NULL;
2890 struct bpf_prog *prog;
2891 int count, ret, i, fd;
2892 u32 *in, *out;
2893
2894 if (CHECK_ATTR(BPF_RAW_TRACEPOINT_OPEN_BATCH))
2895 return -EINVAL;
2896
2897 if (!uin || !uout)
2898 return -EINVAL;
2899
2900 count = attr->trampoline_batch.count;
2901
2902 in = kcalloc(count, sizeof(u32), GFP_KERNEL);
2903 out = kcalloc(count, sizeof(u32), GFP_KERNEL);
2904 if (!in || !out) {
2905 kfree(in);
2906 kfree(out);
2907 return -ENOMEM;
2908 }
2909
2910 ret = copy_from_user(in, uin, count * sizeof(u32));
2911 if (ret)
2912 goto out_clean;
2913
2914 /* test read out array */
2915 ret = copy_to_user(uout, out, count * sizeof(u32));
2916 if (ret)
2917 goto out_clean;
2918
> 2919 batch = bpf_trampoline_batch_alloc(count);
2920 if (!batch)
2921 goto out_clean;
2922
2923 for (i = 0; i < count; i++) {
2924 if (cmd == BPF_TRAMPOLINE_BATCH_ATTACH) {
2925 prog = bpf_prog_get(in[i]);
2926 if (IS_ERR(prog)) {
2927 ret = PTR_ERR(prog);
2928 goto out_clean;
2929 }
2930
2931 ret = -EINVAL;
2932 if (prog->type != BPF_PROG_TYPE_TRACING)
2933 goto out_clean;
2934 if (prog->type == BPF_PROG_TYPE_TRACING &&
2935 prog->expected_attach_type == BPF_TRACE_RAW_TP)
2936 goto out_clean;
2937
2938 fd = bpf_tracing_prog_attach(prog, 0, 0, batch);
2939 if (fd < 0)
2940 goto out_clean;
2941
2942 out[i] = fd;
2943 }
2944 }
2945
> 2946 ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
2947 if (!ret)
2948 WARN_ON_ONCE(copy_to_user(uout, out, count * sizeof(u32)));
2949
2950 out_clean:
> 2951 bpf_trampoline_batch_free(batch);
2952 kfree(in);
2953 kfree(out);
2954 return ret;
2955 }
2956
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months