All of lore.kernel.org
 help / color / mirror / Atom feed
* [bigeasy-staging:lockdep-nesting 7/12] include/linux/fs.h:1422:29: error: array type has incomplete element type 'struct percpu_rw_semaphore'
@ 2020-03-19  9:17 kbuild test robot
  2020-03-19  9:30 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 12+ messages in thread
From: kbuild test robot @ 2020-03-19  9:17 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/staging.git lockdep-nesting
head:   6fc4f4da69e0935e367236eea81e979b1a72c5b4
commit: 27e1b50f54aaaa88fd9b0040ce0d8285c584410e [7/12] rcuwait: Add @state argument to rcuwait_wait_event()
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 27e1b50f54aaaa88fd9b0040ce0d8285c584410e
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/huge_mm.h:8,
                    from include/linux/mm.h:567,
                    from arch/ia64/include/asm/uaccess.h:38,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:8,
                    from kernel/locking/percpu-rwsem.c:6:
>> include/linux/fs.h:1422:29: error: array type has incomplete element type 'struct percpu_rw_semaphore'
    1422 |  struct percpu_rw_semaphore rw_sem[SB_FREEZE_LEVELS];
         |                             ^~~~~~

vim +1422 include/linux/fs.h

5accdf82ba25ca Jan Kara      2012-06-12  1418  
5accdf82ba25ca Jan Kara      2012-06-12  1419  struct sb_writers {
5accdf82ba25ca Jan Kara      2012-06-12  1420  	int				frozen;		/* Is sb frozen? */
8129ed29644bf5 Oleg Nesterov 2015-08-11  1421  	wait_queue_head_t		wait_unfrozen;	/* for get_super_thawed() */
8129ed29644bf5 Oleg Nesterov 2015-08-11 @1422  	struct percpu_rw_semaphore	rw_sem[SB_FREEZE_LEVELS];
5accdf82ba25ca Jan Kara      2012-06-12  1423  };
5accdf82ba25ca Jan Kara      2012-06-12  1424  

:::::: The code at line 1422 was first introduced by commit
:::::: 8129ed29644bf56ed17ec1bbbeed5c568b43d6a0 change sb_writers to use percpu_rw_semaphore

:::::: TO: Oleg Nesterov <oleg@redhat.com>
:::::: CC: Oleg Nesterov <oleg@redhat.com>

---
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: 56555 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [patch V2 06/15] rcuwait: Add @state argument to rcuwait_wait_event()
@ 2020-03-18 20:43 Thomas Gleixner
  2020-03-20  9:48 ` [PATCH 0/5] Remove mm.h from arch/*/include/asm/uaccess.h Sebastian Andrzej Siewior
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2020-03-18 20:43 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Linus Torvalds, Ingo Molnar, Will Deacon,
	Paul E . McKenney, Joel Fernandes, Steven Rostedt, Randy Dunlap,
	Oleg Nesterov, Davidlohr Bueso, Sebastian Andrzej Siewior,
	Logan Gunthorpe, Kurt Schwemmer, Bjorn Helgaas, linux-pci,
	Felipe Balbi, Greg Kroah-Hartman, linux-usb, Kalle Valo,
	David S. Miller, linux-wireless, netdev, Michael Ellerman,
	Arnd Bergmann, linuxppc-dev

Extend rcuwait_wait_event() with a state variable so that it is not
restricted to UNINTERRUPTIBLE waits.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
---
 include/linux/rcuwait.h       |   12 ++++++++++--
 kernel/locking/percpu-rwsem.c |    2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

--- a/include/linux/rcuwait.h
+++ b/include/linux/rcuwait.h
@@ -3,6 +3,7 @@
 #define _LINUX_RCUWAIT_H_
 
 #include <linux/rcupdate.h>
+#include <linux/sched/signal.h>
 
 /*
  * rcuwait provides a way of blocking and waking up a single
@@ -30,23 +31,30 @@ extern void rcuwait_wake_up(struct rcuwa
  * The caller is responsible for locking around rcuwait_wait_event(),
  * such that writes to @task are properly serialized.
  */
-#define rcuwait_wait_event(w, condition)				\
+#define rcuwait_wait_event(w, condition, state)				\
 ({									\
+	int __ret = 0;							\
 	rcu_assign_pointer((w)->task, current);				\
 	for (;;) {							\
 		/*							\
 		 * Implicit barrier (A) pairs with (B) in		\
 		 * rcuwait_wake_up().					\
 		 */							\
-		set_current_state(TASK_UNINTERRUPTIBLE);		\
+		set_current_state(state);				\
 		if (condition)						\
 			break;						\
 									\
+		if (signal_pending_state(state, current)) {		\
+			__ret = -EINTR;					\
+			break;						\
+		}							\
+									\
 		schedule();						\
 	}								\
 									\
 	WRITE_ONCE((w)->task, NULL);					\
 	__set_current_state(TASK_RUNNING);				\
+	__ret;								\
 })
 
 #endif /* _LINUX_RCUWAIT_H_ */
--- a/kernel/locking/percpu-rwsem.c
+++ b/kernel/locking/percpu-rwsem.c
@@ -162,7 +162,7 @@ void percpu_down_write(struct percpu_rw_
 	 */
 
 	/* Wait for all now active readers to complete. */
-	rcuwait_wait_event(&sem->writer, readers_active_check(sem));
+	rcuwait_wait_event(&sem->writer, readers_active_check(sem), TASK_UNINTERRUPTIBLE);
 }
 EXPORT_SYMBOL_GPL(percpu_down_write);
 


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-03-20 10:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19  9:17 [bigeasy-staging:lockdep-nesting 7/12] include/linux/fs.h:1422:29: error: array type has incomplete element type 'struct percpu_rw_semaphore' kbuild test robot
2020-03-19  9:30 ` Sebastian Andrzej Siewior
2020-03-19 13:27   ` [PATCH 0/5] Remove mm.h from arch/*/include/asm/uaccess.h Sebastian Andrzej Siewior
2020-03-19 13:27     ` [PATCH 1/5] nds32: Remove mm.h from asm/uaccess.h Sebastian Andrzej Siewior
2020-03-19 13:27     ` [PATCH 2/5] csky: " Sebastian Andrzej Siewior
2020-03-19 13:27     ` [PATCH 3/5] hexagon: " Sebastian Andrzej Siewior
2020-03-19 13:27     ` [PATCH 4/5] ia64: " Sebastian Andrzej Siewior
2020-03-19 13:31       ` [PATCH 4/5 v2] " Sebastian Andrzej Siewior
2020-03-19 13:27     ` [PATCH 5/5] microblaze: " Sebastian Andrzej Siewior
  -- strict thread matches above, loose matches on Subject: below --
2020-03-18 20:43 [patch V2 06/15] rcuwait: Add @state argument to rcuwait_wait_event() Thomas Gleixner
2020-03-20  9:48 ` [PATCH 0/5] Remove mm.h from arch/*/include/asm/uaccess.h Sebastian Andrzej Siewior
2020-03-20  9:48   ` [PATCH 4/5] ia64: Remove mm.h from asm/uaccess.h Sebastian Andrzej Siewior
2020-03-20  9:48     ` Sebastian Andrzej Siewior
2020-03-20  9:48     ` Sebastian Andrzej Siewior

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.