blob: f18974d50494d1249a35f12244e36b38f13f7cae [file] [log] [blame]
Subject: locking-various-init-fixes.patch
From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 17 Jul 2011 21:25:03 +0200
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/char/random.c | 6 +++---
drivers/usb/chipidea/debug.c | 2 +-
fs/file.c | 2 +-
include/linux/idr.h | 2 +-
kernel/cred.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
Index: linux-stable/drivers/char/random.c
===================================================================
--- linux-stable.orig/drivers/char/random.c
+++ linux-stable/drivers/char/random.c
@@ -448,7 +448,7 @@ static struct entropy_store input_pool =
.poolinfo = &poolinfo_table[0],
.name = "input",
.limit = 1,
- .lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(input_pool.lock),
.pool = input_pool_data
};
@@ -457,7 +457,7 @@ static struct entropy_store blocking_poo
.name = "blocking",
.limit = 1,
.pull = &input_pool,
- .lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(blocking_pool.lock),
.pool = blocking_pool_data
};
@@ -465,7 +465,7 @@ static struct entropy_store nonblocking_
.poolinfo = &poolinfo_table[1],
.name = "nonblocking",
.pull = &input_pool,
- .lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(nonblocking_pool.lock),
.pool = nonblocking_pool_data
};
Index: linux-stable/drivers/usb/chipidea/debug.c
===================================================================
--- linux-stable.orig/drivers/usb/chipidea/debug.c
+++ linux-stable/drivers/usb/chipidea/debug.c
@@ -225,7 +225,7 @@ static struct {
} dbg_data = {
.idx = 0,
.tty = 0,
- .lck = __RW_LOCK_UNLOCKED(lck)
+ .lck = __RW_LOCK_UNLOCKED(dbg_data.lck)
};
/**
Index: linux-stable/fs/file.c
===================================================================
--- linux-stable.orig/fs/file.c
+++ linux-stable/fs/file.c
@@ -421,7 +421,7 @@ struct files_struct init_files = {
.close_on_exec = init_files.close_on_exec_init,
.open_fds = init_files.open_fds_init,
},
- .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock),
+ .file_lock = __SPIN_LOCK_UNLOCKED(init_files.file_lock),
};
/*
Index: linux-stable/include/linux/idr.h
===================================================================
--- linux-stable.orig/include/linux/idr.h
+++ linux-stable/include/linux/idr.h
@@ -136,7 +136,7 @@ struct ida {
struct ida_bitmap *free_bitmap;
};
-#define IDA_INIT(name) { .idr = IDR_INIT(name), .free_bitmap = NULL, }
+#define IDA_INIT(name) { .idr = IDR_INIT((name).idr), .free_bitmap = NULL, }
#define DEFINE_IDA(name) struct ida name = IDA_INIT(name)
int ida_pre_get(struct ida *ida, gfp_t gfp_mask);
Index: linux-stable/kernel/cred.c
===================================================================
--- linux-stable.orig/kernel/cred.c
+++ linux-stable/kernel/cred.c
@@ -36,7 +36,7 @@ static struct kmem_cache *cred_jar;
static struct thread_group_cred init_tgcred = {
.usage = ATOMIC_INIT(2),
.tgid = 0,
- .lock = __SPIN_LOCK_UNLOCKED(init_cred.tgcred.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(init_tgcred.lock),
};
#endif