Skip to contentSkip to conversation

linux-next: build failure after merge of the rcu tree

PATCH Stephen Rothwell 2 participants 5 messages Dec 12, 2019 – Jan 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/misc/watch_queue.c: In function 'watch_queue_set_filter':
drivers/misc/watch_queue.c:526:2: error: implicit declaration of function 'rcu_swap_protected' [-Werror=implicit-function-declaration]

  526 |  rcu_swap_protected(wqueue->filter, wfilter,
      |  ^~~~~~~~~~~~~~~~~~

Caused by commit

af8c9224182e ("rcu: Remove rcu_swap_protected()")

interacting with commit

fe78d401ca6b ("General notification queue with user mmap()'able ring buffer")

from the keys tree.

I have added the following merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Dec 2019 13:37:52 +1100
Subject: [PATCH] rcu: fix up for "Remove rcu_swap_protected()"

---
 drivers/misc/watch_queue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/watch_queue.c +2 -2
index b3fc59b4ef6c..a4a77ec977ac 100644
@@ -523,8 +523,8 @@ static long watch_queue_set_filter(struct inode *inode,
 	kfree(tf);
 set:
 	inode_lock(inode);
-	rcu_swap_protected(wqueue->filter, wfilter,
-			   lockdep_is_held(&inode->i_rwsem));
+	wfilter = rcu_replace_pointer(wqueue->filter, wfilter,
+				      lockdep_is_held(&inode->i_rwsem));
 	inode_unlock(inode);
 	if (wfilter)
 		kfree_rcu(wfilter, rcu);
Signature · 5 lines
2.24.0

-- 
Cheers,
Stephen Rothwell
Reviewed-by
#1 lore raw
Quoted 20 lines · Stephen Rothwell

Hi all,

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/misc/watch_queue.c: In function 'watch_queue_set_filter':
drivers/misc/watch_queue.c:526:2: error: implicit declaration of function 'rcu_swap_protected' [-Werror=implicit-function-declaration]

  526 |  rcu_swap_protected(wqueue->filter, wfilter,
      |  ^~~~~~~~~~~~~~~~~~

Caused by commit

af8c9224182e ("rcu: Remove rcu_swap_protected()")

interacting with commit

fe78d401ca6b ("General notification queue with user mmap()'able ring buffer")

from the keys tree.

Quoted 7 lines

I have added the following merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Dec 2019 13:37:52 +1100
Subject: [PATCH] rcu: fix up for "Remove rcu_swap_protected()"

I would be happy to take this if desired, but it would probably be better for this to be applied directly to the keys tree. Either way, please let me know.

Thanx, Paul

Quoted 25 lines
---
 drivers/misc/watch_queue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/watch_queue.c +2 -2
index b3fc59b4ef6c..a4a77ec977ac 100644
@@ -523,8 +523,8 @@ static long watch_queue_set_filter(struct inode *inode,
 	kfree(tf);
 set:
 	inode_lock(inode);
-	rcu_swap_protected(wqueue->filter, wfilter,
-			   lockdep_is_held(&inode->i_rwsem));
+	wfilter = rcu_replace_pointer(wqueue->filter, wfilter,
+				      lockdep_is_held(&inode->i_rwsem));
 	inode_unlock(inode);
 	if (wfilter)
 		kfree_rcu(wfilter, rcu);
Signature · 5 lines
2.24.0

-- 
Cheers,
Stephen Rothwell
#2 lore raw

Hi Paul,

Quoted 24 lines · On Wed, 11 Dec 2019 20:07:37 -0800 "Paul E. McKenney" <[email protected]>…
Quoted 22 lines · Stephen Rothwell

Hi all,

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/misc/watch_queue.c: In function 'watch_queue_set_filter':
drivers/misc/watch_queue.c:526:2: error: implicit declaration of function 'rcu_swap_protected' [-Werror=implicit-function-declaration]

  526 |  rcu_swap_protected(wqueue->filter, wfilter,
      |  ^~~~~~~~~~~~~~~~~~

Caused by commit

af8c9224182e ("rcu: Remove rcu_swap_protected()")

interacting with commit

fe78d401ca6b ("General notification queue with user mmap()'able ring buffer")

from the keys tree.

I have added the following merge fix patch for today:

Quoted 7 lines
Quoted 5 lines

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Dec 2019 13:37:52 +1100
Subject: [PATCH] rcu: fix up for "Remove rcu_swap_protected()"

Thanks.

Quoted 3 lines

I would be happy to take this if desired, but it would probably be better for this to be applied directly to the keys tree. Either way, please let me know.

Well, you can't take this fix up without merging the keys tree ... and the keys tree is currently in flux so it should be easy for it to be applied there since rcu_replace_pointer() already exists in Linus' tree, right?.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 37 lines · Stephen Rothwell

Hi Paul,

Quoted 24 lines · On Wed, 11 Dec 2019 20:07:37 -0800 "Paul E. McKenney" <[email protected]>…
Quoted 22 lines · Stephen Rothwell

Hi all,

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/misc/watch_queue.c: In function 'watch_queue_set_filter':
drivers/misc/watch_queue.c:526:2: error: implicit declaration of function 'rcu_swap_protected' [-Werror=implicit-function-declaration]

  526 |  rcu_swap_protected(wqueue->filter, wfilter,
      |  ^~~~~~~~~~~~~~~~~~

Caused by commit

af8c9224182e ("rcu: Remove rcu_swap_protected()")

interacting with commit

fe78d401ca6b ("General notification queue with user mmap()'able ring buffer")

from the keys tree.

I have added the following merge fix patch for today:

Quoted 7 lines
Quoted 5 lines

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Dec 2019 13:37:52 +1100
Subject: [PATCH] rcu: fix up for "Remove rcu_swap_protected()"

Thanks.

Quoted 8 lines
Quoted 3 lines

I would be happy to take this if desired, but it would probably be better for this to be applied directly to the keys tree. Either way, please let me know.

Well, you can't take this fix up without merging the keys tree ... and the keys tree is currently in flux so it should be easy for it to be applied there since rcu_replace_pointer() already exists in Linus' tree, right?.

Yes, so sounds like a plan to me. ;-)

Thanx, Paul

#4 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 35 lines · On Thu, 12 Dec 2019 13:45:16 +1100 Stephen Rothwell <[email protected]>…

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/misc/watch_queue.c: In function 'watch_queue_set_filter':
drivers/misc/watch_queue.c:526:2: error: implicit declaration of function 'rcu_swap_protected' [-Werror=implicit-function-declaration]

  526 |  rcu_swap_protected(wqueue->filter, wfilter,
      |  ^~~~~~~~~~~~~~~~~~

Caused by commit

af8c9224182e ("rcu: Remove rcu_swap_protected()")

interacting with commit

fe78d401ca6b ("General notification queue with user mmap()'able ring buffer")

from the keys tree.

I have added the following merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Dec 2019 13:37:52 +1100
Subject: [PATCH] rcu: fix up for "Remove rcu_swap_protected()"

---
 drivers/misc/watch_queue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/watch_queue.c +0 -0
index b3fc59b4ef6c..a4a77ec977ac 100644

drivers/misc/watch_queue.c static long watch_queue_set_filter(struct inode *inode, · line 530

Quoted 10 lines
drivers/misc/watch_queue.c +2 -2
@@ -523,8 +523,8 @@ static long watch_queue_set_filter(struct inode *inode,
 	kfree(tf);
 set:
 	inode_lock(inode);
-	rcu_swap_protected(wqueue->filter, wfilter,
-			   lockdep_is_held(&inode->i_rwsem));
+	wfilter = rcu_replace_pointer(wqueue->filter, wfilter,
+				      lockdep_is_held(&inode->i_rwsem));
 	inode_unlock(inode);
 	if (wfilter)
 		kfree_rcu(wfilter, rcu);

This has bee replaced with this patch:

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Dec 2019 13:37:52 +1100
Subject: [PATCH] rcu: fix up for "Remove rcu_swap_protected()"

---
 kernel/watch_queue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/watch_queue.c +2 -2
index d48f422f391a..f195cbbbb3d3 100644
@@ -354,8 +354,8 @@ long watch_queue_set_filter(struct pipe_inode_info *pipe,
 	kfree(tf);
 set:
 	pipe_lock(pipe);
-	rcu_swap_protected(wqueue->filter, wfilter,
-			   lockdep_is_held(&pipe->mutex));
+	wfilter = rcu_replace_pointer(wqueue->filter, wfilter,
+				      lockdep_is_held(&pipe->mutex));
 	pipe_unlock(pipe);
 	if (wfilter)
 		kfree_rcu(wfilter, rcu);
Signature · 2 lines
Cheers,
Stephen Rothwell