* [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
@ 2016-10-11 13:16 Julia Lawall
2016-10-11 13:16 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2016-10-11 13:16 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, kbuild-all
It looks like a lock may be needed before line 174.
julia
---------- Forwarded message ----------
Date: Tue, 11 Oct 2016 21:06:18 +0800
From: kbuild test robot <fengguang.wu@intel.com>
To: kbuild@01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject:
[linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-medi
a-usb-drivers/20161011-182408 3/31]
drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line
169
CC: kbuild-all@01.org
TO: Mauro Carvalho Chehab <m.chehab@samsung.com>
CC: linux-media@vger.kernel.org
CC: 0day robot <fengguang.wu@intel.com>
tree: https://github.com/0day-ci/linux Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408
head: ff49f775552fe4ebe2944527cf882073679cb1e5
commit: b38d98275e144aaea9db69ba2dcba58466046d9b [3/31] cinergyT2-core: handle error code on RC query
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
>> drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout b38d98275e144aaea9db69ba2dcba58466046d9b
vim +174 drivers/media/usb/dvb-usb/cinergyT2-core.c
986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 163 {
7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 164 struct cinergyt2_state *st = d->priv;
b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 165 int i, ret;
7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 166
986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 167 *state = REMOTE_NO_KEY_PRESSED;
986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 168
48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @169 mutex_lock(&st->data_mutex);
48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 170 st->data[0] = CINERGYT2_EP1_GET_RC_EVENTS;
48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 171
b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 172 ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 173 if (ret < 0)
b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @174 return ret;
48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 175
48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 176 if (st->data[4] == 0xff) {
7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 177 /* key repeat */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
2016-10-11 13:16 [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169 Julia Lawall
@ 2016-10-11 13:16 ` Julia Lawall
2016-10-11 21:28 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2016-10-11 13:16 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, kbuild-all
On Tue, 11 Oct 2016, Julia Lawall wrote:
> It looks like a lock may be needed before line 174.
Sorry, an unlock.
>
> julia
>
> ---------- Forwarded message ----------
> Date: Tue, 11 Oct 2016 21:06:18 +0800
> From: kbuild test robot <fengguang.wu@intel.com>
> To: kbuild@01.org
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Subject:
> [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-medi
> a-usb-drivers/20161011-182408 3/31]
> drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line
> 169
>
> CC: kbuild-all@01.org
> TO: Mauro Carvalho Chehab <m.chehab@samsung.com>
> CC: linux-media@vger.kernel.org
> CC: 0day robot <fengguang.wu@intel.com>
>
> tree: https://github.com/0day-ci/linux Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408
> head: ff49f775552fe4ebe2944527cf882073679cb1e5
> commit: b38d98275e144aaea9db69ba2dcba58466046d9b [3/31] cinergyT2-core: handle error code on RC query
> :::::: branch date: 3 hours ago
> :::::: commit date: 3 hours ago
>
> >> drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
>
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout b38d98275e144aaea9db69ba2dcba58466046d9b
> vim +174 drivers/media/usb/dvb-usb/cinergyT2-core.c
>
> 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 163 {
> 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 164 struct cinergyt2_state *st = d->priv;
> b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 165 int i, ret;
> 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 166
> 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 167 *state = REMOTE_NO_KEY_PRESSED;
> 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 168
> 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @169 mutex_lock(&st->data_mutex);
> 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 170 st->data[0] = CINERGYT2_EP1_GET_RC_EVENTS;
> 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 171
> b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 172 ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
> b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 173 if (ret < 0)
> b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @174 return ret;
> 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 175
> 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 176 if (st->data[4] == 0xff) {
> 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 177 /* key repeat */
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
2016-10-11 13:16 ` Julia Lawall
@ 2016-10-11 21:28 ` Mauro Carvalho Chehab
2016-10-11 21:41 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2016-10-11 21:28 UTC (permalink / raw)
To: Julia Lawall; +Cc: linux-media, kbuild-all
Em Tue, 11 Oct 2016 15:16:24 +0200 (CEST)
Julia Lawall <julia.lawall@lip6.fr> escreveu:
> On Tue, 11 Oct 2016, Julia Lawall wrote:
>
> > It looks like a lock may be needed before line 174.
>
> Sorry, an unlock.
I suspect that this is a false positive warning, as there is a
mutex unlock on the same routine, at line 203. All exit
conditions go to the unlock condition.
Am I missing something?
>
> >
> > julia
> >
> > ---------- Forwarded message ----------
> > Date: Tue, 11 Oct 2016 21:06:18 +0800
> > From: kbuild test robot <fengguang.wu@intel.com>
> > To: kbuild@01.org
> > Cc: Julia Lawall <julia.lawall@lip6.fr>
> > Subject:
> > [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-medi
> > a-usb-drivers/20161011-182408 3/31]
> > drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line
> > 169
> >
> > CC: kbuild-all@01.org
> > TO: Mauro Carvalho Chehab <m.chehab@samsung.com>
> > CC: linux-media@vger.kernel.org
> > CC: 0day robot <fengguang.wu@intel.com>
> >
> > tree: https://github.com/0day-ci/linux Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408
> > head: ff49f775552fe4ebe2944527cf882073679cb1e5
> > commit: b38d98275e144aaea9db69ba2dcba58466046d9b [3/31] cinergyT2-core: handle error code on RC query
> > :::::: branch date: 3 hours ago
> > :::::: commit date: 3 hours ago
> >
> > >> drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
> >
> > git remote add linux-review https://github.com/0day-ci/linux
> > git remote update linux-review
> > git checkout b38d98275e144aaea9db69ba2dcba58466046d9b
> > vim +174 drivers/media/usb/dvb-usb/cinergyT2-core.c
> >
> > 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 163 {
> > 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 164 struct cinergyt2_state *st = d->priv;
> > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 165 int i, ret;
> > 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 166
> > 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 167 *state = REMOTE_NO_KEY_PRESSED;
> > 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 168
> > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @169 mutex_lock(&st->data_mutex);
> > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 170 st->data[0] = CINERGYT2_EP1_GET_RC_EVENTS;
> > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 171
> > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 172 ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
> > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 173 if (ret < 0)
> > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @174 return ret;
> > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 175
> > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 176 if (st->data[4] == 0xff) {
> > 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 177 /* key repeat */
> >
> > ---
> > 0-DAY kernel test infrastructure Open Source Technology Center
> > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> >
>
>
--
Thanks,
Mauro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
2016-10-11 21:28 ` Mauro Carvalho Chehab
@ 2016-10-11 21:41 ` Julia Lawall
2016-10-12 2:12 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2016-10-11 21:41 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, kbuild-all
On Tue, 11 Oct 2016, Mauro Carvalho Chehab wrote:
> Em Tue, 11 Oct 2016 15:16:24 +0200 (CEST)
> Julia Lawall <julia.lawall@lip6.fr> escreveu:
>
> > On Tue, 11 Oct 2016, Julia Lawall wrote:
> >
> > > It looks like a lock may be needed before line 174.
> >
> > Sorry, an unlock.
>
> I suspect that this is a false positive warning, as there is a
> mutex unlock on the same routine, at line 203. All exit
> conditions go to the unlock condition.
There is a direct exit in line 174.
julia
>
> Am I missing something?
>
> >
> > >
> > > julia
> > >
> > > ---------- Forwarded message ----------
> > > Date: Tue, 11 Oct 2016 21:06:18 +0800
> > > From: kbuild test robot <fengguang.wu@intel.com>
> > > To: kbuild@01.org
> > > Cc: Julia Lawall <julia.lawall@lip6.fr>
> > > Subject:
> > > [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-medi
> > > a-usb-drivers/20161011-182408 3/31]
> > > drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line
> > > 169
> > >
> > > CC: kbuild-all@01.org
> > > TO: Mauro Carvalho Chehab <m.chehab@samsung.com>
> > > CC: linux-media@vger.kernel.org
> > > CC: 0day robot <fengguang.wu@intel.com>
> > >
> > > tree: https://github.com/0day-ci/linux Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408
> > > head: ff49f775552fe4ebe2944527cf882073679cb1e5
> > > commit: b38d98275e144aaea9db69ba2dcba58466046d9b [3/31] cinergyT2-core: handle error code on RC query
> > > :::::: branch date: 3 hours ago
> > > :::::: commit date: 3 hours ago
> > >
> > > >> drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
> > >
> > > git remote add linux-review https://github.com/0day-ci/linux
> > > git remote update linux-review
> > > git checkout b38d98275e144aaea9db69ba2dcba58466046d9b
> > > vim +174 drivers/media/usb/dvb-usb/cinergyT2-core.c
> > >
> > > 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 163 {
> > > 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 164 struct cinergyt2_state *st = d->priv;
> > > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 165 int i, ret;
> > > 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 166
> > > 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 167 *state = REMOTE_NO_KEY_PRESSED;
> > > 986bd1e5 drivers/media/dvb/dvb-usb/cinergyT2-core.c Tomi Orava 2008-09-19 168
> > > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @169 mutex_lock(&st->data_mutex);
> > > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 170 st->data[0] = CINERGYT2_EP1_GET_RC_EVENTS;
> > > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 171
> > > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 172 ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
> > > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 173 if (ret < 0)
> > > b38d9827 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 @174 return ret;
> > > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 175
> > > 48922468 drivers/media/usb/dvb-usb/cinergyT2-core.c Mauro Carvalho Chehab 2016-10-11 176 if (st->data[4] == 0xff) {
> > > 7f987678 drivers/media/dvb/dvb-usb/cinergyT2-core.c Thierry MERLE 2008-09-19 177 /* key repeat */
> > >
> > > ---
> > > 0-DAY kernel test infrastructure Open Source Technology Center
> > > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> > >
> >
> >
>
>
> --
> Thanks,
> Mauro
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169
2016-10-11 21:41 ` Julia Lawall
@ 2016-10-12 2:12 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2016-10-12 2:12 UTC (permalink / raw)
To: Julia Lawall; +Cc: linux-media, kbuild-all
Em Tue, 11 Oct 2016 23:41:53 +0200 (CEST)
Julia Lawall <julia.lawall@lip6.fr> escreveu:
> On Tue, 11 Oct 2016, Mauro Carvalho Chehab wrote:
>
> > Em Tue, 11 Oct 2016 15:16:24 +0200 (CEST)
> > Julia Lawall <julia.lawall@lip6.fr> escreveu:
> >
> > > On Tue, 11 Oct 2016, Julia Lawall wrote:
> > >
> > > > It looks like a lock may be needed before line 174.
> > >
> > > Sorry, an unlock.
> >
> > I suspect that this is a false positive warning, as there is a
> > mutex unlock on the same routine, at line 203. All exit
> > conditions go to the unlock condition.
>
> There is a direct exit in line 174.
Ah! I was looking at the wrong patch (cinergyT2-core: don't do DMA on stack).
Thanks for pointing it. I'll the affected code to:
- dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
+ ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
+ if (ret < 0)
+ goto ret;
Regards,
Mauro
--
Thanks,
Mauro
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-12 2:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 13:16 [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169 Julia Lawall
2016-10-11 13:16 ` Julia Lawall
2016-10-11 21:28 ` Mauro Carvalho Chehab
2016-10-11 21:41 ` Julia Lawall
2016-10-12 2:12 ` Mauro Carvalho Chehab
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.