All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-4.4 3/74] sound/core/pcm_native.c:591:42: error: 'const struct snd_pcm_ops' has no member named 'copy_user'
@ 2019-12-24  5:23 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-24  5:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5297 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head:   4c834a5cb59744dbc261d27024645f519e04535f
commit: 8fec9eb582f3a5224fe073a23db58df8ac4460a4 [3/74] ALSA: pcm: Avoid possible info leaks from PCM stream buffers
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 8fec9eb582f3a5224fe073a23db58df8ac4460a4
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   sound/core/pcm_native.c: In function 'snd_pcm_hw_params':
>> sound/core/pcm_native.c:591:42: error: 'const struct snd_pcm_ops' has no member named 'copy_user'
     if (runtime->dma_area && !substream->ops->copy_user)
                                             ^~

vim +591 sound/core/pcm_native.c

   507	
   508	static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
   509				     struct snd_pcm_hw_params *params)
   510	{
   511		struct snd_pcm_runtime *runtime;
   512		int err, usecs;
   513		unsigned int bits;
   514		snd_pcm_uframes_t frames;
   515	
   516		if (PCM_RUNTIME_CHECK(substream))
   517			return -ENXIO;
   518		runtime = substream->runtime;
   519		snd_pcm_stream_lock_irq(substream);
   520		switch (runtime->status->state) {
   521		case SNDRV_PCM_STATE_OPEN:
   522		case SNDRV_PCM_STATE_SETUP:
   523		case SNDRV_PCM_STATE_PREPARED:
   524			break;
   525		default:
   526			snd_pcm_stream_unlock_irq(substream);
   527			return -EBADFD;
   528		}
   529		snd_pcm_stream_unlock_irq(substream);
   530	#if IS_ENABLED(CONFIG_SND_PCM_OSS)
   531		if (!substream->oss.oss)
   532	#endif
   533			if (atomic_read(&substream->mmap_count))
   534				return -EBADFD;
   535	
   536		params->rmask = ~0U;
   537		err = snd_pcm_hw_refine(substream, params);
   538		if (err < 0)
   539			goto _error;
   540	
   541		err = snd_pcm_hw_params_choose(substream, params);
   542		if (err < 0)
   543			goto _error;
   544	
   545		if (substream->ops->hw_params != NULL) {
   546			err = substream->ops->hw_params(substream, params);
   547			if (err < 0)
   548				goto _error;
   549		}
   550	
   551		runtime->access = params_access(params);
   552		runtime->format = params_format(params);
   553		runtime->subformat = params_subformat(params);
   554		runtime->channels = params_channels(params);
   555		runtime->rate = params_rate(params);
   556		runtime->period_size = params_period_size(params);
   557		runtime->periods = params_periods(params);
   558		runtime->buffer_size = params_buffer_size(params);
   559		runtime->info = params->info;
   560		runtime->rate_num = params->rate_num;
   561		runtime->rate_den = params->rate_den;
   562		runtime->no_period_wakeup =
   563				(params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) &&
   564				(params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP);
   565	
   566		bits = snd_pcm_format_physical_width(runtime->format);
   567		runtime->sample_bits = bits;
   568		bits *= runtime->channels;
   569		runtime->frame_bits = bits;
   570		frames = 1;
   571		while (bits % 8 != 0) {
   572			bits *= 2;
   573			frames *= 2;
   574		}
   575		runtime->byte_align = bits / 8;
   576		runtime->min_align = frames;
   577	
   578		/* Default sw params */
   579		runtime->tstamp_mode = SNDRV_PCM_TSTAMP_NONE;
   580		runtime->period_step = 1;
   581		runtime->control->avail_min = runtime->period_size;
   582		runtime->start_threshold = 1;
   583		runtime->stop_threshold = runtime->buffer_size;
   584		runtime->silence_threshold = 0;
   585		runtime->silence_size = 0;
   586		runtime->boundary = runtime->buffer_size;
   587		while (runtime->boundary * 2 <= LONG_MAX - runtime->buffer_size)
   588			runtime->boundary *= 2;
   589	
   590		/* clear the buffer for avoiding possible kernel info leaks */
 > 591		if (runtime->dma_area && !substream->ops->copy_user)
   592			memset(runtime->dma_area, 0, runtime->dma_bytes);
   593	
   594		snd_pcm_timer_resolution_change(substream);
   595		snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP);
   596	
   597		if (pm_qos_request_active(&substream->latency_pm_qos_req))
   598			pm_qos_remove_request(&substream->latency_pm_qos_req);
   599		if ((usecs = period_to_usecs(runtime)) >= 0)
   600			pm_qos_add_request(&substream->latency_pm_qos_req,
   601					   PM_QOS_CPU_DMA_LATENCY, usecs);
   602		return 0;
   603	 _error:
   604		/* hardware might be unusable from this time,
   605		   so we force application to retry to set
   606		   the correct hardware parameter settings */
   607		snd_pcm_set_state(substream, SNDRV_PCM_STATE_OPEN);
   608		if (substream->ops->hw_free != NULL)
   609			substream->ops->hw_free(substream);
   610		return err;
   611	}
   612	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37407 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-24  5:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-24  5:23 [sashal-linux-stable:queue-4.4 3/74] sound/core/pcm_native.c:591:42: error: 'const struct snd_pcm_ops' has no member named 'copy_user' kbuild 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.