CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Takashi Iwai tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 435faf5c218a47fd6258187f62d9bb1009717896 commit: 146f66975bafbcfab349901c9f9c9f521ac96cbb ALSA: pcm: oss: Unlock mutex temporarily for sleeping at read/write date: 4 months ago :::::: branch date: 15 hours ago :::::: commit date: 4 months ago config: mips-randconfig-c022-20200605 (attached as .config) compiler: mips-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Julia Lawall coccinelle warnings: (new ones prefixed by >>) >> sound/core/oss/pcm_oss.c:1229:3-9: preceding lock on line 1223 # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=146f66975bafbcfab349901c9f9c9f521ac96cbb git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git remote update linus git checkout 146f66975bafbcfab349901c9f9c9f521ac96cbb vim +1229 sound/core/oss/pcm_oss.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 1202 6ac77bc180fbd9 Takashi Iwai 2005-11-17 1203 snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const char *ptr, snd_pcm_uframes_t frames, int in_kernel) ^1da177e4c3f41 Linus Torvalds 2005-04-16 1204 { 6ac77bc180fbd9 Takashi Iwai 2005-11-17 1205 struct snd_pcm_runtime *runtime = substream->runtime; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1206 int ret; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1207 while (1) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 1208 if (runtime->status->state == SNDRV_PCM_STATE_XRUN || ^1da177e4c3f41 Linus Torvalds 2005-04-16 1209 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 1210 #ifdef OSS_DEBUG 61efcee8608c38 Takashi Iwai 2014-02-04 1211 pcm_dbg(substream->pcm, 61efcee8608c38 Takashi Iwai 2014-02-04 1212 "pcm_oss: write: recovering from %s\n", 61efcee8608c38 Takashi Iwai 2014-02-04 1213 runtime->status->state == SNDRV_PCM_STATE_XRUN ? 61efcee8608c38 Takashi Iwai 2014-02-04 1214 "XRUN" : "SUSPEND"); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1215 #endif ^1da177e4c3f41 Linus Torvalds 2005-04-16 1216 ret = snd_pcm_oss_prepare(substream); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1217 if (ret < 0) ^1da177e4c3f41 Linus Torvalds 2005-04-16 1218 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1219 } 146f66975bafbc Takashi Iwai 2020-02-14 1220 mutex_unlock(&runtime->oss.params_lock); 13f72c8c28fc4b Takashi Iwai 2017-05-21 1221 ret = __snd_pcm_lib_xfer(substream, (void *)ptr, true, 13f72c8c28fc4b Takashi Iwai 2017-05-21 1222 frames, in_kernel); 146f66975bafbc Takashi Iwai 2020-02-14 @1223 mutex_lock(&runtime->oss.params_lock); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1224 if (ret != -EPIPE && ret != -ESTRPIPE) ^1da177e4c3f41 Linus Torvalds 2005-04-16 1225 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1226 /* test, if we can't store new data, because the stream */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 1227 /* has not been started */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 1228 if (runtime->status->state == SNDRV_PCM_STATE_PREPARED) ^1da177e4c3f41 Linus Torvalds 2005-04-16 @1229 return -EAGAIN; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1230 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 1231 return ret; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1232 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 1233 :::::: The code at line 1229 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds :::::: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org