* drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
@ 2020-08-11 22:37 ` kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-11 22:37 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c636eef2ee3696f261a35f34989842701a107895
commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
date: 4 weeks ago
config: h8300-randconfig-m031-20200811 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
1140
1141 /**
1142 * xilinx_dpdma_synchronize - Synchronize callback execution
1143 * @dchan: DMA channel
1144 *
1145 * Synchronizing callback execution ensures that all previously issued
1146 * transfers have completed and all associated callbacks have been called and
1147 * have returned.
1148 *
1149 * This function waits for the DMA channel to stop. It assumes it has been
1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
1151 * pending descriptors have been issued with dma_async_issue_pending(). The
1152 * behaviour is undefined otherwise.
1153 */
1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
1155 {
1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
1157 unsigned long flags;
1158
1159 xilinx_dpdma_chan_stop(chan);
1160
1161 spin_lock_irqsave(&chan->vchan.lock, flags);
1162 if (chan->desc.pending) {
1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
1164 chan->desc.pending = NULL;
1165 }
1166 if (chan->desc.active) {
1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
1168 chan->desc.active = NULL;
1169 }
> 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
1171
> 1172 vchan_synchronize(&chan->vchan);
1173 }
1174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24070 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
@ 2020-08-11 22:37 ` kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-11 22:37 UTC (permalink / raw)
To: Hyun Kwon
Cc: kbuild-all, linux-kernel, Vinod Koul, Tejas Upadhyay,
Michal Simek, Laurent Pinchart
[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c636eef2ee3696f261a35f34989842701a107895
commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
date: 4 weeks ago
config: h8300-randconfig-m031-20200811 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
1140
1141 /**
1142 * xilinx_dpdma_synchronize - Synchronize callback execution
1143 * @dchan: DMA channel
1144 *
1145 * Synchronizing callback execution ensures that all previously issued
1146 * transfers have completed and all associated callbacks have been called and
1147 * have returned.
1148 *
1149 * This function waits for the DMA channel to stop. It assumes it has been
1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
1151 * pending descriptors have been issued with dma_async_issue_pending(). The
1152 * behaviour is undefined otherwise.
1153 */
1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
1155 {
1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
1157 unsigned long flags;
1158
1159 xilinx_dpdma_chan_stop(chan);
1160
1161 spin_lock_irqsave(&chan->vchan.lock, flags);
1162 if (chan->desc.pending) {
1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
1164 chan->desc.pending = NULL;
1165 }
1166 if (chan->desc.active) {
1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
1168 chan->desc.active = NULL;
1169 }
> 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
1171
> 1172 vchan_synchronize(&chan->vchan);
1173 }
1174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24070 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
2020-08-11 22:37 ` kernel test robot
@ 2020-08-11 22:50 ` Laurent Pinchart
-1 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2020-08-11 22:50 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2354 bytes --]
On Wed, Aug 12, 2020 at 06:37:59AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c636eef2ee3696f261a35f34989842701a107895
> commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
> date: 4 weeks ago
> config: h8300-randconfig-m031-20200811 (attached as .config)
> compiler: h8300-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> smatch warnings:
> drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
Unless I'm mistaken, this is a false positive. I'd appreciate if someone
could check if I'm missing something obvious.
> vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
>
> 1140
> 1141 /**
> 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
> 1143 * @dchan: DMA channel
> 1144 *
> 1145 * Synchronizing callback execution ensures that all previously issued
> 1146 * transfers have completed and all associated callbacks have been called and
> 1147 * have returned.
> 1148 *
> 1149 * This function waits for the DMA channel to stop. It assumes it has been
> 1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
> 1151 * pending descriptors have been issued with dma_async_issue_pending(). The
> 1152 * behaviour is undefined otherwise.
> 1153 */
> 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
> 1155 {
> 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
> 1157 unsigned long flags;
> 1158
> 1159 xilinx_dpdma_chan_stop(chan);
> 1160
> 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
> 1162 if (chan->desc.pending) {
> 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
> 1164 chan->desc.pending = NULL;
> 1165 }
> 1166 if (chan->desc.active) {
> 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
> 1168 chan->desc.active = NULL;
> 1169 }
> > 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
> 1171
> > 1172 vchan_synchronize(&chan->vchan);
> 1173 }
> 1174
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
@ 2020-08-11 22:50 ` Laurent Pinchart
0 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2020-08-11 22:50 UTC (permalink / raw)
To: kernel test robot
Cc: Hyun Kwon, kbuild-all, linux-kernel, Vinod Koul, Tejas Upadhyay,
Michal Simek
On Wed, Aug 12, 2020 at 06:37:59AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c636eef2ee3696f261a35f34989842701a107895
> commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
> date: 4 weeks ago
> config: h8300-randconfig-m031-20200811 (attached as .config)
> compiler: h8300-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> smatch warnings:
> drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
Unless I'm mistaken, this is a false positive. I'd appreciate if someone
could check if I'm missing something obvious.
> vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
>
> 1140
> 1141 /**
> 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
> 1143 * @dchan: DMA channel
> 1144 *
> 1145 * Synchronizing callback execution ensures that all previously issued
> 1146 * transfers have completed and all associated callbacks have been called and
> 1147 * have returned.
> 1148 *
> 1149 * This function waits for the DMA channel to stop. It assumes it has been
> 1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
> 1151 * pending descriptors have been issued with dma_async_issue_pending(). The
> 1152 * behaviour is undefined otherwise.
> 1153 */
> 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
> 1155 {
> 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
> 1157 unsigned long flags;
> 1158
> 1159 xilinx_dpdma_chan_stop(chan);
> 1160
> 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
> 1162 if (chan->desc.pending) {
> 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
> 1164 chan->desc.pending = NULL;
> 1165 }
> 1166 if (chan->desc.active) {
> 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
> 1168 chan->desc.active = NULL;
> 1169 }
> > 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
> 1171
> > 1172 vchan_synchronize(&chan->vchan);
> 1173 }
> 1174
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
2020-08-11 22:50 ` Laurent Pinchart
@ 2020-08-12 4:16 ` Vinod Koul
-1 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2020-08-12 4:16 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2666 bytes --]
HI Laurent,
On 12-08-20, 01:50, Laurent Pinchart wrote:
> On Wed, Aug 12, 2020 at 06:37:59AM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: c636eef2ee3696f261a35f34989842701a107895
> > commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
> > date: 4 weeks ago
> > config: h8300-randconfig-m031-20200811 (attached as .config)
> > compiler: h8300-linux-gcc (GCC) 9.3.0
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > smatch warnings:
> > drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
>
> Unless I'm mistaken, this is a false positive. I'd appreciate if someone
> could check if I'm missing something obvious.
>
> > vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
> >
> > 1140
> > 1141 /**
> > 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
> > 1143 * @dchan: DMA channel
> > 1144 *
> > 1145 * Synchronizing callback execution ensures that all previously issued
> > 1146 * transfers have completed and all associated callbacks have been called and
> > 1147 * have returned.
> > 1148 *
> > 1149 * This function waits for the DMA channel to stop. It assumes it has been
> > 1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
> > 1151 * pending descriptors have been issued with dma_async_issue_pending(). The
> > 1152 * behaviour is undefined otherwise.
> > 1153 */
> > 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
> > 1155 {
> > 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
> > 1157 unsigned long flags;
> > 1158
> > 1159 xilinx_dpdma_chan_stop(chan);
> > 1160
> > 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
Lock is held here
> > 1162 if (chan->desc.pending) {
> > 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
This should be called with lock held
> > 1164 chan->desc.pending = NULL;
> > 1165 }
> > 1166 if (chan->desc.active) {
> > 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
same here
> > 1168 chan->desc.active = NULL;
> > 1169 }
> > > 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
Dropped
> > 1171
> > > 1172 vchan_synchronize(&chan->vchan);
This should be called without lock
So I agree with you, looks like a false positive to me as well
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
@ 2020-08-12 4:16 ` Vinod Koul
0 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2020-08-12 4:16 UTC (permalink / raw)
To: Laurent Pinchart
Cc: kernel test robot, Hyun Kwon, kbuild-all, linux-kernel,
Tejas Upadhyay, Michal Simek
HI Laurent,
On 12-08-20, 01:50, Laurent Pinchart wrote:
> On Wed, Aug 12, 2020 at 06:37:59AM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: c636eef2ee3696f261a35f34989842701a107895
> > commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
> > date: 4 weeks ago
> > config: h8300-randconfig-m031-20200811 (attached as .config)
> > compiler: h8300-linux-gcc (GCC) 9.3.0
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > smatch warnings:
> > drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
>
> Unless I'm mistaken, this is a false positive. I'd appreciate if someone
> could check if I'm missing something obvious.
>
> > vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
> >
> > 1140
> > 1141 /**
> > 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
> > 1143 * @dchan: DMA channel
> > 1144 *
> > 1145 * Synchronizing callback execution ensures that all previously issued
> > 1146 * transfers have completed and all associated callbacks have been called and
> > 1147 * have returned.
> > 1148 *
> > 1149 * This function waits for the DMA channel to stop. It assumes it has been
> > 1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
> > 1151 * pending descriptors have been issued with dma_async_issue_pending(). The
> > 1152 * behaviour is undefined otherwise.
> > 1153 */
> > 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
> > 1155 {
> > 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
> > 1157 unsigned long flags;
> > 1158
> > 1159 xilinx_dpdma_chan_stop(chan);
> > 1160
> > 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
Lock is held here
> > 1162 if (chan->desc.pending) {
> > 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
This should be called with lock held
> > 1164 chan->desc.pending = NULL;
> > 1165 }
> > 1166 if (chan->desc.active) {
> > 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
same here
> > 1168 chan->desc.active = NULL;
> > 1169 }
> > > 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
Dropped
> > 1171
> > > 1172 vchan_synchronize(&chan->vchan);
This should be called without lock
So I agree with you, looks like a false positive to me as well
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
2020-08-11 22:50 ` Laurent Pinchart
@ 2020-08-18 6:55 ` Xia, Hui
-1 siblings, 0 replies; 9+ messages in thread
From: Xia, Hui @ 2020-08-18 6:55 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3289 bytes --]
>-----Original Message-----
>From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>Sent: 2020年8月12日 6:50
>To: kernel test robot <lkp@intel.com>
>Cc: Hyun Kwon <hyun.kwon@xilinx.com>; kbuild-all(a)lists.01.org; linux-
>kernel(a)vger.kernel.org; Vinod Koul <vkoul@kernel.org>; Tejas Upadhyay
><tejasu@xilinx.com>; Michal Simek <monstr@monstr.eu>
>Subject: [kbuild-all] Re: drivers/dma/xilinx/xilinx_dpdma.c:1172
>xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line
>1170)
>
>On Wed, Aug 12, 2020 at 06:37:59AM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: c636eef2ee3696f261a35f34989842701a107895
>> commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx:
>dpdma: Add the Xilinx DisplayPort DMA engine driver
>> date: 4 weeks ago
>> config: h8300-randconfig-m031-20200811 (attached as .config)
>> compiler: h8300-linux-gcc (GCC) 9.3.0
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> smatch warnings:
>> drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize()
>> error: double unlocked 'chan->vchan.lock' (orig line 1170)
>
>Unless I'm mistaken, this is a false positive. I'd appreciate if someone could check
>if I'm missing something obvious.
Please ignore this report. It is a false positive.
We have changed the rule to avoid send out this warning type directly. Sorry for inconvenient.
Best Regards,
Hui
>
>> vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
>>
>> 1140
>> 1141 /**
>> 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
>> 1143 * @dchan: DMA channel
>> 1144 *
>> 1145 * Synchronizing callback execution ensures that all previously issued
>> 1146 * transfers have completed and all associated callbacks have been called
>and
>> 1147 * have returned.
>> 1148 *
>> 1149 * This function waits for the DMA channel to stop. It assumes it has been
>> 1150 * paused by a previous call to dmaengine_terminate_async(), and that
>no new
>> 1151 * pending descriptors have been issued with dma_async_issue_pending().
>The
>> 1152 * behaviour is undefined otherwise.
>> 1153 */
>> 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
>> 1155 {
>> 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
>> 1157 unsigned long flags;
>> 1158
>> 1159 xilinx_dpdma_chan_stop(chan);
>> 1160
>> 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
>> 1162 if (chan->desc.pending) {
>> 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
>> 1164 chan->desc.pending = NULL;
>> 1165 }
>> 1166 if (chan->desc.active) {
>> 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
>> 1168 chan->desc.active = NULL;
>> 1169 }
>> > 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
>> 1171
>> > 1172 vchan_synchronize(&chan->vchan);
>> 1173 }
>> 1174
>>
>
>--
>Regards,
>
>Laurent Pinchart
>_______________________________________________
>kbuild-all mailing list -- kbuild-all(a)lists.01.org To unsubscribe send an email to
>kbuild-all-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [kbuild-all] Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
@ 2020-08-18 6:55 ` Xia, Hui
0 siblings, 0 replies; 9+ messages in thread
From: Xia, Hui @ 2020-08-18 6:55 UTC (permalink / raw)
To: Laurent Pinchart, lkp
Cc: Hyun Kwon, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Vinod Koul, Tejas Upadhyay, Michal Simek
>-----Original Message-----
>From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>Sent: 2020年8月12日 6:50
>To: kernel test robot <lkp@intel.com>
>Cc: Hyun Kwon <hyun.kwon@xilinx.com>; kbuild-all@lists.01.org; linux-
>kernel@vger.kernel.org; Vinod Koul <vkoul@kernel.org>; Tejas Upadhyay
><tejasu@xilinx.com>; Michal Simek <monstr@monstr.eu>
>Subject: [kbuild-all] Re: drivers/dma/xilinx/xilinx_dpdma.c:1172
>xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line
>1170)
>
>On Wed, Aug 12, 2020 at 06:37:59AM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: c636eef2ee3696f261a35f34989842701a107895
>> commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx:
>dpdma: Add the Xilinx DisplayPort DMA engine driver
>> date: 4 weeks ago
>> config: h8300-randconfig-m031-20200811 (attached as .config)
>> compiler: h8300-linux-gcc (GCC) 9.3.0
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> smatch warnings:
>> drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize()
>> error: double unlocked 'chan->vchan.lock' (orig line 1170)
>
>Unless I'm mistaken, this is a false positive. I'd appreciate if someone could check
>if I'm missing something obvious.
Please ignore this report. It is a false positive.
We have changed the rule to avoid send out this warning type directly. Sorry for inconvenient.
Best Regards,
Hui
>
>> vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
>>
>> 1140
>> 1141 /**
>> 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
>> 1143 * @dchan: DMA channel
>> 1144 *
>> 1145 * Synchronizing callback execution ensures that all previously issued
>> 1146 * transfers have completed and all associated callbacks have been called
>and
>> 1147 * have returned.
>> 1148 *
>> 1149 * This function waits for the DMA channel to stop. It assumes it has been
>> 1150 * paused by a previous call to dmaengine_terminate_async(), and that
>no new
>> 1151 * pending descriptors have been issued with dma_async_issue_pending().
>The
>> 1152 * behaviour is undefined otherwise.
>> 1153 */
>> 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
>> 1155 {
>> 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
>> 1157 unsigned long flags;
>> 1158
>> 1159 xilinx_dpdma_chan_stop(chan);
>> 1160
>> 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
>> 1162 if (chan->desc.pending) {
>> 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
>> 1164 chan->desc.pending = NULL;
>> 1165 }
>> 1166 if (chan->desc.active) {
>> 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
>> 1168 chan->desc.active = NULL;
>> 1169 }
>> > 1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
>> 1171
>> > 1172 vchan_synchronize(&chan->vchan);
>> 1173 }
>> 1174
>>
>
>--
>Regards,
>
>Laurent Pinchart
>_______________________________________________
>kbuild-all mailing list -- kbuild-all@lists.01.org To unsubscribe send an email to
>kbuild-all-leave@lists.01.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
@ 2020-09-09 3:32 kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-09-09 3:32 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4140 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Hyun Kwon <hyun.kwon@xilinx.com>
CC: Vinod Koul <vkoul@kernel.org>
CC: Tejas Upadhyay <tejasu@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 34d4ddd359dbcdf6c5fb3f85a179243d7a1cb7f8
commit: 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver
date: 8 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 8 weeks ago
config: i386-randconfig-m021-20200909 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7cbb0c63de3fc218fd06ecfedb477772a4d12f76
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7cbb0c63de3fc218fd06ecfedb477772a4d12f76
vim +1172 drivers/dma/xilinx/xilinx_dpdma.c
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1140
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1141 /**
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1142 * xilinx_dpdma_synchronize - Synchronize callback execution
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1143 * @dchan: DMA channel
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1144 *
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1145 * Synchronizing callback execution ensures that all previously issued
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1146 * transfers have completed and all associated callbacks have been called and
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1147 * have returned.
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1148 *
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1149 * This function waits for the DMA channel to stop. It assumes it has been
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1150 * paused by a previous call to dmaengine_terminate_async(), and that no new
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1151 * pending descriptors have been issued with dma_async_issue_pending(). The
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1152 * behaviour is undefined otherwise.
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1153 */
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1154 static void xilinx_dpdma_synchronize(struct dma_chan *dchan)
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1155 {
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1156 struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1157 unsigned long flags;
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1158
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1159 xilinx_dpdma_chan_stop(chan);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1160
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1161 spin_lock_irqsave(&chan->vchan.lock, flags);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1162 if (chan->desc.pending) {
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1163 vchan_terminate_vdesc(&chan->desc.pending->vdesc);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1164 chan->desc.pending = NULL;
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1165 }
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1166 if (chan->desc.active) {
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1167 vchan_terminate_vdesc(&chan->desc.active->vdesc);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1168 chan->desc.active = NULL;
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1169 }
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 @1170 spin_unlock_irqrestore(&chan->vchan.lock, flags);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1171
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 @1172 vchan_synchronize(&chan->vchan);
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1173 }
7cbb0c63de3fc21 Hyun Kwon 2020-07-17 1174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33303 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-09-09 3:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-11 22:37 drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170) kernel test robot
2020-08-11 22:37 ` kernel test robot
2020-08-11 22:50 ` Laurent Pinchart
2020-08-11 22:50 ` Laurent Pinchart
2020-08-12 4:16 ` Vinod Koul
2020-08-12 4:16 ` Vinod Koul
2020-08-18 6:55 ` Xia, Hui
2020-08-18 6:55 ` [kbuild-all] " Xia, Hui
-- strict thread matches above, loose matches on Subject: below --
2020-09-09 3:32 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.