Re: [PATCH] ACPI / tables: Fix a NULL pointer dereference in acpi_table_initrd_override()
by kernel test robot
Hi Zhou,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on linux/master linus/master v5.17-rc1 next-20220124]
[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/Zhou-Qingyang/ACPI-tables-Fix-a-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-r011-20220124 (https://download.01.org/0day-ci/archive/20220125/202201251123.ScbhjE9a-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2e58a18910867ba6795066e044293e6daf89edf5)
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
# https://github.com/0day-ci/linux/commit/924d4e212d2041e2af120ade3599fdc00...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zhou-Qingyang/ACPI-tables-Fix-a-NULL-pointer-dereference-in-acpi_table_initrd_override/20220125-004517
git checkout 924d4e212d2041e2af120ade3599fdc00e0b12fd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/
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/acpi/tables.c:710:4: error: void function 'acpi_table_initrd_scan' should not return a value [-Wreturn-type]
return AE_NO_MEMORY;
^ ~~~~~~~~~~~~
1 error generated.
vim +/acpi_table_initrd_scan +710 drivers/acpi/tables.c
695
696 static void __init acpi_table_initrd_scan(void)
697 {
698 int table_offset = 0;
699 int table_index = 0;
700 u32 table_length;
701 struct acpi_table_header *table;
702
703 if (!acpi_tables_addr)
704 return;
705
706 while (table_offset + ACPI_HEADER_SIZE <= all_tables_size) {
707 table = acpi_os_map_memory(acpi_tables_addr + table_offset,
708 ACPI_HEADER_SIZE);
709 if (!table) {
> 710 return AE_NO_MEMORY;
711 }
712
713 if (table_offset + table->length > all_tables_size) {
714 acpi_os_unmap_memory(table, ACPI_HEADER_SIZE);
715 WARN_ON(1);
716 return;
717 }
718
719 table_length = table->length;
720
721 /* Skip RSDT/XSDT which should only be used for override */
722 if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_RSDT) ||
723 ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_XSDT)) {
724 acpi_os_unmap_memory(table, ACPI_HEADER_SIZE);
725 goto next_table;
726 }
727 /*
728 * Mark the table to avoid being used in
729 * acpi_table_initrd_override(). Though this is not possible
730 * because override is disabled in acpi_install_physical_table().
731 */
732 if (test_and_set_bit(table_index, acpi_initrd_installed)) {
733 acpi_os_unmap_memory(table, ACPI_HEADER_SIZE);
734 goto next_table;
735 }
736
737 pr_info("Table Upgrade: install [%4.4s-%6.6s-%8.8s]\n",
738 table->signature, table->oem_id,
739 table->oem_table_id);
740 acpi_os_unmap_memory(table, ACPI_HEADER_SIZE);
741 acpi_install_physical_table(acpi_tables_addr + table_offset);
742 next_table:
743 table_offset += table_length;
744 table_index++;
745 }
746 }
747 #else
748 static acpi_status
749 acpi_table_initrd_override(struct acpi_table_header *existing_table,
750 acpi_physical_address *address,
751 u32 *table_length)
752 {
753 *table_length = 0;
754 *address = 0;
755 return AE_OK;
756 }
757
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
kernel/sched/psi.c:1193:6: warning: no previous prototype for function 'psi_trigger_destroy'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: a06247c6804f1a7c86a2e5398a4c1f1db1471848 psi: Fix uaf issue when psi trigger is destroyed while being polled
date: 7 days ago
config: s390-randconfig-r044-20220124 (https://download.01.org/0day-ci/archive/20220125/202201251121.19DMWalx-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2e58a18910867ba6795066e044293e6daf89edf5)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# 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 a06247c6804f1a7c86a2e5398a4c1f1db1471848
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash kernel/sched/
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 >>):
In file included from kernel/sched/psi.c:153:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:22:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from kernel/sched/psi.c:153:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:22:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from kernel/sched/psi.c:153:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:22:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
kernel/sched/psi.c:1123:21: warning: no previous prototype for function 'psi_trigger_create' [-Wmissing-prototypes]
struct psi_trigger *psi_trigger_create(struct psi_group *group,
^
kernel/sched/psi.c:1123:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct psi_trigger *psi_trigger_create(struct psi_group *group,
^
static
>> kernel/sched/psi.c:1193:6: warning: no previous prototype for function 'psi_trigger_destroy' [-Wmissing-prototypes]
void psi_trigger_destroy(struct psi_trigger *t)
^
kernel/sched/psi.c:1193:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void psi_trigger_destroy(struct psi_trigger *t)
^
static
kernel/sched/psi.c:1260:10: warning: no previous prototype for function 'psi_trigger_poll' [-Wmissing-prototypes]
__poll_t psi_trigger_poll(void **trigger_ptr,
^
kernel/sched/psi.c:1260:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
__poll_t psi_trigger_poll(void **trigger_ptr,
^
static
15 warnings generated.
vim +/psi_trigger_destroy +1193 kernel/sched/psi.c
1192
> 1193 void psi_trigger_destroy(struct psi_trigger *t)
1194 {
1195 struct psi_group *group;
1196 struct task_struct *task_to_destroy = NULL;
1197
1198 /*
1199 * We do not check psi_disabled since it might have been disabled after
1200 * the trigger got created.
1201 */
1202 if (!t)
1203 return;
1204
1205 group = t->group;
1206 /*
1207 * Wakeup waiters to stop polling. Can happen if cgroup is deleted
1208 * from under a polling process.
1209 */
1210 wake_up_interruptible(&t->event_wait);
1211
1212 mutex_lock(&group->trigger_lock);
1213
1214 if (!list_empty(&t->node)) {
1215 struct psi_trigger *tmp;
1216 u64 period = ULLONG_MAX;
1217
1218 list_del(&t->node);
1219 group->nr_triggers[t->state]--;
1220 if (!group->nr_triggers[t->state])
1221 group->poll_states &= ~(1 << t->state);
1222 /* reset min update period for the remaining triggers */
1223 list_for_each_entry(tmp, &group->triggers, node)
1224 period = min(period, div_u64(tmp->win.size,
1225 UPDATES_PER_WINDOW));
1226 group->poll_min_period = period;
1227 /* Destroy poll_task when the last trigger is destroyed */
1228 if (group->poll_states == 0) {
1229 group->polling_until = 0;
1230 task_to_destroy = rcu_dereference_protected(
1231 group->poll_task,
1232 lockdep_is_held(&group->trigger_lock));
1233 rcu_assign_pointer(group->poll_task, NULL);
1234 del_timer(&group->poll_timer);
1235 }
1236 }
1237
1238 mutex_unlock(&group->trigger_lock);
1239
1240 /*
1241 * Wait for psi_schedule_poll_work RCU to complete its read-side
1242 * critical section before destroying the trigger and optionally the
1243 * poll_task.
1244 */
1245 synchronize_rcu();
1246 /*
1247 * Stop kthread 'psimon' after releasing trigger_lock to prevent a
1248 * deadlock while waiting for psi_poll_work to acquire trigger_lock
1249 */
1250 if (task_to_destroy) {
1251 /*
1252 * After the RCU grace period has expired, the worker
1253 * can no longer be found through group->poll_task.
1254 */
1255 kthread_stop(task_to_destroy);
1256 }
1257 kfree(t);
1258 }
1259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[plbossart-sound:fix/sof-es8336-quirk 23/24] sound/hda/intel-dsp-config.c:38:41: warning: unused variable 'essx_83x6'
by kernel test robot
tree: https://github.com/plbossart/sound fix/sof-es8336-quirk
head: ddae1a7bcf5e03d67c07a22f0330cc98384ff548
commit: 7ce5d0c5916e377fdec5063d6f411900817f268f [23/24] ALSA: intel-dsp-config: add more ACPI HIDs for ES83x6 devices
config: s390-randconfig-r012-20220124 (https://download.01.org/0day-ci/archive/20220125/202201251020.Z0bby1gQ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 997e128e2a78f5a5434fc75997441ae1ee76f8a4)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/plbossart/sound/commit/7ce5d0c5916e377fdec5063d6f41190...
git remote add plbossart-sound https://github.com/plbossart/sound
git fetch --no-tags plbossart-sound fix/sof-es8336-quirk
git checkout 7ce5d0c5916e377fdec5063d6f411900817f268f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash sound/hda/
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 >>):
In file included from sound/hda/intel-dsp-config.c:8:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from sound/hda/intel-dsp-config.c:8:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from sound/hda/intel-dsp-config.c:8:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> sound/hda/intel-dsp-config.c:38:41: warning: unused variable 'essx_83x6' [-Wunused-const-variable]
static const struct snd_soc_acpi_codecs essx_83x6 = {
^
13 warnings generated.
vim +/essx_83x6 +38 sound/hda/intel-dsp-config.c
37
> 38 static const struct snd_soc_acpi_codecs essx_83x6 = {
39 .num_codecs = 3,
40 .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
41 };
42
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[mingo-tip:sched/headers 2281/2384] drivers/media/test-drivers/vidtv/vidtv_channel.c:57:47: error: implicit declaration of function 'cpu_to_be32'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: be7a8ba8c0f8e33e2dec022431f3d5b662dc5b9c [2281/2384] headers/deps: hashtable: Optimize <linux/hashtable_types.h> dependencies
config: mips-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220125/202201251017.djjOySEy-lk...)
compiler: mips64-linux-gcc (GCC) 11.2.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
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout be7a8ba8c0f8e33e2dec022431f3d5b662dc5b9c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/media/ drivers/usb/
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/media/test-drivers/vidtv/vidtv_channel.c: In function 'vidtv_channel_s302m_init':
>> drivers/media/test-drivers/vidtv/vidtv_channel.c:57:47: error: implicit declaration of function 'cpu_to_be32' [-Werror=implicit-function-declaration]
57 | const __be32 s302m_fid = cpu_to_be32(VIDTV_S302M_FORMAT_IDENTIFIER);
| ^~~~~~~~~~~
drivers/media/test-drivers/vidtv/vidtv_channel.c: In function 'vidtv_channel_eit_event_cat_into_new':
>> drivers/media/test-drivers/vidtv/vidtv_channel.c:182:36: error: implicit declaration of function 'be16_to_cpu' [-Werror=implicit-function-declaration]
182 | event_id = be16_to_cpu(curr->event_id);
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/cpu_to_be32 +57 drivers/media/test-drivers/vidtv/vidtv_channel.c
2f217729612c30 Mauro Carvalho Chehab 2020-09-20 50
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 51 /*
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 52 * init an audio only channel with a s302m encoder
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 53 */
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 54 struct vidtv_channel
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 55 *vidtv_channel_s302m_init(struct vidtv_channel *head, u16 transport_stream_id)
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 56 {
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 @57 const __be32 s302m_fid = cpu_to_be32(VIDTV_S302M_FORMAT_IDENTIFIER);
b9e09e06e32e61 Mauro Carvalho Chehab 2020-11-23 58 char *event_text = ENCODING_ISO8859_15 "Bagatelle No. 25 in A minor for solo piano, also known as F\xfcr Elise, composed by Ludwig van Beethoven";
b9e09e06e32e61 Mauro Carvalho Chehab 2020-11-23 59 char *event_name = ENCODING_ISO8859_15 "Ludwig van Beethoven: F\xfcr Elise";
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 60 struct vidtv_s302m_encoder_init_args encoder_args = {};
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 61 char *iso_language_code = ENCODING_ISO8859_15 "eng";
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 62 char *provider = ENCODING_ISO8859_15 "LinuxTV.org";
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 63 char *name = ENCODING_ISO8859_15 "Beethoven";
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 64 const u16 s302m_es_pid = 0x111; /* packet id for the ES */
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 65 const u16 s302m_program_pid = 0x101; /* packet id for PMT*/
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 66 const u16 s302m_service_id = 0x880;
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 67 const u16 s302m_program_num = 0x880;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 68 const u16 s302m_beethoven_event_id = 1;
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 69 struct vidtv_channel *s302m;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 70
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 71 s302m = kzalloc(sizeof(*s302m), GFP_KERNEL);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 72 if (!s302m)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 73 return NULL;
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 74
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 75 s302m->name = kstrdup(name, GFP_KERNEL);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 76 if (!s302m->name)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 77 goto free_s302m;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 78
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 79 s302m->service = vidtv_psi_sdt_service_init(NULL, s302m_service_id, false, true);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 80 if (!s302m->service)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 81 goto free_name;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 82
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 83 s302m->service->descriptor = (struct vidtv_psi_desc *)
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 84 vidtv_psi_service_desc_init(NULL,
11f4933f7bc955 Mauro Carvalho Chehab 2020-11-23 85 DIGITAL_RADIO_SOUND_SERVICE,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 86 name,
2f217729612c30 Mauro Carvalho Chehab 2020-09-20 87 provider);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 88 if (!s302m->service->descriptor)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 89 goto free_service;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 90
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 91 s302m->transport_stream_id = transport_stream_id;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 92
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 93 s302m->program = vidtv_psi_pat_program_init(NULL,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 94 s302m_service_id,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 95 s302m_program_pid);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 96 if (!s302m->program)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 97 goto free_service;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 98
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 99 s302m->program_num = s302m_program_num;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 100
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 101 s302m->streams = vidtv_psi_pmt_stream_init(NULL,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 102 STREAM_PRIVATE_DATA,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 103 s302m_es_pid);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 104 if (!s302m->streams)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 105 goto free_program;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 106
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 107 s302m->streams->descriptor = (struct vidtv_psi_desc *)
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 108 vidtv_psi_registration_desc_init(NULL,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 109 s302m_fid,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 110 NULL,
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 111 0);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 112 if (!s302m->streams->descriptor)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 113 goto free_streams;
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 114
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 115 encoder_args.es_pid = s302m_es_pid;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 116
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 117 s302m->encoders = vidtv_s302m_encoder_init(encoder_args);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 118 if (!s302m->encoders)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 119 goto free_streams;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 120
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 121 s302m->events = vidtv_psi_eit_event_init(NULL, s302m_beethoven_event_id);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 122 if (!s302m->events)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 123 goto free_encoders;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 124 s302m->events->descriptor = (struct vidtv_psi_desc *)
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 125 vidtv_psi_short_event_desc_init(NULL,
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 126 iso_language_code,
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 127 event_name,
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 128 event_text);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 129 if (!s302m->events->descriptor)
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 130 goto free_events;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 131
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 132 if (head) {
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 133 while (head->next)
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 134 head = head->next;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 135
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 136 head->next = s302m;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 137 }
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 138
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 139 return s302m;
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 140
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 141 free_events:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 142 vidtv_psi_eit_event_destroy(s302m->events);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 143 free_encoders:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 144 vidtv_s302m_encoder_destroy(s302m->encoders);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 145 free_streams:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 146 vidtv_psi_pmt_stream_destroy(s302m->streams);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 147 free_program:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 148 vidtv_psi_pat_program_destroy(s302m->program);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 149 free_service:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 150 vidtv_psi_sdt_service_destroy(s302m->service);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 151 free_name:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 152 kfree(s302m->name);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 153 free_s302m:
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 154 kfree(s302m);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 155
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 156 return NULL;
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 157 }
f90cf6079bf679 Daniel W. S. Almeida 2020-08-21 158
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 159 static struct vidtv_psi_table_eit_event
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 160 *vidtv_channel_eit_event_cat_into_new(struct vidtv_mux *m)
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 161 {
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 162 /* Concatenate the events */
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 163 const struct vidtv_channel *cur_chnl = m->channels;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 164 struct vidtv_psi_table_eit_event *curr = NULL;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 165 struct vidtv_psi_table_eit_event *head = NULL;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 166 struct vidtv_psi_table_eit_event *tail = NULL;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 167 struct vidtv_psi_desc *desc = NULL;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 168 u16 event_id;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 169
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 170 if (!cur_chnl)
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 171 return NULL;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 172
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 173 while (cur_chnl) {
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 174 curr = cur_chnl->events;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 175
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 176 if (!curr)
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 177 dev_warn_ratelimited(m->dev,
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 178 "No events found for channel %s\n",
a8bd461ca3b324 Mauro Carvalho Chehab 2020-09-22 179 cur_chnl->name);
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 180
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 181 while (curr) {
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 @182 event_id = be16_to_cpu(curr->event_id);
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 183 tail = vidtv_psi_eit_event_init(tail, event_id);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 184 if (!tail) {
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 185 vidtv_psi_eit_event_destroy(head);
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 186 return NULL;
3be8037960bccd Mauro Carvalho Chehab 2020-09-21 187 }
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 188
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 189 desc = vidtv_psi_desc_clone(curr->descriptor);
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 190 vidtv_psi_desc_assign(&tail->descriptor, desc);
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 191
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 192 if (!head)
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 193 head = tail;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 194
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 195 curr = curr->next;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 196 }
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 197
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 198 cur_chnl = cur_chnl->next;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 199 }
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 200
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 201 return head;
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 202 }
7a7899f6f58e32 Daniel W. S. Almeida 2020-10-31 203
:::::: The code at line 57 was first introduced by commit
:::::: f90cf6079bf67988f8b1ad1ade70fc89d0080905 media: vidtv: add a bridge driver
:::::: TO: Daniel W. S. Almeida <dwlsalmeida(a)gmail.com>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
Re: [RFC PATCH v2 4/5] vfio/pci: Invalidate mmaps and block the access in D3hot power state
by kernel test robot
Hi Abhishek,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on awilliam-vfio/next]
[also build test WARNING on v5.17-rc1 next-20220124]
[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/Abhishek-Sahu/vfio-pci-Enable-ru...
base: https://github.com/awilliam/linux-vfio.git next
config: x86_64-randconfig-s022-20220124 (https://download.01.org/0day-ci/archive/20220125/202201251024.DoqLcJkP-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/84afeb78e3ae55e0f1c1f84d42e28c605...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Abhishek-Sahu/vfio-pci-Enable-runtime-power-management-support/20220125-021827
git checkout 84afeb78e3ae55e0f1c1f84d42e28c60585fdc48
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/vfio/pci/ mm/kasan/
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/vfio/pci/vfio_pci_rdwr.c:64:1: sparse: sparse: restricted pci_power_t degrades to integer
>> drivers/vfio/pci/vfio_pci_rdwr.c:64:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:65:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:65:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:66:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:66:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:95:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:95:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:96:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:96:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:97:1: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_rdwr.c:97:1: sparse: sparse: restricted pci_power_t degrades to integer
vim +64 drivers/vfio/pci/vfio_pci_rdwr.c
bc93b9ae0151ae Alex Williamson 2020-08-17 63
bc93b9ae0151ae Alex Williamson 2020-08-17 @64 VFIO_IOWRITE(8)
bc93b9ae0151ae Alex Williamson 2020-08-17 65 VFIO_IOWRITE(16)
bc93b9ae0151ae Alex Williamson 2020-08-17 66 VFIO_IOWRITE(32)
bc93b9ae0151ae Alex Williamson 2020-08-17 67 #ifdef iowrite64
bc93b9ae0151ae Alex Williamson 2020-08-17 68 VFIO_IOWRITE(64)
bc93b9ae0151ae Alex Williamson 2020-08-17 69 #endif
bc93b9ae0151ae Alex Williamson 2020-08-17 70
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
Re: [PATCH] RAS: Report ARM processor information to userspace
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on rafael-pm/linux-next linus/master v5.17-rc1 next-20220124]
[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/lostway-zju-edu-cn/RAS-Report-AR...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
config: x86_64-randconfig-m001-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250944.dyy7niOd-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 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/ras/ras.c:51 log_arm_hw_error() warn: unsigned 'vsei_len' is never less than zero.
vim +/vsei_len +51 drivers/ras/ras.c
23
24 void log_arm_hw_error(struct cper_sec_proc_arm *err, const u8 sev)
25 {
26 u32 pei_len;
27 u32 ctx_len = 0;
28 u32 vsei_len;
29 u8 *pei_err;
30 u8 *ctx_err;
31 u8 *ven_err_data;
32 struct cper_arm_err_info *err_info;
33 struct cper_arm_ctx_info *ctx_info;
34 int n, sz;
35 int cpu;
36
37 pei_len = sizeof(struct cper_arm_err_info) * err->err_info_num;
38 pei_err = (u8 *)err + sizeof(struct cper_sec_proc_arm);
39
40 err_info = (struct cper_arm_err_info *)(err + 1);
41 ctx_info = (struct cper_arm_ctx_info *)(err_info + err->err_info_num);
42 ctx_err = (u8 *)ctx_info;
43 for (n = 0; n < err->context_info_num; n++) {
44 sz = sizeof(struct cper_arm_ctx_info) + ctx_info->size;
45 ctx_info = (struct cper_arm_ctx_info *)((long)ctx_info + sz);
46 ctx_len += sz;
47 }
48
49 vsei_len = err->section_length - (sizeof(struct cper_sec_proc_arm) +
50 pei_len + ctx_len);
> 51 if (vsei_len < 0) {
52 pr_warn(FW_BUG
53 "section length: %d\n", err->section_length);
54 pr_warn(FW_BUG
55 "section length is too small\n");
56 pr_warn(FW_BUG
57 "firmware-generated error record is incorrect\n");
58 vsei_len = 0;
59 }
60 ven_err_data = (u8 *)ctx_info;
61
62 cpu = GET_LOGICAL_INDEX(err->mpidr);
63 /* when return value is invalid, set cpu index to -1 */
64 if (cpu < 0)
65 cpu = -1;
66
67 trace_arm_event(err, pei_err, pei_len, ctx_err, ctx_len,
68 ven_err_data, vsei_len, sev, cpu);
69 }
70
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
kernel/sched/psi.c:1193:6: warning: no previous prototype for 'psi_trigger_destroy'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: a06247c6804f1a7c86a2e5398a4c1f1db1471848 psi: Fix uaf issue when psi trigger is destroyed while being polled
date: 7 days ago
config: sh-randconfig-r012-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250818.178Aw4sD-lk...)
compiler: sh4-linux-gcc (GCC) 11.2.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
# 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 a06247c6804f1a7c86a2e5398a4c1f1db1471848
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash kernel/sched/
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 >>):
kernel/sched/psi.c:1123:21: warning: no previous prototype for 'psi_trigger_create' [-Wmissing-prototypes]
1123 | struct psi_trigger *psi_trigger_create(struct psi_group *group,
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/psi.c:1193:6: warning: no previous prototype for 'psi_trigger_destroy' [-Wmissing-prototypes]
1193 | void psi_trigger_destroy(struct psi_trigger *t)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/psi.c:1260:10: warning: no previous prototype for 'psi_trigger_poll' [-Wmissing-prototypes]
1260 | __poll_t psi_trigger_poll(void **trigger_ptr,
| ^~~~~~~~~~~~~~~~
vim +/psi_trigger_destroy +1193 kernel/sched/psi.c
1192
> 1193 void psi_trigger_destroy(struct psi_trigger *t)
1194 {
1195 struct psi_group *group;
1196 struct task_struct *task_to_destroy = NULL;
1197
1198 /*
1199 * We do not check psi_disabled since it might have been disabled after
1200 * the trigger got created.
1201 */
1202 if (!t)
1203 return;
1204
1205 group = t->group;
1206 /*
1207 * Wakeup waiters to stop polling. Can happen if cgroup is deleted
1208 * from under a polling process.
1209 */
1210 wake_up_interruptible(&t->event_wait);
1211
1212 mutex_lock(&group->trigger_lock);
1213
1214 if (!list_empty(&t->node)) {
1215 struct psi_trigger *tmp;
1216 u64 period = ULLONG_MAX;
1217
1218 list_del(&t->node);
1219 group->nr_triggers[t->state]--;
1220 if (!group->nr_triggers[t->state])
1221 group->poll_states &= ~(1 << t->state);
1222 /* reset min update period for the remaining triggers */
1223 list_for_each_entry(tmp, &group->triggers, node)
1224 period = min(period, div_u64(tmp->win.size,
1225 UPDATES_PER_WINDOW));
1226 group->poll_min_period = period;
1227 /* Destroy poll_task when the last trigger is destroyed */
1228 if (group->poll_states == 0) {
1229 group->polling_until = 0;
1230 task_to_destroy = rcu_dereference_protected(
1231 group->poll_task,
1232 lockdep_is_held(&group->trigger_lock));
1233 rcu_assign_pointer(group->poll_task, NULL);
1234 del_timer(&group->poll_timer);
1235 }
1236 }
1237
1238 mutex_unlock(&group->trigger_lock);
1239
1240 /*
1241 * Wait for psi_schedule_poll_work RCU to complete its read-side
1242 * critical section before destroying the trigger and optionally the
1243 * poll_task.
1244 */
1245 synchronize_rcu();
1246 /*
1247 * Stop kthread 'psimon' after releasing trigger_lock to prevent a
1248 * deadlock while waiting for psi_poll_work to acquire trigger_lock
1249 */
1250 if (task_to_destroy) {
1251 /*
1252 * After the RCU grace period has expired, the worker
1253 * can no longer be found through group->poll_task.
1254 */
1255 kthread_stop(task_to_destroy);
1256 }
1257 kfree(t);
1258 }
1259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/rc_calc_fpu.c:81:40: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: d738db6883df3e3c513f9e777c842262693f951b drm/amd/display: move FPU associated DSC code to DML folder
date: 3 months ago
config: i386-randconfig-s002-20211122 (https://download.01.org/0day-ci/archive/20220125/202201250805.QTVOfpYt-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-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 d738db6883df3e3c513f9e777c842262693f951b
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
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/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/rc_calc_fpu.c: note: in included file:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:28:18: sparse: sparse: symbol 'qp_table_422_10bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:61:18: sparse: sparse: symbol 'qp_table_444_8bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:102:18: sparse: sparse: symbol 'qp_table_420_12bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:135:18: sparse: sparse: symbol 'qp_table_444_10bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:188:18: sparse: sparse: symbol 'qp_table_420_8bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:209:18: sparse: sparse: symbol 'qp_table_444_8bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:250:18: sparse: sparse: symbol 'qp_table_444_12bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:315:18: sparse: sparse: symbol 'qp_table_420_12bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:348:18: sparse: sparse: symbol 'qp_table_422_12bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:389:18: sparse: sparse: symbol 'qp_table_422_12bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:430:18: sparse: sparse: symbol 'qp_table_444_12bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:495:18: sparse: sparse: symbol 'qp_table_420_8bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:516:18: sparse: sparse: symbol 'qp_table_422_8bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:541:18: sparse: sparse: symbol 'qp_table_422_10bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:574:16: sparse: sparse: symbol 'qp_table_420_10bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:601:18: sparse: sparse: symbol 'qp_table_420_10bpc_min' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:628:18: sparse: sparse: symbol 'qp_table_444_10bpc_max' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:681:18: sparse: sparse: symbol 'qp_table_422_8bpc_max' was not declared. Should it be static?
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/rc_calc_fpu.c:81:40: sparse: sparse: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/rc_calc_fpu.c:106:22: sparse: sparse: Using plain integer as NULL pointer
vim +81 drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/rc_calc_fpu.c
73
74 static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc,
75 enum max_min max_min, float bpp)
76 {
77 int mode = MODE_SELECT(444, 422, 420);
78 int sel = table_hash(mode, bpc, max_min);
79 int table_size = 0;
80 int index;
> 81 const struct qp_entry *table = 0L;
82
83 // alias enum
84 enum { min = DAL_MM_MIN, max = DAL_MM_MAX };
85 switch (sel) {
86 TABLE_CASE(444, 8, max);
87 TABLE_CASE(444, 8, min);
88 TABLE_CASE(444, 10, max);
89 TABLE_CASE(444, 10, min);
90 TABLE_CASE(444, 12, max);
91 TABLE_CASE(444, 12, min);
92 TABLE_CASE(422, 8, max);
93 TABLE_CASE(422, 8, min);
94 TABLE_CASE(422, 10, max);
95 TABLE_CASE(422, 10, min);
96 TABLE_CASE(422, 12, max);
97 TABLE_CASE(422, 12, min);
98 TABLE_CASE(420, 8, max);
99 TABLE_CASE(420, 8, min);
100 TABLE_CASE(420, 10, max);
101 TABLE_CASE(420, 10, min);
102 TABLE_CASE(420, 12, max);
103 TABLE_CASE(420, 12, min);
104 }
105
106 if (table == 0)
107 return;
108
109 index = (bpp - table[0].bpp) * 2;
110
111 /* requested size is bigger than the table */
112 if (index >= table_size) {
113 dm_error("ERROR: Requested rc_calc to find a bpp entry that exceeds the table size\n");
114 return;
115 }
116
117 memcpy(qps, table[index].qps, sizeof(qp_set));
118 }
119
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks