* [PATCH 1/2] pci: Convert to use built-in RCU list checking
@ 2019-08-30 23:18 Joel Fernandes (Google)
2019-08-30 23:18 ` [PATCH 2/2] ipc/sem: " Joel Fernandes (Google)
2019-09-04 4:06 ` [PATCH 1/2] pci: " kbuild test robot
0 siblings, 2 replies; 8+ messages in thread
From: Joel Fernandes (Google) @ 2019-08-30 23:18 UTC (permalink / raw)
To: linux-kernel
Cc: Joel Fernandes (Google),
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
CONFIG_PROVE_RCU_LIST requires list_for_each_entry_rcu() to pass a
lockdep expression if using srcu or locking for protection. It can only
check regular RCU protection, all other protection needs to be passed as
lockdep expression.
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
drivers/pci/controller/vmd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 4575e0c6dc4b..127631d0c6da 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -718,7 +718,8 @@ static irqreturn_t vmd_irq(int irq, void *data)
int idx;
idx = srcu_read_lock(&irqs->srcu);
- list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node)
+ list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
+ srcu_read_lock_held(&irqs->srcu))
generic_handle_irq(vmdirq->virq);
srcu_read_unlock(&irqs->srcu, idx);
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ipc/sem: Convert to use built-in RCU list checking
2019-08-30 23:18 [PATCH 1/2] pci: Convert to use built-in RCU list checking Joel Fernandes (Google)
@ 2019-08-30 23:18 ` Joel Fernandes (Google)
2019-09-04 5:09 ` kbuild test robot
2019-09-04 4:06 ` [PATCH 1/2] pci: " kbuild test robot
1 sibling, 1 reply; 8+ messages in thread
From: Joel Fernandes (Google) @ 2019-08-30 23:18 UTC (permalink / raw)
To: linux-kernel
Cc: Joel Fernandes (Google),
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
CONFIG_PROVE_RCU_LIST requires list_for_each_entry_rcu() to pass a
lockdep expression if using srcu or locking for protection. It can only
check regular RCU protection, all other protection needs to be passed as
lockdep expression.
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
ipc/sem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ipc/sem.c b/ipc/sem.c
index 7da4504bcc7c..ec97a7072413 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1852,7 +1852,8 @@ static struct sem_undo *__lookup_undo(struct sem_undo_list *ulp, int semid)
{
struct sem_undo *un;
- list_for_each_entry_rcu(un, &ulp->list_proc, list_proc) {
+ list_for_each_entry_rcu(un, &ulp->list_proc, list_proc,
+ spin_is_locked(&ulp->lock)) {
if (un->semid == semid)
return un;
}
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] pci: Convert to use built-in RCU list checking
2019-08-30 23:18 [PATCH 1/2] pci: Convert to use built-in RCU list checking Joel Fernandes (Google)
2019-08-30 23:18 ` [PATCH 2/2] ipc/sem: " Joel Fernandes (Google)
@ 2019-09-04 4:06 ` kbuild test robot
2019-09-04 5:04 ` Joel Fernandes
1 sibling, 1 reply; 8+ messages in thread
From: kbuild test robot @ 2019-09-04 4:06 UTC (permalink / raw)
To: Joel Fernandes (Google)
Cc: kbuild-all, linux-kernel, Joel Fernandes (Google),
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
[-- Attachment #1: Type: text/plain, Size: 2339 bytes --]
Hi "Joel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc7 next-20190903]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/pci-Convert-to-use-built-in-RCU-list-checking/20190901-211013
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/pci/controller/vmd.c: In function 'vmd_irq':
>> drivers/pci/controller/vmd.c:722:37: error: macro "list_for_each_entry_rcu" passed 4 arguments, but takes just 3
srcu_read_lock_held(&irqs->srcu))
^
>> drivers/pci/controller/vmd.c:721:2: error: unknown type name 'list_for_each_entry_rcu'
list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/controller/vmd.c:723:28: error: expected ')' before '->' token
generic_handle_irq(vmdirq->virq);
^~
>> drivers/pci/controller/vmd.c:721:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
^~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/controller/vmd.c:717:18: warning: unused variable 'vmdirq' [-Wunused-variable]
struct vmd_irq *vmdirq;
^~~~~~
vim +/list_for_each_entry_rcu +722 drivers/pci/controller/vmd.c
713
714 static irqreturn_t vmd_irq(int irq, void *data)
715 {
716 struct vmd_irq_list *irqs = data;
717 struct vmd_irq *vmdirq;
718 int idx;
719
720 idx = srcu_read_lock(&irqs->srcu);
> 721 list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
> 722 srcu_read_lock_held(&irqs->srcu))
> 723 generic_handle_irq(vmdirq->virq);
724 srcu_read_unlock(&irqs->srcu, idx);
725
726 return IRQ_HANDLED;
727 }
728
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48019 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] pci: Convert to use built-in RCU list checking
2019-09-04 4:06 ` [PATCH 1/2] pci: " kbuild test robot
@ 2019-09-04 5:04 ` Joel Fernandes
2019-09-04 17:13 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Joel Fernandes @ 2019-09-04 5:04 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Andrew Morton, Arnd Bergmann,
Bjorn Helgaas, Catalin Marinas, Gustavo A. R. Silva,
Jonathan Derrick, Keith Busch, linux-pci, Lorenzo Pieralisi
On Wed, Sep 04, 2019 at 12:06:43PM +0800, kbuild test robot wrote:
> Hi "Joel,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [cannot apply to v5.3-rc7 next-20190903]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/pci-Convert-to-use-built-in-RCU-list-checking/20190901-211013
> config: x86_64-rhel-7.6 (attached as .config)
> compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
This error seems bogus. I pulled -next and applied this patch and it builds
fine. I am not sure what is wrong with the 0day tree, and the above 0day link
is also dead.
What's going on with 0day ?!
thanks,
- Joel
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All error/warnings (new ones prefixed by >>):
>
> drivers/pci/controller/vmd.c: In function 'vmd_irq':
> >> drivers/pci/controller/vmd.c:722:37: error: macro "list_for_each_entry_rcu" passed 4 arguments, but takes just 3
> srcu_read_lock_held(&irqs->srcu))
> ^
> >> drivers/pci/controller/vmd.c:721:2: error: unknown type name 'list_for_each_entry_rcu'
> list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
> ^~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/pci/controller/vmd.c:723:28: error: expected ')' before '->' token
> generic_handle_irq(vmdirq->virq);
> ^~
> >> drivers/pci/controller/vmd.c:721:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
> list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/pci/controller/vmd.c:717:18: warning: unused variable 'vmdirq' [-Wunused-variable]
> struct vmd_irq *vmdirq;
> ^~~~~~
>
> vim +/list_for_each_entry_rcu +722 drivers/pci/controller/vmd.c
>
> 713
> 714 static irqreturn_t vmd_irq(int irq, void *data)
> 715 {
> 716 struct vmd_irq_list *irqs = data;
> 717 struct vmd_irq *vmdirq;
> 718 int idx;
> 719
> 720 idx = srcu_read_lock(&irqs->srcu);
> > 721 list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node,
> > 722 srcu_read_lock_held(&irqs->srcu))
> > 723 generic_handle_irq(vmdirq->virq);
> 724 srcu_read_unlock(&irqs->srcu, idx);
> 725
> 726 return IRQ_HANDLED;
> 727 }
> 728
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ipc/sem: Convert to use built-in RCU list checking
2019-08-30 23:18 ` [PATCH 2/2] ipc/sem: " Joel Fernandes (Google)
@ 2019-09-04 5:09 ` kbuild test robot
0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-09-04 5:09 UTC (permalink / raw)
To: Joel Fernandes (Google)
Cc: kbuild-all, linux-kernel, Joel Fernandes (Google),
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]
Hi "Joel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc7 next-20190903]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/pci-Convert-to-use-built-in-RCU-list-checking/20190901-211013
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
ipc/sem.c: In function '__lookup_undo':
>> ipc/sem.c:1856:31: error: macro "list_for_each_entry_rcu" passed 4 arguments, but takes just 3
spin_is_locked(&ulp->lock)) {
^
>> ipc/sem.c:1855:2: error: 'list_for_each_entry_rcu' undeclared (first use in this function); did you mean 'class_for_each_device'?
list_for_each_entry_rcu(un, &ulp->list_proc, list_proc,
^~~~~~~~~~~~~~~~~~~~~~~
class_for_each_device
ipc/sem.c:1855:2: note: each undeclared identifier is reported only once for each function it appears in
>> ipc/sem.c:1856:33: error: expected ';' before '{' token
spin_is_locked(&ulp->lock)) {
^
ipc/sem.c:1853:19: warning: unused variable 'un' [-Wunused-variable]
struct sem_undo *un;
^~
>> ipc/sem.c:1861:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
vim +/list_for_each_entry_rcu +1856 ipc/sem.c
1850
1851 static struct sem_undo *__lookup_undo(struct sem_undo_list *ulp, int semid)
1852 {
1853 struct sem_undo *un;
1854
> 1855 list_for_each_entry_rcu(un, &ulp->list_proc, list_proc,
> 1856 spin_is_locked(&ulp->lock)) {
1857 if (un->semid == semid)
1858 return un;
1859 }
1860 return NULL;
> 1861 }
1862
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48019 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] pci: Convert to use built-in RCU list checking
2019-09-04 5:04 ` Joel Fernandes
@ 2019-09-04 17:13 ` Andy Shevchenko
2019-09-04 18:01 ` Joel Fernandes
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2019-09-04 17:13 UTC (permalink / raw)
To: Joel Fernandes
Cc: kbuild test robot, kbuild-all, Linux Kernel Mailing List,
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
On Wed, Sep 4, 2019 at 8:07 AM Joel Fernandes <joel@joelfernandes.org> wrote:
>
> On Wed, Sep 04, 2019 at 12:06:43PM +0800, kbuild test robot wrote:
> > Hi "Joel,
> >
> > Thank you for the patch! Yet something to improve:
> >
> > [auto build test ERROR on linus/master]
> > [cannot apply to v5.3-rc7 next-20190903]
> > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> >
> > url: https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/pci-Convert-to-use-built-in-RCU-list-checking/20190901-211013
> > config: x86_64-rhel-7.6 (attached as .config)
> > compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
> > reproduce:
> > # save the attached .config to linux build tree
> > make ARCH=x86_64
>
> This error seems bogus. I pulled -next and applied this patch and it builds
> fine. I am not sure what is wrong with the 0day tree, and the above 0day link
> is also dead.
>
> What's going on with 0day ?!
I would rather to add Depends-on: ... tag to your patch if the
dependency is going thru another tree at the same cycle.
kbuildbot absolutely correct here.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] pci: Convert to use built-in RCU list checking
2019-09-04 17:13 ` Andy Shevchenko
@ 2019-09-04 18:01 ` Joel Fernandes
2019-09-04 19:36 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Joel Fernandes @ 2019-09-04 18:01 UTC (permalink / raw)
To: Andy Shevchenko
Cc: kbuild test robot, kbuild-all, Linux Kernel Mailing List,
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
On Wed, Sep 4, 2019 at 1:13 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, Sep 4, 2019 at 8:07 AM Joel Fernandes <joel@joelfernandes.org> wrote:
> >
> > On Wed, Sep 04, 2019 at 12:06:43PM +0800, kbuild test robot wrote:
> > > Hi "Joel,
> > >
> > > Thank you for the patch! Yet something to improve:
> > >
> > > [auto build test ERROR on linus/master]
> > > [cannot apply to v5.3-rc7 next-20190903]
> > > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> > >
> > > url: https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/pci-Convert-to-use-built-in-RCU-list-checking/20190901-211013
> > > config: x86_64-rhel-7.6 (attached as .config)
> > > compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
> > > reproduce:
> > > # save the attached .config to linux build tree
> > > make ARCH=x86_64
> >
> > This error seems bogus. I pulled -next and applied this patch and it builds
> > fine. I am not sure what is wrong with the 0day tree, and the above 0day link
> > is also dead.
> >
> > What's going on with 0day ?!
>
> I would rather to add Depends-on: ... tag to your patch if the
> dependency is going thru another tree at the same cycle.
> kbuildbot absolutely correct here.
The dependency is already in -next and I pulled it and applied the
patch. It is testing -next right?
thanks,
- Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] pci: Convert to use built-in RCU list checking
2019-09-04 18:01 ` Joel Fernandes
@ 2019-09-04 19:36 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2019-09-04 19:36 UTC (permalink / raw)
To: Joel Fernandes
Cc: kbuild test robot, kbuild-all, Linux Kernel Mailing List,
Andrew Morton, Arnd Bergmann, Bjorn Helgaas, Catalin Marinas,
Gustavo A. R. Silva, Jonathan Derrick, Keith Busch, linux-pci,
Lorenzo Pieralisi
On Wed, Sep 4, 2019 at 9:01 PM Joel Fernandes <joel@joelfernandes.org> wrote:
> On Wed, Sep 4, 2019 at 1:13 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Wed, Sep 4, 2019 at 8:07 AM Joel Fernandes <joel@joelfernandes.org> wrote:
> > > On Wed, Sep 04, 2019 at 12:06:43PM +0800, kbuild test robot wrote:
> > > > [auto build test ERROR on linus/master]
^^^ (1)
> > > > [cannot apply to v5.3-rc7 next-20190903]
^^^ (2)
> The dependency is already in -next and I pulled it and applied the
> patch.
This is a problem. You must provide dependency even for maintainers
(in form of immutable branch / tag).
The easier way to provide Depends-on (when it's one patch), though
kbuild bot doesn't support it. Yet?
> It is testing -next right?
It testing (1) and (2). (it was unable to apply against next by some
reason, but the build error is against latest vanilla failed. And this
is completely correct. Just follow the process (see above).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-09-04 19:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 23:18 [PATCH 1/2] pci: Convert to use built-in RCU list checking Joel Fernandes (Google)
2019-08-30 23:18 ` [PATCH 2/2] ipc/sem: " Joel Fernandes (Google)
2019-09-04 5:09 ` kbuild test robot
2019-09-04 4:06 ` [PATCH 1/2] pci: " kbuild test robot
2019-09-04 5:04 ` Joel Fernandes
2019-09-04 17:13 ` Andy Shevchenko
2019-09-04 18:01 ` Joel Fernandes
2019-09-04 19:36 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).