* [tiwai-sound:for-next 23/38] sound/core/pcm_compat.c:423 snd_pcm_ioctl_sync_ptr_x32() error: uninitialized symbol 'sflags'.
@ 2025-07-01 2:56 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-01 2:56 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: alsa-devel@alsa-project.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Takashi Iwai <tiwai@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head: 66b338d006d75ab52b16bf05a7f4f451043199bf
commit: a9b49bf8ad5905ebd999da345dcff3b9fad43877 [23/38] ALSA: pcm: Convert SNDRV_PCM_IOCTL_SYNC_PTR to user_access_begin/user_access_end()
:::::: branch date: 15 hours ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-161-20250630 (https://download.01.org/0day-ci/archive/20250701/202507011031.wWzbWNZP-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202507011031.wWzbWNZP-lkp@intel.com/
New smatch warnings:
sound/core/pcm_compat.c:423 snd_pcm_ioctl_sync_ptr_x32() error: uninitialized symbol 'sflags'.
Old smatch warnings:
sound/core/pcm_native.c:3210 snd_pcm_ioctl_sync_ptr_compat() error: uninitialized symbol 'sflags'.
sound/core/pcm_compat.c:21 snd_pcm_ioctl_delay_compat() error: uninitialized symbol 'delay'.
vim +/sflags +423 sound/core/pcm_compat.c
513ace79b657e2 Takashi Iwai 2016-02-28 405
513ace79b657e2 Takashi Iwai 2016-02-28 406 static int snd_pcm_ioctl_sync_ptr_x32(struct snd_pcm_substream *substream,
513ace79b657e2 Takashi Iwai 2016-02-28 407 struct snd_pcm_sync_ptr_x32 __user *src)
513ace79b657e2 Takashi Iwai 2016-02-28 408 {
513ace79b657e2 Takashi Iwai 2016-02-28 409 struct snd_pcm_runtime *runtime = substream->runtime;
513ace79b657e2 Takashi Iwai 2016-02-28 410 volatile struct snd_pcm_mmap_status *status;
513ace79b657e2 Takashi Iwai 2016-02-28 411 volatile struct snd_pcm_mmap_control *control;
513ace79b657e2 Takashi Iwai 2016-02-28 412 u32 sflags;
513ace79b657e2 Takashi Iwai 2016-02-28 413 struct snd_pcm_mmap_control scontrol;
513ace79b657e2 Takashi Iwai 2016-02-28 414 struct snd_pcm_mmap_status sstatus;
513ace79b657e2 Takashi Iwai 2016-02-28 415 snd_pcm_uframes_t boundary;
513ace79b657e2 Takashi Iwai 2016-02-28 416 int err;
513ace79b657e2 Takashi Iwai 2016-02-28 417
513ace79b657e2 Takashi Iwai 2016-02-28 418 if (snd_BUG_ON(!runtime))
513ace79b657e2 Takashi Iwai 2016-02-28 419 return -EINVAL;
513ace79b657e2 Takashi Iwai 2016-02-28 420
2acd83beb4d3fd Christophe Leroy 2025-06-14 421 if (snd_pcm_sync_ptr_get_user(sflags, scontrol, src))
513ace79b657e2 Takashi Iwai 2016-02-28 422 return -EFAULT;
513ace79b657e2 Takashi Iwai 2016-02-28 @423 if (sflags & SNDRV_PCM_SYNC_PTR_HWSYNC) {
513ace79b657e2 Takashi Iwai 2016-02-28 424 err = snd_pcm_hwsync(substream);
513ace79b657e2 Takashi Iwai 2016-02-28 425 if (err < 0)
513ace79b657e2 Takashi Iwai 2016-02-28 426 return err;
513ace79b657e2 Takashi Iwai 2016-02-28 427 }
513ace79b657e2 Takashi Iwai 2016-02-28 428 status = runtime->status;
513ace79b657e2 Takashi Iwai 2016-02-28 429 control = runtime->control;
513ace79b657e2 Takashi Iwai 2016-02-28 430 boundary = recalculate_boundary(runtime);
513ace79b657e2 Takashi Iwai 2016-02-28 431 if (!boundary)
513ace79b657e2 Takashi Iwai 2016-02-28 432 boundary = 0x7fffffff;
650224fe8d5f6d Takashi Iwai 2024-02-27 433 scoped_guard(pcm_stream_lock_irq, substream) {
513ace79b657e2 Takashi Iwai 2016-02-28 434 /* FIXME: we should consider the boundary for the sync from app */
513ace79b657e2 Takashi Iwai 2016-02-28 435 if (!(sflags & SNDRV_PCM_SYNC_PTR_APPL))
513ace79b657e2 Takashi Iwai 2016-02-28 436 control->appl_ptr = scontrol.appl_ptr;
513ace79b657e2 Takashi Iwai 2016-02-28 437 else
513ace79b657e2 Takashi Iwai 2016-02-28 438 scontrol.appl_ptr = control->appl_ptr % boundary;
513ace79b657e2 Takashi Iwai 2016-02-28 439 if (!(sflags & SNDRV_PCM_SYNC_PTR_AVAIL_MIN))
513ace79b657e2 Takashi Iwai 2016-02-28 440 control->avail_min = scontrol.avail_min;
513ace79b657e2 Takashi Iwai 2016-02-28 441 else
513ace79b657e2 Takashi Iwai 2016-02-28 442 scontrol.avail_min = control->avail_min;
513ace79b657e2 Takashi Iwai 2016-02-28 443 sstatus.state = status->state;
513ace79b657e2 Takashi Iwai 2016-02-28 444 sstatus.hw_ptr = status->hw_ptr % boundary;
513ace79b657e2 Takashi Iwai 2016-02-28 445 sstatus.tstamp = status->tstamp;
513ace79b657e2 Takashi Iwai 2016-02-28 446 sstatus.suspended_state = status->suspended_state;
513ace79b657e2 Takashi Iwai 2016-02-28 447 sstatus.audio_tstamp = status->audio_tstamp;
650224fe8d5f6d Takashi Iwai 2024-02-27 448 }
a25684a956468e Takashi Iwai 2021-10-17 449 if (!(sflags & SNDRV_PCM_SYNC_PTR_APPL))
a25684a956468e Takashi Iwai 2021-10-17 450 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE);
2acd83beb4d3fd Christophe Leroy 2025-06-14 451 if (snd_pcm_sync_ptr_put_user(sstatus, scontrol, src))
513ace79b657e2 Takashi Iwai 2016-02-28 452 return -EFAULT;
513ace79b657e2 Takashi Iwai 2016-02-28 453
513ace79b657e2 Takashi Iwai 2016-02-28 454 return 0;
513ace79b657e2 Takashi Iwai 2016-02-28 455 }
83a44a4f47ad20 Masahiro Yamada 2022-03-14 456 #endif /* CONFIG_X86_X32_ABI */
^1da177e4c3f41 Linus Torvalds 2005-04-16 457
:::::: The code at line 423 was first introduced by commit
:::::: 513ace79b657e2022a592e77f24074e088681ecc ALSA: pcm: Fix ioctls for X32 ABI
:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Takashi Iwai <tiwai@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-01 2:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01 2:56 [tiwai-sound:for-next 23/38] sound/core/pcm_compat.c:423 snd_pcm_ioctl_sync_ptr_x32() error: uninitialized symbol 'sflags' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.