Content-Type: multipart/mixed; boundary="===============0233234687549203526==" MIME-Version: 1.0 From: Takashi Iwai To: kbuild-all@lists.01.org Subject: Re: [linux-next:pending-fixes 241/297] sound/core/oss/mixer_oss.c:300:1-11: second lock on line 316 (fwd) Date: Tue, 26 Oct 2021 08:27:09 +0200 Message-ID: In-Reply-To: List-Id: --===============0233234687549203526== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Sun, 24 Oct 2021 18:54:52 +0200, Julia Lawall wrote: > = > Line 316 needs to be an unlock. Right, the fix is already queued. thanks, Takashi > = > julia > = > ---------- Forwarded message ---------- > Date: Sun, 24 Oct 2021 22:51:40 +0800 > From: kernel test robot > To: kbuild(a)lists.01.org > Cc: lkp(a)intel.com, Julia Lawall > Subject: [linux-next:pending-fixes 241/297] sound/core/oss/mixer_oss.c:30= 0:1-11: > second lock on line 316 > = > CC: kbuild-all(a)lists.01.org > CC: Linux Memory Management List > TO: Takashi Iwai > CC: Jaroslav Kysela > = > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it pending-fixes > head: 9344874edebc5f4360a045cdef5e4ab3cf42e5bd > commit: 411cef6adfb38a5bb6bd9af3941b28198e7fb680 [241/297] ALSA: mixer: o= ss: Fix racy access to slots > :::::: branch date: 3 days ago > :::::: commit date: 3 days ago > config: arm-allyesconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0 > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > Reported-by: Julia Lawall > = > = > cocci warnings: (new ones prefixed by >>) > >> sound/core/oss/mixer_oss.c:300:1-11: second lock on line 316 > = > vim +300 sound/core/oss/mixer_oss.c > = > ^1da177e4c3f41 Linus Torvalds 2005-04-16 290 > f956b4a3ae790e Takashi Iwai 2005-11-17 291 static int snd_mixer_oss_s= et_volume(struct snd_mixer_oss_file *fmixer, > ^1da177e4c3f41 Linus Torvalds 2005-04-16 292 int slot, int volu= me) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 293 { > f956b4a3ae790e Takashi Iwai 2005-11-17 294 struct snd_mixer_oss *mix= er =3D fmixer->mixer; > f956b4a3ae790e Takashi Iwai 2005-11-17 295 struct snd_mixer_oss_slot= *pslot; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 296 int result =3D 0, left = =3D volume & 0xff, right =3D (volume >> 8) & 0xff; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 297 > ^1da177e4c3f41 Linus Torvalds 2005-04-16 298 if (mixer =3D=3D NULL || = slot > 30) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 299 return -EIO; > 411cef6adfb38a Takashi Iwai 2021-10-20 @300 mutex_lock(&mixer->reg_mu= tex); > ^1da177e4c3f41 Linus Torvalds 2005-04-16 301 pslot =3D &mixer->slots[s= lot]; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 302 if (left > 100) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 303 left =3D 100; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 304 if (right > 100) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 305 right =3D 100; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 306 if (!pslot->stereo) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 307 right =3D left; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 308 if (pslot->put_volume) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 309 result =3D pslot->put_vo= lume(fmixer, pslot, left, right); > ^1da177e4c3f41 Linus Torvalds 2005-04-16 310 if (result < 0) > 411cef6adfb38a Takashi Iwai 2021-10-20 311 goto unlock; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 312 pslot->volume[0] =3D left; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 313 pslot->volume[1] =3D righ= t; > 411cef6adfb38a Takashi Iwai 2021-10-20 314 result =3D (left & 0xff) = | ((right & 0xff) << 8); > 411cef6adfb38a Takashi Iwai 2021-10-20 315 unlock: > 411cef6adfb38a Takashi Iwai 2021-10-20 @316 mutex_lock(&mixer->reg_mu= tex); > 411cef6adfb38a Takashi Iwai 2021-10-20 317 return result; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 318 } > ^1da177e4c3f41 Linus Torvalds 2005-04-16 319 > = > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org > [2 ] >=20 --===============0233234687549203526==--