* [patch-rt] drivers/zram: pass num_pages to zram_meta_init_table_locks()
2017-10-17 15:29 [ANNOUNCE] v4.13.7-rt1 Sebastian Andrzej Siewior
@ 2017-10-19 4:27 ` Mike Galbraith
2017-10-27 14:59 ` Sebastian Andrzej Siewior
2017-10-27 16:39 ` [ANNOUNCE] v4.13.7-rt1 Sebastian Andrzej Siewior
1 sibling, 1 reply; 4+ messages in thread
From: Mike Galbraith @ 2017-10-19 4:27 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, Thomas Gleixner
Cc: LKML, linux-rt-users, Steven Rostedt
zram cleanup forgot to adjust passed argument when changing
zram_meta_init_table_locks() to expect page count instead
of disk size. Doing so fixes ltp inspired explosions.
Signed-off-by: Mike Galbraith <efault@gmx.de>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -819,7 +819,7 @@ static bool zram_meta_alloc(struct zram
return false;
}
- zram_meta_init_table_locks(zram, disksize);
+ zram_meta_init_table_locks(zram, num_pages);
return true;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ANNOUNCE] v4.13.7-rt1
2017-10-17 15:29 [ANNOUNCE] v4.13.7-rt1 Sebastian Andrzej Siewior
2017-10-19 4:27 ` [patch-rt] drivers/zram: pass num_pages to zram_meta_init_table_locks() Mike Galbraith
@ 2017-10-27 16:39 ` Sebastian Andrzej Siewior
1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-10-27 16:39 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, linux-rt-users, Steven Rostedt
On 2017-10-17 17:29:52 [+0200], To Thomas Gleixner wrote:
> I'm pleased to announce the v4.13.7-rt1 patch set.
The SRCU_NOTIFIER_HEAD macro does not compile with SRCU-TINY and is only
used by the crypto code. It does not compile because the tiny
implementation does not define the "srcu_data" data type.
The following fixes it and I'm going to merge it into the original
patch (since it only affects rt1).
Reported by kbuild test robot.
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index e9515066250e..49bef3e96eb2 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -119,12 +119,20 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
struct raw_notifier_head name = \
RAW_NOTIFIER_INIT(name)
+#ifdef CONFIG_TREE_SRCU
#define _SRCU_NOTIFIER_HEAD(name, mod) \
static DEFINE_PER_CPU(struct srcu_data, \
name##_head_srcu_data); \
mod struct srcu_notifier_head name = \
SRCU_NOTIFIER_INIT(name, name##_head_srcu_data)
+#else
+#define _SRCU_NOTIFIER_HEAD(name, mod) \
+ mod struct srcu_notifier_head name = \
+ SRCU_NOTIFIER_INIT(name, name)
+
+#endif
+
#define SRCU_NOTIFIER_HEAD(name) \
_SRCU_NOTIFIER_HEAD(name, )
diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
index cfbfc540cafc..1bdcbdd3317c 100644
--- a/include/linux/srcutiny.h
+++ b/include/linux/srcutiny.h
@@ -43,7 +43,7 @@ struct srcu_struct {
void srcu_drive_gp(struct work_struct *wp);
-#define __SRCU_STRUCT_INIT(name) \
+#define __SRCU_STRUCT_INIT(name, __ignored) \
{ \
.srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \
.srcu_cb_tail = &name.srcu_cb_head, \
@@ -56,9 +56,9 @@ void srcu_drive_gp(struct work_struct *wp);
* Tree SRCU, which needs some per-CPU data.
*/
#define DEFINE_SRCU(name) \
- struct srcu_struct name = __SRCU_STRUCT_INIT(name)
+ struct srcu_struct name = __SRCU_STRUCT_INIT(name, name)
#define DEFINE_STATIC_SRCU(name) \
- static struct srcu_struct name = __SRCU_STRUCT_INIT(name)
+ static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name)
void synchronize_srcu(struct srcu_struct *sp);
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread