* [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs"
2015-06-30 13:35 [patch added to the 3.12 stable tree] ath3k: Add support of 0489:e076 AR3012 device Jiri Slaby
@ 2015-06-30 13:36 ` Jiri Slaby
0 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-06-30 13:36 UTC (permalink / raw)
To: stable
Cc: Christoph Hellwig, Christoph Hellwig, Jan Kara, Jens Axboe,
Andrew Morton, Linus Torvalds, Jiri Slaby
From: Christoph Hellwig <hch@infradead.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit fc21c0cff2f425891b28ff6fb6b03b325c977428 upstream.
This commit was incomplete in that code to remove items from the per-cpu
lists was missing and never acquired a user in the 5 years it has been in
the tree. We're going to implement what it seems to try to archive in a
simpler way, and this code is in the way of doing so.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
include/linux/interrupt.h | 22 --------
kernel/softirq.c | 131 ----------------------------------------------
2 files changed, 153 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 623ab2d787d9..2778d389a6ce 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -11,8 +11,6 @@
#include <linux/irqnr.h>
#include <linux/hardirq.h>
#include <linux/irqflags.h>
-#include <linux/smp.h>
-#include <linux/percpu.h>
#include <linux/hrtimer.h>
#include <linux/kref.h>
#include <linux/workqueue.h>
@@ -419,15 +417,6 @@ extern void __raise_softirq_irqoff(unsigned int nr);
extern void raise_softirq_irqoff(unsigned int nr);
extern void raise_softirq(unsigned int nr);
-/* This is the worklist that queues up per-cpu softirq work.
- *
- * send_remote_sendirq() adds work to these lists, and
- * the softirq handler itself dequeues from them. The queues
- * are protected by disabling local cpu interrupts and they must
- * only be accessed by the local cpu that they are for.
- */
-DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
-
DECLARE_PER_CPU(struct task_struct *, ksoftirqd);
static inline struct task_struct *this_cpu_ksoftirqd(void)
@@ -435,17 +424,6 @@ static inline struct task_struct *this_cpu_ksoftirqd(void)
return this_cpu_read(ksoftirqd);
}
-/* Try to send a softirq to a remote cpu. If this cannot be done, the
- * work will be queued to the local cpu.
- */
-extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq);
-
-/* Like send_remote_softirq(), but the caller must disable local cpu interrupts
- * and compute the current cpu, passed in as 'this_cpu'.
- */
-extern void __send_remote_softirq(struct call_single_data *cp, int cpu,
- int this_cpu, int softirq);
-
/* Tasklets --- multithreaded analogue of BHs.
Main feature differing them of generic softirqs: tasklet
diff --git a/kernel/softirq.c b/kernel/softirq.c
index b331c8756543..cdd2c3c4df74 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -6,8 +6,6 @@
* Distribute under GPLv2.
*
* Rewritten. Old one was good in 2.2, but in 2.3 it was immoral. --ANK (990903)
- *
- * Remote softirq infrastructure is by Jens Axboe.
*/
#include <linux/export.h>
@@ -618,146 +616,17 @@ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
}
EXPORT_SYMBOL_GPL(tasklet_hrtimer_init);
-/*
- * Remote softirq bits
- */
-
-DEFINE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
-EXPORT_PER_CPU_SYMBOL(softirq_work_list);
-
-static void __local_trigger(struct call_single_data *cp, int softirq)
-{
- struct list_head *head = &__get_cpu_var(softirq_work_list[softirq]);
-
- list_add_tail(&cp->list, head);
-
- /* Trigger the softirq only if the list was previously empty. */
- if (head->next == &cp->list)
- raise_softirq_irqoff(softirq);
-}
-
-#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
-static void remote_softirq_receive(void *data)
-{
- struct call_single_data *cp = data;
- unsigned long flags;
- int softirq;
-
- softirq = *(int *)cp->info;
- local_irq_save(flags);
- __local_trigger(cp, softirq);
- local_irq_restore(flags);
-}
-
-static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
-{
- if (cpu_online(cpu)) {
- cp->func = remote_softirq_receive;
- cp->info = &softirq;
- cp->flags = 0;
-
- __smp_call_function_single(cpu, cp, 0);
- return 0;
- }
- return 1;
-}
-#else /* CONFIG_USE_GENERIC_SMP_HELPERS */
-static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
-{
- return 1;
-}
-#endif
-
-/**
- * __send_remote_softirq - try to schedule softirq work on a remote cpu
- * @cp: private SMP call function data area
- * @cpu: the remote cpu
- * @this_cpu: the currently executing cpu
- * @softirq: the softirq for the work
- *
- * Attempt to schedule softirq work on a remote cpu. If this cannot be
- * done, the work is instead queued up on the local cpu.
- *
- * Interrupts must be disabled.
- */
-void __send_remote_softirq(struct call_single_data *cp, int cpu, int this_cpu, int softirq)
-{
- if (cpu == this_cpu || __try_remote_softirq(cp, cpu, softirq))
- __local_trigger(cp, softirq);
-}
-EXPORT_SYMBOL(__send_remote_softirq);
-
-/**
- * send_remote_softirq - try to schedule softirq work on a remote cpu
- * @cp: private SMP call function data area
- * @cpu: the remote cpu
- * @softirq: the softirq for the work
- *
- * Like __send_remote_softirq except that disabling interrupts and
- * computing the current cpu is done for the caller.
- */
-void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
-{
- unsigned long flags;
- int this_cpu;
-
- local_irq_save(flags);
- this_cpu = smp_processor_id();
- __send_remote_softirq(cp, cpu, this_cpu, softirq);
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(send_remote_softirq);
-
-static int remote_softirq_cpu_notify(struct notifier_block *self,
- unsigned long action, void *hcpu)
-{
- /*
- * If a CPU goes away, splice its entries to the current CPU
- * and trigger a run of the softirq
- */
- if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
- int cpu = (unsigned long) hcpu;
- int i;
-
- local_irq_disable();
- for (i = 0; i < NR_SOFTIRQS; i++) {
- struct list_head *head = &per_cpu(softirq_work_list[i], cpu);
- struct list_head *local_head;
-
- if (list_empty(head))
- continue;
-
- local_head = &__get_cpu_var(softirq_work_list[i]);
- list_splice_init(head, local_head);
- raise_softirq_irqoff(i);
- }
- local_irq_enable();
- }
-
- return NOTIFY_OK;
-}
-
-static struct notifier_block remote_softirq_cpu_notifier = {
- .notifier_call = remote_softirq_cpu_notify,
-};
-
void __init softirq_init(void)
{
int cpu;
for_each_possible_cpu(cpu) {
- int i;
-
per_cpu(tasklet_vec, cpu).tail =
&per_cpu(tasklet_vec, cpu).head;
per_cpu(tasklet_hi_vec, cpu).tail =
&per_cpu(tasklet_hi_vec, cpu).head;
- for (i = 0; i < NR_SOFTIRQS; i++)
- INIT_LIST_HEAD(&per_cpu(softirq_work_list[i], cpu));
}
- register_hotcpu_notifier(&remote_softirq_cpu_notifier);
-
open_softirq(TASKLET_SOFTIRQ, tasklet_action);
open_softirq(HI_SOFTIRQ, tasklet_hi_action);
}
--
2.4.3
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings
@ 2015-07-27 8:01 Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] Btrfs: make xattr replace operations atomic Jiri Slaby
` (47 more replies)
0 siblings, 48 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Chen Gang, Pablo Neira Ayuso
From: Chen Gang <gang.chen.5i5j@gmail.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit b18c5d15e8714336365d9d51782d5b53afa0443c upstream.
The related code can be simplified, and also can avoid related warnings
(with allmodconfig under parisc):
CC [M] net/netfilter/nfnetlink_cthelper.o
net/netfilter/nfnetlink_cthelper.c: In function ‘nfnl_cthelper_from_nlattr’:
net/netfilter/nfnetlink_cthelper.c:97:9: warning: passing argument 1 o ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
memcpy(&help->data, nla_data(attr), help->helper->data_len);
^
In file included from include/linux/string.h:17:0,
from include/uapi/linux/uuid.h:25,
from include/linux/uuid.h:23,
from include/linux/mod_devicetable.h:12,
from ./arch/parisc/include/asm/hardware.h:4,
from ./arch/parisc/include/asm/processor.h:15,
from ./arch/parisc/include/asm/spinlock.h:6,
from ./arch/parisc/include/asm/atomic.h:21,
from include/linux/atomic.h:4,
from ./arch/parisc/include/asm/bitops.h:12,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/module.h:9,
from net/netfilter/nfnetlink_cthelper.c:11:
./arch/parisc/include/asm/string.h:8:8: note: expected ‘void *’ but argument is of type ‘const char (*)[]’
void * memcpy(void * dest,const void *src,size_t count);
^
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@soleta.eu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/netfilter/nfnetlink_cthelper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index 7f035f0772ee..54330fb5efaf 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -89,7 +89,7 @@ nfnl_cthelper_parse_tuple(struct nf_conntrack_tuple *tuple,
static int
nfnl_cthelper_from_nlattr(struct nlattr *attr, struct nf_conn *ct)
{
- const struct nf_conn_help *help = nfct_help(ct);
+ struct nf_conn_help *help = nfct_help(ct);
if (attr == NULL)
return -EINVAL;
@@ -97,7 +97,7 @@ nfnl_cthelper_from_nlattr(struct nlattr *attr, struct nf_conn *ct)
if (help->helper->data_len == 0)
return -EINVAL;
- memcpy(&help->data, nla_data(attr), help->helper->data_len);
+ memcpy(help->data, nla_data(attr), help->helper->data_len);
return 0;
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] Btrfs: make xattr replace operations atomic
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] ARM: clk-imx6q: refine sata's parent Jiri Slaby
` (46 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Chris Mason, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339 upstream.
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the xattr. Xattrs are used to store ACLs,
so this has security implications.
This change also fixes 2 other existing issues which were:
*) Deleting the old xattr value without verifying first if the new xattr will
fit in the existing leaf item (in case multiple xattrs are packed in the
same item due to name hash collision);
*) Returning -EEXIST when the flag XATTR_CREATE is given and the xattr doesn't
exist but we have have an existing item that packs muliple xattrs with
the same name hash as the input xattr. In this case we should return ENOSPC.
A test case for xfstests follows soon.
Thanks to Alexandre Oliva for reporting the non-atomicity of the xattr replace
implementation.
Reported-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
fs/btrfs/ctree.c | 2 +-
fs/btrfs/ctree.h | 5 ++
fs/btrfs/dir-item.c | 10 ++--
fs/btrfs/xattr.c | 150 ++++++++++++++++++++++++++++++++--------------------
4 files changed, 102 insertions(+), 65 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index c1123ecde6c9..56dea84ca2fc 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -2926,7 +2926,7 @@ done:
*/
if (!p->leave_spinning)
btrfs_set_path_blocking(p);
- if (ret < 0)
+ if (ret < 0 && !p->skip_release_on_error)
btrfs_release_path(p);
return ret;
}
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 0506f40ede83..908f7cf80b85 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -591,6 +591,7 @@ struct btrfs_path {
unsigned int skip_locking:1;
unsigned int leave_spinning:1;
unsigned int search_commit_root:1;
+ unsigned int skip_release_on_error:1;
};
/*
@@ -3546,6 +3547,10 @@ struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans,
int verify_dir_item(struct btrfs_root *root,
struct extent_buffer *leaf,
struct btrfs_dir_item *dir_item);
+struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root,
+ struct btrfs_path *path,
+ const char *name,
+ int name_len);
/* orphan.c */
int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index 79e594e341c7..6f61b9b1526f 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -21,10 +21,6 @@
#include "hash.h"
#include "transaction.h"
-static struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root,
- struct btrfs_path *path,
- const char *name, int name_len);
-
/*
* insert a name into a directory, doing overflow properly if there is a hash
* collision. data_size indicates how big the item inserted should be. On
@@ -383,9 +379,9 @@ struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans,
* this walks through all the entries in a dir item and finds one
* for a specific name.
*/
-static struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root,
- struct btrfs_path *path,
- const char *name, int name_len)
+struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root,
+ struct btrfs_path *path,
+ const char *name, int name_len)
{
struct btrfs_dir_item *dir_item;
unsigned long name_ptr;
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 7e21b2b3fcf2..7c4eb9254456 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -27,6 +27,7 @@
#include "transaction.h"
#include "xattr.h"
#include "disk-io.h"
+#include "locking.h"
ssize_t __btrfs_getxattr(struct inode *inode, const char *name,
@@ -89,7 +90,7 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
struct inode *inode, const char *name,
const void *value, size_t size, int flags)
{
- struct btrfs_dir_item *di;
+ struct btrfs_dir_item *di = NULL;
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_path *path;
size_t name_len = strlen(name);
@@ -101,84 +102,119 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
+ path->skip_release_on_error = 1;
+
+ if (!value) {
+ di = btrfs_lookup_xattr(trans, root, path, btrfs_ino(inode),
+ name, name_len, -1);
+ if (!di && (flags & XATTR_REPLACE))
+ ret = -ENODATA;
+ else if (di)
+ ret = btrfs_delete_one_dir_name(trans, root, path, di);
+ goto out;
+ }
+ /*
+ * For a replace we can't just do the insert blindly.
+ * Do a lookup first (read-only btrfs_search_slot), and return if xattr
+ * doesn't exist. If it exists, fall down below to the insert/replace
+ * path - we can't race with a concurrent xattr delete, because the VFS
+ * locks the inode's i_mutex before calling setxattr or removexattr.
+ */
if (flags & XATTR_REPLACE) {
- di = btrfs_lookup_xattr(trans, root, path, btrfs_ino(inode), name,
- name_len, -1);
- if (IS_ERR(di)) {
- ret = PTR_ERR(di);
- goto out;
- } else if (!di) {
+ ASSERT(mutex_is_locked(&inode->i_mutex));
+ di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(inode),
+ name, name_len, 0);
+ if (!di) {
ret = -ENODATA;
goto out;
}
- ret = btrfs_delete_one_dir_name(trans, root, path, di);
- if (ret)
- goto out;
btrfs_release_path(path);
+ di = NULL;
+ }
+ ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(inode),
+ name, name_len, value, size);
+ if (ret == -EOVERFLOW) {
/*
- * remove the attribute
+ * We have an existing item in a leaf, split_leaf couldn't
+ * expand it. That item might have or not a dir_item that
+ * matches our target xattr, so lets check.
*/
- if (!value)
- goto out;
- } else {
- di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(inode),
- name, name_len, 0);
- if (IS_ERR(di)) {
- ret = PTR_ERR(di);
+ ret = 0;
+ btrfs_assert_tree_locked(path->nodes[0]);
+ di = btrfs_match_dir_item_name(root, path, name, name_len);
+ if (!di && !(flags & XATTR_REPLACE)) {
+ ret = -ENOSPC;
goto out;
}
- if (!di && !value)
- goto out;
- btrfs_release_path(path);
+ } else if (ret == -EEXIST) {
+ ret = 0;
+ di = btrfs_match_dir_item_name(root, path, name, name_len);
+ ASSERT(di); /* logic error */
+ } else if (ret) {
+ goto out;
}
-again:
- ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(inode),
- name, name_len, value, size);
- /*
- * If we're setting an xattr to a new value but the new value is say
- * exactly BTRFS_MAX_XATTR_SIZE, we could end up with EOVERFLOW getting
- * back from split_leaf. This is because it thinks we'll be extending
- * the existing item size, but we're asking for enough space to add the
- * item itself. So if we get EOVERFLOW just set ret to EEXIST and let
- * the rest of the function figure it out.
- */
- if (ret == -EOVERFLOW)
+ if (di && (flags & XATTR_CREATE)) {
ret = -EEXIST;
+ goto out;
+ }
- if (ret == -EEXIST) {
- if (flags & XATTR_CREATE)
- goto out;
+ if (di) {
/*
- * We can't use the path we already have since we won't have the
- * proper locking for a delete, so release the path and
- * re-lookup to delete the thing.
+ * We're doing a replace, and it must be atomic, that is, at
+ * any point in time we have either the old or the new xattr
+ * value in the tree. We don't want readers (getxattr and
+ * listxattrs) to miss a value, this is specially important
+ * for ACLs.
*/
- btrfs_release_path(path);
- di = btrfs_lookup_xattr(trans, root, path, btrfs_ino(inode),
- name, name_len, -1);
- if (IS_ERR(di)) {
- ret = PTR_ERR(di);
- goto out;
- } else if (!di) {
- /* Shouldn't happen but just in case... */
- btrfs_release_path(path);
- goto again;
+ const int slot = path->slots[0];
+ struct extent_buffer *leaf = path->nodes[0];
+ const u16 old_data_len = btrfs_dir_data_len(leaf, di);
+ const u32 item_size = btrfs_item_size_nr(leaf, slot);
+ const u32 data_size = sizeof(*di) + name_len + size;
+ struct btrfs_item *item;
+ unsigned long data_ptr;
+ char *ptr;
+
+ if (size > old_data_len) {
+ if (btrfs_leaf_free_space(root, leaf) <
+ (size - old_data_len)) {
+ ret = -ENOSPC;
+ goto out;
+ }
}
- ret = btrfs_delete_one_dir_name(trans, root, path, di);
- if (ret)
- goto out;
+ if (old_data_len + name_len + sizeof(*di) == item_size) {
+ /* No other xattrs packed in the same leaf item. */
+ if (size > old_data_len)
+ btrfs_extend_item(root, path,
+ size - old_data_len);
+ else if (size < old_data_len)
+ btrfs_truncate_item(root, path, data_size, 1);
+ } else {
+ /* There are other xattrs packed in the same item. */
+ ret = btrfs_delete_one_dir_name(trans, root, path, di);
+ if (ret)
+ goto out;
+ btrfs_extend_item(root, path, data_size);
+ }
+ item = btrfs_item_nr(NULL, slot);
+ ptr = btrfs_item_ptr(leaf, slot, char);
+ ptr += btrfs_item_size(leaf, item) - data_size;
+ di = (struct btrfs_dir_item *)ptr;
+ btrfs_set_dir_data_len(leaf, di, size);
+ data_ptr = ((unsigned long)(di + 1)) + name_len;
+ write_extent_buffer(leaf, value, data_ptr, size);
+ btrfs_mark_buffer_dirty(leaf);
+ } else {
/*
- * We have a value to set, so go back and try to insert it now.
+ * Insert, and we had space for the xattr, so path->slots[0] is
+ * where our xattr dir_item is and btrfs_insert_xattr_item()
+ * filled it.
*/
- if (value) {
- btrfs_release_path(path);
- goto again;
- }
}
out:
btrfs_free_path(path);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] ARM: clk-imx6q: refine sata's parent
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] Btrfs: make xattr replace operations atomic Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] KVM: nSVM: Check for NRIPS support before updating control field Jiri Slaby
` (45 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Sebastien Szymanski, Shawn Guo, Dirk Behme, Jiri Slaby
From: Sebastien Szymanski <sebastien.szymanski@armadeus.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit da946aeaeadcd24ff0cda9984c6fb8ed2bfd462a upstream.
According to IMX6D/Q RM, table 18-3, sata clock's parent is ahb, not ipg.
Signed-off-by: Sebastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[dirk.behme: Adjust moved file]
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arm/mach-imx/clk-imx6q.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 2eed3cf8a36f..3c5b4eeb98e5 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -535,7 +535,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28);
clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30);
clk[rom] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0);
- clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4);
+ clk[sata] = imx_clk_gate2("sata", "ahb", base + 0x7c, 4);
clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6);
clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12);
clk[spdif] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] KVM: nSVM: Check for NRIPS support before updating control field
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] Btrfs: make xattr replace operations atomic Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] ARM: clk-imx6q: refine sata's parent Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] xfrm: release dst_orig in case of error in xfrm_lookup() Jiri Slaby
` (44 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Bandan Das, Paolo Bonzini, Jiri Slaby
From: Bandan Das <bsd@redhat.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit f104765b4f81fd74d69e0eb161e89096deade2db upstream.
If hardware doesn't support DecodeAssist - a feature that provides
more information about the intercept in the VMCB, KVM decodes the
instruction and then updates the next_rip vmcb control field.
However, NRIP support itself depends on cpuid Fn8000_000A_EDX[NRIPS].
Since skip_emulated_instruction() doesn't verify nrip support
before accepting control.next_rip as valid, avoid writing this
field if support isn't present.
Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/x86/kvm/svm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 5dcdff58b679..2996635196d3 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -495,8 +495,10 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
- if (svm->vmcb->control.next_rip != 0)
+ if (svm->vmcb->control.next_rip != 0) {
+ WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS));
svm->next_rip = svm->vmcb->control.next_rip;
+ }
if (!svm->next_rip) {
if (emulate_instruction(vcpu, EMULTYPE_SKIP) !=
@@ -4237,7 +4239,9 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,
break;
}
- vmcb->control.next_rip = info->next_rip;
+ /* TODO: Advertise NRIPS to guest hypervisor unconditionally */
+ if (static_cpu_has(X86_FEATURE_NRIPS))
+ vmcb->control.next_rip = info->next_rip;
vmcb->control.exit_code = icpt_info.exit_code;
vmexit = nested_svm_exit_handled(svm);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] xfrm: release dst_orig in case of error in xfrm_lookup()
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (2 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] KVM: nSVM: Check for NRIPS support before updating control field Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] uninline destroy_super(), consolidate alloc_super() Jiri Slaby
` (43 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: huaibin Wang, Nicolas Dichtel, Steffen Klassert
From: huaibin Wang <huaibin.wang@6wind.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit ac37e2515c1a89c477459a2020b6bfdedabdb91b upstream.
dst_orig should be released on error. Function like __xfrm_route_forward()
expects that behavior.
Since a recent commit, xfrm_lookup() may also be called by xfrm_lookup_route(),
which expects the opposite.
Let's introduce a new flag (XFRM_LOOKUP_KEEP_DST_REF) to tell what should be
done in case of error.
Fixes: f92ee61982d("xfrm: Generate blackhole routes only from route lookup functions")
Signed-off-by: huaibin Wang <huaibin.wang@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
include/net/dst.h | 1 +
net/xfrm/xfrm_policy.c | 12 ++++++------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index 9c123761efc1..30cd2f9cd1dd 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -469,6 +469,7 @@ extern void dst_init(void);
enum {
XFRM_LOOKUP_ICMP = 1 << 0,
XFRM_LOOKUP_QUEUE = 1 << 1,
+ XFRM_LOOKUP_KEEP_DST_REF = 1 << 2,
};
struct flowi;
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 6b07a5913383..57674ddc683d 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2154,11 +2154,9 @@ restart:
* have the xfrm_state's. We need to wait for KM to
* negotiate new SA's or bail out with error.*/
if (net->xfrm.sysctl_larval_drop) {
- dst_release(dst);
- xfrm_pols_put(pols, drop_pols);
XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
-
- return ERR_PTR(-EREMOTE);
+ err = -EREMOTE;
+ goto error;
}
if (fl->flowi_flags & FLOWI_FLAG_CAN_SLEEP) {
DECLARE_WAITQUEUE(wait, current);
@@ -2224,7 +2222,8 @@ nopol:
error:
dst_release(dst);
dropdst:
- dst_release(dst_orig);
+ if (!(flags & XFRM_LOOKUP_KEEP_DST_REF))
+ dst_release(dst_orig);
xfrm_pols_put(pols, drop_pols);
return ERR_PTR(err);
}
@@ -2238,7 +2237,8 @@ struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig,
struct sock *sk, int flags)
{
struct dst_entry *dst = xfrm_lookup(net, dst_orig, fl, sk,
- flags | XFRM_LOOKUP_QUEUE);
+ flags | XFRM_LOOKUP_QUEUE |
+ XFRM_LOOKUP_KEEP_DST_REF);
if (IS_ERR(dst) && PTR_ERR(dst) == -EREMOTE)
return make_blackhole(net, dst_orig->ops->family, dst_orig);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] uninline destroy_super(), consolidate alloc_super()
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (3 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] xfrm: release dst_orig in case of error in xfrm_lookup() Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] get rid of s_files and files_lock Jiri Slaby
` (42 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Al Viro
From: Al Viro <viro@zeniv.linux.org.uk>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 7eb5e8826911f2792179f99e77e75fbb7ef53a4a upstream.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
fs/super.c | 206 ++++++++++++++++++++++++++-----------------------------------
1 file changed, 86 insertions(+), 120 deletions(-)
diff --git a/fs/super.c b/fs/super.c
index 3e39572b2f51..59c6983682b2 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -135,33 +135,27 @@ static unsigned long super_cache_count(struct shrinker *shrink,
return total_objects;
}
-static int init_sb_writers(struct super_block *s, struct file_system_type *type)
-{
- int err;
- int i;
-
- for (i = 0; i < SB_FREEZE_LEVELS; i++) {
- err = percpu_counter_init(&s->s_writers.counter[i], 0);
- if (err < 0)
- goto err_out;
- lockdep_init_map(&s->s_writers.lock_map[i], sb_writers_name[i],
- &type->s_writers_key[i], 0);
- }
- init_waitqueue_head(&s->s_writers.wait);
- init_waitqueue_head(&s->s_writers.wait_unfrozen);
- return 0;
-err_out:
- while (--i >= 0)
- percpu_counter_destroy(&s->s_writers.counter[i]);
- return err;
-}
-
-static void destroy_sb_writers(struct super_block *s)
+/**
+ * destroy_super - frees a superblock
+ * @s: superblock to free
+ *
+ * Frees a superblock.
+ */
+static void destroy_super(struct super_block *s)
{
int i;
-
+ list_lru_destroy(&s->s_dentry_lru);
+ list_lru_destroy(&s->s_inode_lru);
+#ifdef CONFIG_SMP
+ free_percpu(s->s_files);
+#endif
for (i = 0; i < SB_FREEZE_LEVELS; i++)
percpu_counter_destroy(&s->s_writers.counter[i]);
+ security_sb_free(s);
+ WARN_ON(!list_empty(&s->s_mounts));
+ kfree(s->s_subtype);
+ kfree(s->s_options);
+ kfree(s);
}
/**
@@ -176,111 +170,83 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
{
struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER);
static const struct super_operations default_op;
+ int i;
+
+ if (!s)
+ return NULL;
- if (s) {
- if (security_sb_alloc(s))
- goto out_free_sb;
+ if (security_sb_alloc(s))
+ goto fail;
#ifdef CONFIG_SMP
- s->s_files = alloc_percpu(struct list_head);
- if (!s->s_files)
- goto err_out;
- else {
- int i;
-
- for_each_possible_cpu(i)
- INIT_LIST_HEAD(per_cpu_ptr(s->s_files, i));
- }
+ s->s_files = alloc_percpu(struct list_head);
+ if (!s->s_files)
+ goto fail;
+ for_each_possible_cpu(i)
+ INIT_LIST_HEAD(per_cpu_ptr(s->s_files, i));
#else
- INIT_LIST_HEAD(&s->s_files);
+ INIT_LIST_HEAD(&s->s_files);
#endif
- if (init_sb_writers(s, type))
- goto err_out;
- s->s_flags = flags;
- s->s_bdi = &default_backing_dev_info;
- INIT_HLIST_NODE(&s->s_instances);
- INIT_HLIST_BL_HEAD(&s->s_anon);
- INIT_LIST_HEAD(&s->s_inodes);
-
- if (list_lru_init(&s->s_dentry_lru))
- goto err_out;
- if (list_lru_init(&s->s_inode_lru))
- goto err_out_dentry_lru;
-
- INIT_LIST_HEAD(&s->s_mounts);
- init_rwsem(&s->s_umount);
- lockdep_set_class(&s->s_umount, &type->s_umount_key);
- /*
- * sget() can have s_umount recursion.
- *
- * When it cannot find a suitable sb, it allocates a new
- * one (this one), and tries again to find a suitable old
- * one.
- *
- * In case that succeeds, it will acquire the s_umount
- * lock of the old one. Since these are clearly distrinct
- * locks, and this object isn't exposed yet, there's no
- * risk of deadlocks.
- *
- * Annotate this by putting this lock in a different
- * subclass.
- */
- down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING);
- s->s_count = 1;
- atomic_set(&s->s_active, 1);
- mutex_init(&s->s_vfs_rename_mutex);
- lockdep_set_class(&s->s_vfs_rename_mutex, &type->s_vfs_rename_key);
- mutex_init(&s->s_dquot.dqio_mutex);
- mutex_init(&s->s_dquot.dqonoff_mutex);
- init_rwsem(&s->s_dquot.dqptr_sem);
- s->s_maxbytes = MAX_NON_LFS;
- s->s_op = &default_op;
- s->s_time_gran = 1000000000;
- s->cleancache_poolid = -1;
-
- s->s_shrink.seeks = DEFAULT_SEEKS;
- s->s_shrink.scan_objects = super_cache_scan;
- s->s_shrink.count_objects = super_cache_count;
- s->s_shrink.batch = 1024;
- s->s_shrink.flags = SHRINKER_NUMA_AWARE;
+ for (i = 0; i < SB_FREEZE_LEVELS; i++) {
+ if (percpu_counter_init(&s->s_writers.counter[i], 0) < 0)
+ goto fail;
+ lockdep_init_map(&s->s_writers.lock_map[i], sb_writers_name[i],
+ &type->s_writers_key[i], 0);
}
-out:
+ init_waitqueue_head(&s->s_writers.wait);
+ init_waitqueue_head(&s->s_writers.wait_unfrozen);
+ s->s_flags = flags;
+ s->s_bdi = &default_backing_dev_info;
+ INIT_HLIST_NODE(&s->s_instances);
+ INIT_HLIST_BL_HEAD(&s->s_anon);
+ INIT_LIST_HEAD(&s->s_inodes);
+
+ if (list_lru_init(&s->s_dentry_lru))
+ goto fail;
+ if (list_lru_init(&s->s_inode_lru))
+ goto fail;
+
+ INIT_LIST_HEAD(&s->s_mounts);
+ init_rwsem(&s->s_umount);
+ lockdep_set_class(&s->s_umount, &type->s_umount_key);
+ /*
+ * sget() can have s_umount recursion.
+ *
+ * When it cannot find a suitable sb, it allocates a new
+ * one (this one), and tries again to find a suitable old
+ * one.
+ *
+ * In case that succeeds, it will acquire the s_umount
+ * lock of the old one. Since these are clearly distrinct
+ * locks, and this object isn't exposed yet, there's no
+ * risk of deadlocks.
+ *
+ * Annotate this by putting this lock in a different
+ * subclass.
+ */
+ down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING);
+ s->s_count = 1;
+ atomic_set(&s->s_active, 1);
+ mutex_init(&s->s_vfs_rename_mutex);
+ lockdep_set_class(&s->s_vfs_rename_mutex, &type->s_vfs_rename_key);
+ mutex_init(&s->s_dquot.dqio_mutex);
+ mutex_init(&s->s_dquot.dqonoff_mutex);
+ init_rwsem(&s->s_dquot.dqptr_sem);
+ s->s_maxbytes = MAX_NON_LFS;
+ s->s_op = &default_op;
+ s->s_time_gran = 1000000000;
+ s->cleancache_poolid = -1;
+
+ s->s_shrink.seeks = DEFAULT_SEEKS;
+ s->s_shrink.scan_objects = super_cache_scan;
+ s->s_shrink.count_objects = super_cache_count;
+ s->s_shrink.batch = 1024;
+ s->s_shrink.flags = SHRINKER_NUMA_AWARE;
return s;
-err_out_dentry_lru:
- list_lru_destroy(&s->s_dentry_lru);
-err_out:
- security_sb_free(s);
-#ifdef CONFIG_SMP
- if (s->s_files)
- free_percpu(s->s_files);
-#endif
- destroy_sb_writers(s);
-out_free_sb:
- kfree(s);
- s = NULL;
- goto out;
-}
-
-/**
- * destroy_super - frees a superblock
- * @s: superblock to free
- *
- * Frees a superblock.
- */
-static inline void destroy_super(struct super_block *s)
-{
- list_lru_destroy(&s->s_dentry_lru);
- list_lru_destroy(&s->s_inode_lru);
-#ifdef CONFIG_SMP
- free_percpu(s->s_files);
-#endif
- destroy_sb_writers(s);
- security_sb_free(s);
- WARN_ON(!list_empty(&s->s_mounts));
- kfree(s->s_subtype);
- kfree(s->s_options);
- kfree(s);
+fail:
+ destroy_super(s);
+ return NULL;
}
/* Superblock refcounting */
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] get rid of s_files and files_lock
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (4 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] uninline destroy_super(), consolidate alloc_super() Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs" Jiri Slaby
` (41 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Al Viro
From: Al Viro <viro@zeniv.linux.org.uk>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit eee5cc2702929fd41cce28058dc6d6717f723f87 upstream.
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
fs/file_table.c | 125 -----------------------------------------------------
fs/internal.h | 3 --
fs/open.c | 2 -
fs/super.c | 15 +------
include/linux/fs.h | 13 ------
5 files changed, 2 insertions(+), 156 deletions(-)
diff --git a/fs/file_table.c b/fs/file_table.c
index 05e2ac19b6c4..8070f81a3286 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -36,8 +36,6 @@ struct files_stat_struct files_stat = {
.max_files = NR_FILE
};
-DEFINE_STATIC_LGLOCK(files_lglock);
-
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
@@ -134,7 +132,6 @@ struct file *get_empty_filp(void)
return ERR_PTR(error);
}
- INIT_LIST_HEAD(&f->f_u.fu_list);
atomic_long_set(&f->f_count, 1);
rwlock_init(&f->f_owner.lock);
spin_lock_init(&f->f_lock);
@@ -304,7 +301,6 @@ void fput(struct file *file)
if (atomic_long_dec_and_test(&file->f_count)) {
struct task_struct *task = current;
- file_sb_list_del(file);
if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) {
init_task_work(&file->f_u.fu_rcuhead, ____fput);
if (!task_work_add(task, &file->f_u.fu_rcuhead, true))
@@ -333,7 +329,6 @@ void __fput_sync(struct file *file)
{
if (atomic_long_dec_and_test(&file->f_count)) {
struct task_struct *task = current;
- file_sb_list_del(file);
BUG_ON(!(task->flags & PF_KTHREAD));
__fput(file);
}
@@ -345,129 +340,10 @@ void put_filp(struct file *file)
{
if (atomic_long_dec_and_test(&file->f_count)) {
security_file_free(file);
- file_sb_list_del(file);
file_free(file);
}
}
-static inline int file_list_cpu(struct file *file)
-{
-#ifdef CONFIG_SMP
- return file->f_sb_list_cpu;
-#else
- return smp_processor_id();
-#endif
-}
-
-/* helper for file_sb_list_add to reduce ifdefs */
-static inline void __file_sb_list_add(struct file *file, struct super_block *sb)
-{
- struct list_head *list;
-#ifdef CONFIG_SMP
- int cpu;
- cpu = smp_processor_id();
- file->f_sb_list_cpu = cpu;
- list = per_cpu_ptr(sb->s_files, cpu);
-#else
- list = &sb->s_files;
-#endif
- list_add(&file->f_u.fu_list, list);
-}
-
-/**
- * file_sb_list_add - add a file to the sb's file list
- * @file: file to add
- * @sb: sb to add it to
- *
- * Use this function to associate a file with the superblock of the inode it
- * refers to.
- */
-void file_sb_list_add(struct file *file, struct super_block *sb)
-{
- if (likely(!(file->f_mode & FMODE_WRITE)))
- return;
- if (!S_ISREG(file_inode(file)->i_mode))
- return;
- lg_local_lock(&files_lglock);
- __file_sb_list_add(file, sb);
- lg_local_unlock(&files_lglock);
-}
-
-/**
- * file_sb_list_del - remove a file from the sb's file list
- * @file: file to remove
- * @sb: sb to remove it from
- *
- * Use this function to remove a file from its superblock.
- */
-void file_sb_list_del(struct file *file)
-{
- if (!list_empty(&file->f_u.fu_list)) {
- lg_local_lock_cpu(&files_lglock, file_list_cpu(file));
- list_del_init(&file->f_u.fu_list);
- lg_local_unlock_cpu(&files_lglock, file_list_cpu(file));
- }
-}
-
-#ifdef CONFIG_SMP
-
-/*
- * These macros iterate all files on all CPUs for a given superblock.
- * files_lglock must be held globally.
- */
-#define do_file_list_for_each_entry(__sb, __file) \
-{ \
- int i; \
- for_each_possible_cpu(i) { \
- struct list_head *list; \
- list = per_cpu_ptr((__sb)->s_files, i); \
- list_for_each_entry((__file), list, f_u.fu_list)
-
-#define while_file_list_for_each_entry \
- } \
-}
-
-#else
-
-#define do_file_list_for_each_entry(__sb, __file) \
-{ \
- struct list_head *list; \
- list = &(sb)->s_files; \
- list_for_each_entry((__file), list, f_u.fu_list)
-
-#define while_file_list_for_each_entry \
-}
-
-#endif
-
-/**
- * mark_files_ro - mark all files read-only
- * @sb: superblock in question
- *
- * All files are marked read-only. We don't care about pending
- * delete files so this should be used in 'force' mode only.
- */
-void mark_files_ro(struct super_block *sb)
-{
- struct file *f;
-
- lg_global_lock(&files_lglock);
- do_file_list_for_each_entry(sb, f) {
- if (!file_count(f))
- continue;
- if (!(f->f_mode & FMODE_WRITE))
- continue;
- spin_lock(&f->f_lock);
- f->f_mode &= ~FMODE_WRITE;
- spin_unlock(&f->f_lock);
- if (file_check_writeable(f) != 0)
- continue;
- __mnt_drop_write(f->f_path.mnt);
- file_release_write(f);
- } while_file_list_for_each_entry;
- lg_global_unlock(&files_lglock);
-}
-
void __init files_init(unsigned long mempages)
{
unsigned long n;
@@ -483,6 +359,5 @@ void __init files_init(unsigned long mempages)
n = (mempages * (PAGE_SIZE / 1024)) / 10;
files_stat.max_files = max_t(unsigned long, n, NR_FILE);
files_defer_init();
- lg_lock_init(&files_lglock, "files_lglock");
percpu_counter_init(&nr_files, 0);
}
diff --git a/fs/internal.h b/fs/internal.h
index 6026fc0fbae0..656bcd4b281f 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -77,9 +77,6 @@ extern void chroot_fs_refs(const struct path *, const struct path *);
/*
* file_table.c
*/
-extern void file_sb_list_add(struct file *f, struct super_block *sb);
-extern void file_sb_list_del(struct file *f);
-extern void mark_files_ro(struct super_block *);
extern struct file *get_empty_filp(void);
/*
diff --git a/fs/open.c b/fs/open.c
index 730a5870895d..fc9c0ceed464 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -673,7 +673,6 @@ static int do_dentry_open(struct file *f,
}
f->f_mapping = inode->i_mapping;
- file_sb_list_add(f, inode->i_sb);
if (unlikely(f->f_mode & FMODE_PATH)) {
f->f_op = &empty_fops;
@@ -708,7 +707,6 @@ static int do_dentry_open(struct file *f,
cleanup_all:
fops_put(f->f_op);
- file_sb_list_del(f);
if (f->f_mode & FMODE_WRITE) {
if (!special_file(inode->i_mode)) {
/*
diff --git a/fs/super.c b/fs/super.c
index 59c6983682b2..e3406833d82f 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -146,9 +146,6 @@ static void destroy_super(struct super_block *s)
int i;
list_lru_destroy(&s->s_dentry_lru);
list_lru_destroy(&s->s_inode_lru);
-#ifdef CONFIG_SMP
- free_percpu(s->s_files);
-#endif
for (i = 0; i < SB_FREEZE_LEVELS; i++)
percpu_counter_destroy(&s->s_writers.counter[i]);
security_sb_free(s);
@@ -178,15 +175,6 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
if (security_sb_alloc(s))
goto fail;
-#ifdef CONFIG_SMP
- s->s_files = alloc_percpu(struct list_head);
- if (!s->s_files)
- goto fail;
- for_each_possible_cpu(i)
- INIT_LIST_HEAD(per_cpu_ptr(s->s_files, i));
-#else
- INIT_LIST_HEAD(&s->s_files);
-#endif
for (i = 0; i < SB_FREEZE_LEVELS; i++) {
if (percpu_counter_init(&s->s_writers.counter[i], 0) < 0)
goto fail;
@@ -726,7 +714,8 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
make sure there are no rw files opened */
if (remount_ro) {
if (force) {
- mark_files_ro(sb);
+ sb->s_readonly_remount = 1;
+ smp_wmb();
} else {
retval = sb_prepare_remount_readonly(sb);
if (retval)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9cb726aa09fc..042b61b7a2ad 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -764,12 +764,7 @@ static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index)
#define FILE_MNT_WRITE_RELEASED 2
struct file {
- /*
- * fu_list becomes invalid after file_free is called and queued via
- * fu_rcuhead for RCU freeing
- */
union {
- struct list_head fu_list;
struct llist_node fu_llist;
struct rcu_head fu_rcuhead;
} f_u;
@@ -783,9 +778,6 @@ struct file {
* Must not be taken from IRQ context.
*/
spinlock_t f_lock;
-#ifdef CONFIG_SMP
- int f_sb_list_cpu;
-#endif
atomic_long_t f_count;
unsigned int f_flags;
fmode_t f_mode;
@@ -1264,11 +1256,6 @@ struct super_block {
struct list_head s_inodes; /* all inodes */
struct hlist_bl_head s_anon; /* anonymous dentries for (nfs) exporting */
-#ifdef CONFIG_SMP
- struct list_head __percpu *s_files;
-#else
- struct list_head s_files;
-#endif
struct list_head s_mounts; /* list of mounts; _not_ for fs use */
struct block_device *s_bdev;
struct backing_dev_info *s_bdi;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs"
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (5 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] get rid of s_files and files_lock Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:04 ` Christoph Hellwig
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] PCI: pciehp: Add hotplug_lock to serialize hotplug events Jiri Slaby
` (40 subsequent siblings)
47 siblings, 1 reply; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby
Cc: Christoph Hellwig, Jens Axboe, Andrew Morton, Linus Torvalds,
Christoph Hellwig, Jan Kara
From: Christoph Hellwig <hch@infradead.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit fc21c0cff2f425891b28ff6fb6b03b325c977428 upstream.
This commit was incomplete in that code to remove items from the per-cpu
lists was missing and never acquired a user in the 5 years it has been in
the tree. We're going to implement what it seems to try to archive in a
simpler way, and this code is in the way of doing so.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
include/linux/interrupt.h | 22 --------
kernel/softirq.c | 131 ----------------------------------------------
2 files changed, 153 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 623ab2d787d9..2778d389a6ce 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -11,8 +11,6 @@
#include <linux/irqnr.h>
#include <linux/hardirq.h>
#include <linux/irqflags.h>
-#include <linux/smp.h>
-#include <linux/percpu.h>
#include <linux/hrtimer.h>
#include <linux/kref.h>
#include <linux/workqueue.h>
@@ -419,15 +417,6 @@ extern void __raise_softirq_irqoff(unsigned int nr);
extern void raise_softirq_irqoff(unsigned int nr);
extern void raise_softirq(unsigned int nr);
-/* This is the worklist that queues up per-cpu softirq work.
- *
- * send_remote_sendirq() adds work to these lists, and
- * the softirq handler itself dequeues from them. The queues
- * are protected by disabling local cpu interrupts and they must
- * only be accessed by the local cpu that they are for.
- */
-DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
-
DECLARE_PER_CPU(struct task_struct *, ksoftirqd);
static inline struct task_struct *this_cpu_ksoftirqd(void)
@@ -435,17 +424,6 @@ static inline struct task_struct *this_cpu_ksoftirqd(void)
return this_cpu_read(ksoftirqd);
}
-/* Try to send a softirq to a remote cpu. If this cannot be done, the
- * work will be queued to the local cpu.
- */
-extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq);
-
-/* Like send_remote_softirq(), but the caller must disable local cpu interrupts
- * and compute the current cpu, passed in as 'this_cpu'.
- */
-extern void __send_remote_softirq(struct call_single_data *cp, int cpu,
- int this_cpu, int softirq);
-
/* Tasklets --- multithreaded analogue of BHs.
Main feature differing them of generic softirqs: tasklet
diff --git a/kernel/softirq.c b/kernel/softirq.c
index b331c8756543..cdd2c3c4df74 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -6,8 +6,6 @@
* Distribute under GPLv2.
*
* Rewritten. Old one was good in 2.2, but in 2.3 it was immoral. --ANK (990903)
- *
- * Remote softirq infrastructure is by Jens Axboe.
*/
#include <linux/export.h>
@@ -618,146 +616,17 @@ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
}
EXPORT_SYMBOL_GPL(tasklet_hrtimer_init);
-/*
- * Remote softirq bits
- */
-
-DEFINE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
-EXPORT_PER_CPU_SYMBOL(softirq_work_list);
-
-static void __local_trigger(struct call_single_data *cp, int softirq)
-{
- struct list_head *head = &__get_cpu_var(softirq_work_list[softirq]);
-
- list_add_tail(&cp->list, head);
-
- /* Trigger the softirq only if the list was previously empty. */
- if (head->next == &cp->list)
- raise_softirq_irqoff(softirq);
-}
-
-#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
-static void remote_softirq_receive(void *data)
-{
- struct call_single_data *cp = data;
- unsigned long flags;
- int softirq;
-
- softirq = *(int *)cp->info;
- local_irq_save(flags);
- __local_trigger(cp, softirq);
- local_irq_restore(flags);
-}
-
-static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
-{
- if (cpu_online(cpu)) {
- cp->func = remote_softirq_receive;
- cp->info = &softirq;
- cp->flags = 0;
-
- __smp_call_function_single(cpu, cp, 0);
- return 0;
- }
- return 1;
-}
-#else /* CONFIG_USE_GENERIC_SMP_HELPERS */
-static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
-{
- return 1;
-}
-#endif
-
-/**
- * __send_remote_softirq - try to schedule softirq work on a remote cpu
- * @cp: private SMP call function data area
- * @cpu: the remote cpu
- * @this_cpu: the currently executing cpu
- * @softirq: the softirq for the work
- *
- * Attempt to schedule softirq work on a remote cpu. If this cannot be
- * done, the work is instead queued up on the local cpu.
- *
- * Interrupts must be disabled.
- */
-void __send_remote_softirq(struct call_single_data *cp, int cpu, int this_cpu, int softirq)
-{
- if (cpu == this_cpu || __try_remote_softirq(cp, cpu, softirq))
- __local_trigger(cp, softirq);
-}
-EXPORT_SYMBOL(__send_remote_softirq);
-
-/**
- * send_remote_softirq - try to schedule softirq work on a remote cpu
- * @cp: private SMP call function data area
- * @cpu: the remote cpu
- * @softirq: the softirq for the work
- *
- * Like __send_remote_softirq except that disabling interrupts and
- * computing the current cpu is done for the caller.
- */
-void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
-{
- unsigned long flags;
- int this_cpu;
-
- local_irq_save(flags);
- this_cpu = smp_processor_id();
- __send_remote_softirq(cp, cpu, this_cpu, softirq);
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(send_remote_softirq);
-
-static int remote_softirq_cpu_notify(struct notifier_block *self,
- unsigned long action, void *hcpu)
-{
- /*
- * If a CPU goes away, splice its entries to the current CPU
- * and trigger a run of the softirq
- */
- if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
- int cpu = (unsigned long) hcpu;
- int i;
-
- local_irq_disable();
- for (i = 0; i < NR_SOFTIRQS; i++) {
- struct list_head *head = &per_cpu(softirq_work_list[i], cpu);
- struct list_head *local_head;
-
- if (list_empty(head))
- continue;
-
- local_head = &__get_cpu_var(softirq_work_list[i]);
- list_splice_init(head, local_head);
- raise_softirq_irqoff(i);
- }
- local_irq_enable();
- }
-
- return NOTIFY_OK;
-}
-
-static struct notifier_block remote_softirq_cpu_notifier = {
- .notifier_call = remote_softirq_cpu_notify,
-};
-
void __init softirq_init(void)
{
int cpu;
for_each_possible_cpu(cpu) {
- int i;
-
per_cpu(tasklet_vec, cpu).tail =
&per_cpu(tasklet_vec, cpu).head;
per_cpu(tasklet_hi_vec, cpu).tail =
&per_cpu(tasklet_hi_vec, cpu).head;
- for (i = 0; i < NR_SOFTIRQS; i++)
- INIT_LIST_HEAD(&per_cpu(softirq_work_list[i], cpu));
}
- register_hotcpu_notifier(&remote_softirq_cpu_notifier);
-
open_softirq(TASKLET_SOFTIRQ, tasklet_action);
open_softirq(HI_SOFTIRQ, tasklet_hi_action);
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] PCI: pciehp: Add hotplug_lock to serialize hotplug events
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (6 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs" Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] arm64/mm: Remove hack in mmap randomize layout Jiri Slaby
` (39 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Rajat Jain, Bjorn Helgaas, Guenter Roeck, Rajat Jain,
Luis Rodriguez
From: Rajat Jain <rajatxjain@gmail.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 50b52fdee050745935d92e7026373edea2647e60 upstream.
Today it is there is no protection around pciehp_enable_slot() and
pciehp_disable_slot() to ensure that they complete before another
hot-plug operation can be done on that particular slot.
This patch introduces the slot->hotplug_lock to ensure that any hotplug
operations (add / remove) complete before another hotplug event can begin
processing on that particular slot.
Signed-off-by: Rajat Jain <rajatxjain@gmail.com>
Signed-off-by: Rajat Jain <rajatjain@juniper.net>
Signed-off-by: Guenter Roeck <groeck@juniper.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
[backported for SLE12]
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
drivers/pci/hotplug/pciehp.h | 1 +
drivers/pci/hotplug/pciehp_core.c | 7 ++++++-
drivers/pci/hotplug/pciehp_ctrl.c | 17 +++++++++++++++--
drivers/pci/hotplug/pciehp_hpc.c | 1 +
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 541bbe6d5343..b7f1ba33c4c1 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -77,6 +77,7 @@ struct slot {
struct hotplug_slot *hotplug_slot;
struct delayed_work work; /* work for button event */
struct mutex lock;
+ struct mutex hotplug_lock;
struct workqueue_struct *wq;
};
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index f4a18f51a29c..3904483ef12b 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -278,8 +278,11 @@ static int pciehp_probe(struct pcie_device *dev)
slot = ctrl->slot;
pciehp_get_adapter_status(slot, &occupied);
pciehp_get_power_status(slot, &poweron);
- if (occupied && pciehp_force)
+ if (occupied && pciehp_force) {
+ mutex_lock(&slot->hotplug_lock);
pciehp_enable_slot(slot);
+ mutex_unlock(&slot->hotplug_lock);
+ }
/* If empty slot's power status is on, turn power off */
if (!occupied && poweron && POWER_CTRL(ctrl))
pciehp_power_off_slot(slot);
@@ -323,10 +326,12 @@ static int pciehp_resume (struct pcie_device *dev)
/* Check if slot is occupied */
pciehp_get_adapter_status(slot, &status);
+ mutex_lock(&slot->hotplug_lock);
if (status)
pciehp_enable_slot(slot);
else
pciehp_disable_slot(slot);
+ mutex_unlock(&slot->hotplug_lock);
return 0;
}
#endif /* PM */
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 38f018679175..62bfb528b4ff 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -290,6 +290,7 @@ static void pciehp_power_thread(struct work_struct *work)
struct power_work_info *info =
container_of(work, struct power_work_info, work);
struct slot *p_slot = info->p_slot;
+ int ret;
mutex_lock(&p_slot->lock);
switch (p_slot->state) {
@@ -299,13 +300,18 @@ static void pciehp_power_thread(struct work_struct *work)
"Disabling domain:bus:device=%04x:%02x:00\n",
pci_domain_nr(p_slot->ctrl->pcie->port->subordinate),
p_slot->ctrl->pcie->port->subordinate->number);
+ mutex_lock(&p_slot->hotplug_lock);
pciehp_disable_slot(p_slot);
+ mutex_unlock(&p_slot->hotplug_lock);
mutex_lock(&p_slot->lock);
p_slot->state = STATIC_STATE;
break;
case POWERON_STATE:
mutex_unlock(&p_slot->lock);
- if (pciehp_enable_slot(p_slot) && PWR_LED(p_slot->ctrl))
+ mutex_lock(&p_slot->hotplug_lock);
+ ret = pciehp_enable_slot(p_slot);
+ mutex_unlock(&p_slot->hotplug_lock);
+ if (ret && PWR_LED(p_slot->ctrl))
pciehp_green_led_off(p_slot);
mutex_lock(&p_slot->lock);
p_slot->state = STATIC_STATE;
@@ -476,6 +482,9 @@ static void interrupt_event_handler(struct work_struct *work)
kfree(info);
}
+/*
+ * Note: This function must be called with slot->hotplug_lock held
+ */
int pciehp_enable_slot(struct slot *p_slot)
{
u8 getstatus = 0;
@@ -514,7 +523,9 @@ int pciehp_enable_slot(struct slot *p_slot)
return rc;
}
-
+/*
+ * Note: This function must be called with slot->hotplug_lock held
+ */
int pciehp_disable_slot(struct slot *p_slot)
{
u8 getstatus = 0;
@@ -566,7 +577,9 @@ int pciehp_sysfs_enable_slot(struct slot *p_slot)
case STATIC_STATE:
p_slot->state = POWERON_STATE;
mutex_unlock(&p_slot->lock);
+ mutex_lock(&p_slot->hotplug_lock);
retval = pciehp_enable_slot(p_slot);
+ mutex_unlock(&p_slot->hotplug_lock);
mutex_lock(&p_slot->lock);
p_slot->state = STATIC_STATE;
break;
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 51f56ef4ab6f..f49e74239aed 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -815,6 +815,7 @@ static int pcie_init_slot(struct controller *ctrl)
slot->ctrl = ctrl;
mutex_init(&slot->lock);
+ mutex_init(&slot->hotplug_lock);
INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work);
ctrl->slot = slot;
return 0;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] arm64/mm: Remove hack in mmap randomize layout
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (7 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] PCI: pciehp: Add hotplug_lock to serialize hotplug events Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Jiri Slaby
` (38 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby
Cc: Will Deacon, David S. Miller, Benjamin Herrenschmidt,
Yann Droneaud, Anton Blanchard
From: Yann Droneaud <ydroneaud@opteya.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit d6c763afab142a85e4770b4bc2a5f40f256d5c5d upstream.
Since commit 8a0a9bd4db63 ('random: make get_random_int() more
random'), get_random_int() returns a random value for each call,
so comment and hack introduced in mmap_rnd() as part of commit
1d18c47c735e ('arm64: MMU fault handling and page table management')
are incorrects.
Commit 1d18c47c735e seems to use the same hack introduced by
commit a5adc91a4b44 ('powerpc: Ensure random space between stack
and mmaps'), latter copied in commit 5a0efea09f42 ('sparc64: Sharpen
address space randomization calculations.').
But both architectures were cleaned up as part of commit
fa8cbaaf5a68 ('powerpc+sparc64/mm: Remove hack in mmap randomize
layout') as hack is no more needed since commit 8a0a9bd4db63.
So the present patch removes the comment and the hack around
get_random_int() on AArch64's mmap_rnd().
Cc: David S. Miller <davem@davemloft.net>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
arch/arm64/mm/mmap.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c
index 8ed6cb1a900f..8f7ffffc63e9 100644
--- a/arch/arm64/mm/mmap.c
+++ b/arch/arm64/mm/mmap.c
@@ -47,22 +47,14 @@ static int mmap_is_legacy(void)
return sysctl_legacy_va_layout;
}
-/*
- * Since get_random_int() returns the same value within a 1 jiffy window, we
- * will almost always get the same randomisation for the stack and mmap
- * region. This will mean the relative distance between stack and mmap will be
- * the same.
- *
- * To avoid this we can shift the randomness by 1 bit.
- */
static unsigned long mmap_rnd(void)
{
unsigned long rnd = 0;
if (current->flags & PF_RANDOMIZE)
- rnd = (long)get_random_int() & (STACK_RND_MASK >> 1);
+ rnd = (long)get_random_int() & STACK_RND_MASK;
- return rnd << (PAGE_SHIFT + 1);
+ return rnd << PAGE_SHIFT;
}
static unsigned long mmap_base(void)
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (8 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] arm64/mm: Remove hack in mmap randomize layout Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] bridge: fix multicast router rlist endless loop Jiri Slaby
` (37 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: David S. Miller, Sowmini Varadhan
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 0edfad5959df7379c9e554fbe8ba264ae232d321 upstream.
Since it is possible for vnet_event_napi to end up doing
vnet_control_pkt_engine -> ... -> vnet_send_attr ->
vnet_port_alloc_tx_ring -> ldc_alloc_exp_dring -> kzalloc()
(i.e., in softirq context), kzalloc() should be called with
GFP_ATOMIC from ldc_alloc_exp_dring.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
arch/sparc/kernel/ldc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 27bb55485472..7ef28625c199 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -2307,7 +2307,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
if (len & (8UL - 1))
return ERR_PTR(-EINVAL);
- buf = kzalloc(len, GFP_KERNEL);
+ buf = kzalloc(len, GFP_ATOMIC);
if (!buf)
return ERR_PTR(-ENOMEM);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] bridge: fix multicast router rlist endless loop
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (9 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] net: don't wait for order-3 page allocation Jiri Slaby
` (36 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Nikolay Aleksandrov, David S. Miller
From: Nikolay Aleksandrov <razor@blackwall.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 1a040eaca1a22f8da8285ceda6b5e4a2cb704867 ]
Since the addition of sysfs multicast router support if one set
multicast_router to "2" more than once, then the port would be added to
the hlist every time and could end up linking to itself and thus causing an
endless loop for rlist walkers.
So to reproduce just do:
echo 2 > multicast_router; echo 2 > multicast_router;
in a bridge port and let some igmp traffic flow, for me it hangs up
in br_multicast_flood().
Fix this by adding a check in br_multicast_add_router() if the port is
already linked.
The reason this didn't happen before the addition of multicast_router
sysfs entries is because there's a !hlist_unhashed check that prevents
it.
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Fixes: 0909e11758bd ("bridge: Add multicast_router sysfs entries")
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/bridge/br_multicast.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index b11736ad2e0b..f2c104900163 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1088,6 +1088,9 @@ static void br_multicast_add_router(struct net_bridge *br,
struct net_bridge_port *p;
struct hlist_node *slot = NULL;
+ if (!hlist_unhashed(&port->rlist))
+ return;
+
hlist_for_each_entry(p, &br->router_list, rlist) {
if ((unsigned long) port >= (unsigned long) p)
break;
@@ -1115,12 +1118,8 @@ static void br_multicast_mark_router(struct net_bridge *br,
if (port->multicast_router != 1)
return;
- if (!hlist_unhashed(&port->rlist))
- goto timer;
-
br_multicast_add_router(br, port);
-timer:
mod_timer(&port->multicast_router_timer,
now + br->multicast_querier_interval);
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] net: don't wait for order-3 page allocation
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (10 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] bridge: fix multicast router rlist endless loop Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] sctp: fix ASCONF list handling Jiri Slaby
` (35 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby
Cc: Shaohua Li, Eric Dumazet, Chris Mason, Debabrata Banerjee,
David S. Miller, Jiri Slaby
From: Shaohua Li <shli@fb.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit fb05e7a89f500cfc06ae277bdc911b281928995d ]
We saw excessive direct memory compaction triggered by skb_page_frag_refill.
This causes performance issues and add latency. Commit 5640f7685831e0
introduces the order-3 allocation. According to the changelog, the order-3
allocation isn't a must-have but to improve performance. But direct memory
compaction has high overhead. The benefit of order-3 allocation can't
compensate the overhead of direct memory compaction.
This patch makes the order-3 page allocation atomic. If there is no memory
pressure and memory isn't fragmented, the alloction will still success, so we
don't sacrifice the order-3 benefit here. If the atomic allocation fails,
direct memory compaction will not be triggered, skb_page_frag_refill will
fallback to order-0 immediately, hence the direct memory compaction overhead is
avoided. In the allocation failure case, kswapd is waken up and doing
compaction, so chances are allocation could success next time.
alloc_skb_with_frags is the same.
The mellanox driver does similar thing, if this is accepted, we must fix
the driver too.
V3: fix the same issue in alloc_skb_with_frags as pointed out by Eric
V2: make the changelog clearer
Cc: Eric Dumazet <edumazet@google.com>
Cc: Chris Mason <clm@fb.com>
Cc: Debabrata Banerjee <dbavatar@gmail.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/core/skbuff.c | 4 +++-
net/core/sock.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index fa8448a730a9..b01dd5f421da 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -367,9 +367,11 @@ refill:
for (order = NETDEV_FRAG_PAGE_MAX_ORDER; ;) {
gfp_t gfp = gfp_mask;
- if (order)
+ if (order) {
gfp |= __GFP_COMP | __GFP_NOWARN |
__GFP_NOMEMALLOC;
+ gfp &= ~__GFP_WAIT;
+ }
nc->frag.page = alloc_pages(gfp, order);
if (likely(nc->frag.page))
break;
diff --git a/net/core/sock.c b/net/core/sock.c
index f9ec2f5be1c0..2335a7a130f2 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1907,8 +1907,10 @@ bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag)
do {
gfp_t gfp = sk->sk_allocation;
- if (order)
+ if (order) {
gfp |= __GFP_COMP | __GFP_NOWARN | __GFP_NORETRY;
+ gfp &= ~__GFP_WAIT;
+ }
pfrag->page = alloc_pages(gfp, order);
if (likely(pfrag->page)) {
pfrag->offset = 0;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] sctp: fix ASCONF list handling
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (11 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] net: don't wait for order-3 page allocation Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] bridge: fix br_stp_set_bridge_priority race conditions Jiri Slaby
` (34 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Marcelo Ricardo Leitner, David S. Miller, Jiri Slaby
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2d45a02d0166caf2627fe91897c6ffc3b19514c4 ]
->auto_asconf_splist is per namespace and mangled by functions like
sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization.
Also, the call to inet_sk_copy_descendant() was backuping
->auto_asconf_list through the copy but was not honoring
->do_auto_asconf, which could lead to list corruption if it was
different between both sockets.
This commit thus fixes the list handling by using ->addr_wq_lock
spinlock to protect the list. A special handling is done upon socket
creation and destruction for that. Error handlig on sctp_init_sock()
will never return an error after having initialized asconf, so
sctp_destroy_sock() can be called without addrq_wq_lock. The lock now
will be take on sctp_close_sock(), before locking the socket, so we
don't do it in inverse order compared to sctp_addr_wq_timeout_handler().
Instead of taking the lock on sctp_sock_migrate() for copying and
restoring the list values, it's preferred to avoid rewritting it by
implementing sctp_copy_descendant().
Issue was found with a test application that kept flipping sysctl
default_auto_asconf on and off, but one could trigger it by issuing
simultaneous setsockopt() calls on multiple sockets or by
creating/destroying sockets fast enough. This is only triggerable
locally.
Fixes: 9f7d653b67ae ("sctp: Add Auto-ASCONF support (core).")
Reported-by: Ji Jianwen <jiji@redhat.com>
Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
include/net/netns/sctp.h | 1 +
include/net/sctp/structs.h | 4 ++++
net/sctp/socket.c | 43 ++++++++++++++++++++++++++++++++-----------
3 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h
index 3573a81815ad..8ba379f9e467 100644
--- a/include/net/netns/sctp.h
+++ b/include/net/netns/sctp.h
@@ -31,6 +31,7 @@ struct netns_sctp {
struct list_head addr_waitq;
struct timer_list addr_wq_timer;
struct list_head auto_asconf_splist;
+ /* Lock that protects both addr_waitq and auto_asconf_splist */
spinlock_t addr_wq_lock;
/* Lock that protects the local_addr_list writers */
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 8b31f09dd695..682e8cc82a9f 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -220,6 +220,10 @@ struct sctp_sock {
atomic_t pd_mode;
/* Receive to here while partial delivery is in effect. */
struct sk_buff_head pd_lobby;
+
+ /* These must be the last fields, as they will skipped on copies,
+ * like on accept and peeloff operations
+ */
struct list_head auto_asconf_list;
int do_auto_asconf;
};
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e00a041129c2..09b147e0fe57 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1533,8 +1533,10 @@ static void sctp_close(struct sock *sk, long timeout)
/* Supposedly, no process has access to the socket, but
* the net layers still may.
+ * Also, sctp_destroy_sock() needs to be called with addr_wq_lock
+ * held and that should be grabbed before socket lock.
*/
- sctp_local_bh_disable();
+ spin_lock_bh(&net->sctp.addr_wq_lock);
sctp_bh_lock_sock(sk);
/* Hold the sock, since sk_common_release() will put sock_put()
@@ -1544,7 +1546,7 @@ static void sctp_close(struct sock *sk, long timeout)
sk_common_release(sk);
sctp_bh_unlock_sock(sk);
- sctp_local_bh_enable();
+ spin_unlock_bh(&net->sctp.addr_wq_lock);
sock_put(sk);
@@ -3486,6 +3488,7 @@ static int sctp_setsockopt_auto_asconf(struct sock *sk, char __user *optval,
if ((val && sp->do_auto_asconf) || (!val && !sp->do_auto_asconf))
return 0;
+ spin_lock_bh(&sock_net(sk)->sctp.addr_wq_lock);
if (val == 0 && sp->do_auto_asconf) {
list_del(&sp->auto_asconf_list);
sp->do_auto_asconf = 0;
@@ -3494,6 +3497,7 @@ static int sctp_setsockopt_auto_asconf(struct sock *sk, char __user *optval,
&sock_net(sk)->sctp.auto_asconf_splist);
sp->do_auto_asconf = 1;
}
+ spin_unlock_bh(&sock_net(sk)->sctp.addr_wq_lock);
return 0;
}
@@ -3984,18 +3988,28 @@ static int sctp_init_sock(struct sock *sk)
local_bh_disable();
percpu_counter_inc(&sctp_sockets_allocated);
sock_prot_inuse_add(net, sk->sk_prot, 1);
+
+ /* Nothing can fail after this block, otherwise
+ * sctp_destroy_sock() will be called without addr_wq_lock held
+ */
if (net->sctp.default_auto_asconf) {
+ spin_lock(&sock_net(sk)->sctp.addr_wq_lock);
list_add_tail(&sp->auto_asconf_list,
&net->sctp.auto_asconf_splist);
sp->do_auto_asconf = 1;
- } else
+ spin_unlock(&sock_net(sk)->sctp.addr_wq_lock);
+ } else {
sp->do_auto_asconf = 0;
+ }
+
local_bh_enable();
return 0;
}
-/* Cleanup any SCTP per socket resources. */
+/* Cleanup any SCTP per socket resources. Must be called with
+ * sock_net(sk)->sctp.addr_wq_lock held if sp->do_auto_asconf is true
+ */
static void sctp_destroy_sock(struct sock *sk)
{
struct sctp_sock *sp;
@@ -6938,6 +6952,19 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk,
newinet->mc_list = NULL;
}
+static inline void sctp_copy_descendant(struct sock *sk_to,
+ const struct sock *sk_from)
+{
+ int ancestor_size = sizeof(struct inet_sock) +
+ sizeof(struct sctp_sock) -
+ offsetof(struct sctp_sock, auto_asconf_list);
+
+ if (sk_from->sk_family == PF_INET6)
+ ancestor_size += sizeof(struct ipv6_pinfo);
+
+ __inet_sk_copy_descendant(sk_to, sk_from, ancestor_size);
+}
+
/* Populate the fields of the newsk from the oldsk and migrate the assoc
* and its messages to the newsk.
*/
@@ -6952,7 +6979,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
struct sk_buff *skb, *tmp;
struct sctp_ulpevent *event;
struct sctp_bind_hashbucket *head;
- struct list_head tmplist;
/* Migrate socket buffer sizes and all the socket level options to the
* new socket.
@@ -6960,12 +6986,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
newsk->sk_sndbuf = oldsk->sk_sndbuf;
newsk->sk_rcvbuf = oldsk->sk_rcvbuf;
/* Brute force copy old sctp opt. */
- if (oldsp->do_auto_asconf) {
- memcpy(&tmplist, &newsp->auto_asconf_list, sizeof(tmplist));
- inet_sk_copy_descendant(newsk, oldsk);
- memcpy(&newsp->auto_asconf_list, &tmplist, sizeof(tmplist));
- } else
- inet_sk_copy_descendant(newsk, oldsk);
+ sctp_copy_descendant(newsk, oldsk);
/* Restore the ep value that was overwritten with the above structure
* copy.
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] bridge: fix br_stp_set_bridge_priority race conditions
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (12 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] sctp: fix ASCONF list handling Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] packet: read num_members once in packet_rcv_fanout() Jiri Slaby
` (33 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Nikolay Aleksandrov, David S. Miller, Jiri Slaby
From: Nikolay Aleksandrov <razor@blackwall.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2dab80a8b486f02222a69daca6859519e05781d9 ]
After the ->set() spinlocks were removed br_stp_set_bridge_priority
was left running without any protection when used via sysfs. It can
race with port add/del and could result in use-after-free cases and
corrupted lists. Tested by running port add/del in a loop with stp
enabled while setting priority in a loop, crashes are easily
reproducible.
The spinlocks around sysfs ->set() were removed in commit:
14f98f258f19 ("bridge: range check STP parameters")
There's also a race condition in the netlink priority support that is
fixed by this change, but it was introduced recently and the fixes tag
covers it, just in case it's needed the commit is:
af615762e972 ("bridge: add ageing_time, stp_state, priority over netlink")
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Fixes: 14f98f258f19 ("bridge: range check STP parameters")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/bridge/br_ioctl.c | 2 --
net/bridge/br_stp_if.c | 4 +++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index cd8c3a44ab7d..b73eaba85667 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -247,9 +247,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN))
return -EPERM;
- spin_lock_bh(&br->lock);
br_stp_set_bridge_priority(br, args[1]);
- spin_unlock_bh(&br->lock);
return 0;
case BRCTL_SET_PORT_PRIORITY:
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 656a6f3e40de..886f6d6dc48a 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -241,12 +241,13 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
return true;
}
-/* called under bridge lock */
+/* Acquires and releases bridge lock */
void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio)
{
struct net_bridge_port *p;
int wasroot;
+ spin_lock_bh(&br->lock);
wasroot = br_is_root_bridge(br);
list_for_each_entry(p, &br->port_list, list) {
@@ -264,6 +265,7 @@ void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio)
br_port_state_selection(br);
if (br_is_root_bridge(br) && !wasroot)
br_become_root_bridge(br);
+ spin_unlock_bh(&br->lock);
}
/* called under bridge lock */
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] packet: read num_members once in packet_rcv_fanout()
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (13 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] bridge: fix br_stp_set_bridge_priority race conditions Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] packet: avoid out of bounds read in round robin fanout Jiri Slaby
` (32 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: David S. Miller, Eric Dumazet, Willem de Bruijn
From: Eric Dumazet <edumazet@google.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit f98f4514d07871da7a113dd9e3e330743fd70ae4 ]
We need to tell compiler it must not read f->num_members multiple
times. Otherwise testing if num is not zero is flaky, and we could
attempt an invalid divide by 0 in fanout_demux_cpu()
Note bug was present in packet_rcv_fanout_hash() and
packet_rcv_fanout_lb() but final 3.1 had a simple location
after commit 95ec3eb417115fb ("packet: Add 'cpu' fanout policy.")
Fixes: dc99f600698dc ("packet: Add fanout support.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/packet/af_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index a84612585fc8..e844c6152570 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1224,7 +1224,7 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev)
{
struct packet_fanout *f = pt->af_packet_priv;
- unsigned int num = f->num_members;
+ unsigned int num = ACCESS_ONCE(f->num_members);
struct packet_sock *po;
unsigned int idx;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] packet: avoid out of bounds read in round robin fanout
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (14 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] packet: read num_members once in packet_rcv_fanout() Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] neigh: do not modify unlinked entries Jiri Slaby
` (31 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby; +Cc: Willem de Bruijn, David S. Miller, Jiri Slaby
From: Willem de Bruijn <willemb@google.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 468479e6043c84f5a65299cc07cb08a22a28c2b1 ]
PACKET_FANOUT_LB computes f->rr_cur such that it is modulo
f->num_members. It returns the old value unconditionally, but
f->num_members may have changed since the last store. Ensure
that the return value is always < num.
When modifying the logic, simplify it further by replacing the loop
with an unconditional atomic increment.
Fixes: dc99f600698d ("packet: Add fanout support.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/packet/af_packet.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index e844c6152570..7f63613148b9 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1150,16 +1150,6 @@ static void packet_sock_destruct(struct sock *sk)
sk_refcnt_debug_dec(sk);
}
-static int fanout_rr_next(struct packet_fanout *f, unsigned int num)
-{
- int x = atomic_read(&f->rr_cur) + 1;
-
- if (x >= num)
- x = 0;
-
- return x;
-}
-
static unsigned int fanout_demux_hash(struct packet_fanout *f,
struct sk_buff *skb,
unsigned int num)
@@ -1171,13 +1161,9 @@ static unsigned int fanout_demux_lb(struct packet_fanout *f,
struct sk_buff *skb,
unsigned int num)
{
- int cur, old;
+ unsigned int val = atomic_inc_return(&f->rr_cur);
- cur = atomic_read(&f->rr_cur);
- while ((old = atomic_cmpxchg(&f->rr_cur, cur,
- fanout_rr_next(f, num))) != cur)
- cur = old;
- return cur;
+ return val % num;
}
static unsigned int fanout_demux_cpu(struct packet_fanout *f,
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] neigh: do not modify unlinked entries
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (15 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] packet: avoid out of bounds read in round robin fanout Jiri Slaby
@ 2015-07-27 8:01 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] sctp: Fix race between OOTB responce and route removal Jiri Slaby
` (30 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:01 UTC (permalink / raw)
To: jslaby
Cc: Julian Anastasov, Eric Dumazet, Ying Xue, David S. Miller,
Jiri Slaby
From: Julian Anastasov <ja@ssi.bg>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2c51a97f76d20ebf1f50fef908b986cb051fdff9 ]
The lockless lookups can return entry that is unlinked.
Sometimes they get reference before last neigh_cleanup_and_release,
sometimes they do not need reference. Later, any
modification attempts may result in the following problems:
1. entry is not destroyed immediately because neigh_update
can start the timer for dead entry, eg. on change to NUD_REACHABLE
state. As result, entry lives for some time but is invisible
and out of control.
2. __neigh_event_send can run in parallel with neigh_destroy
while refcnt=0 but if timer is started and expired refcnt can
reach 0 for second time leading to second neigh_destroy and
possible crash.
Thanks to Eric Dumazet and Ying Xue for their work and analyze
on the __neigh_event_send change.
Fixes: 767e97e1e0db ("neigh: RCU conversion of struct neighbour")
Fixes: a263b3093641 ("ipv4: Make neigh lookups directly in output packet path.")
Fixes: 6fd6ce2056de ("ipv6: Do not depend on rt->n in ip6_finish_output2().")
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/core/neighbour.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 467e3e071832..7453923dc507 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -971,6 +971,8 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
rc = 0;
if (neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE))
goto out_unlock_bh;
+ if (neigh->dead)
+ goto out_dead;
if (!(neigh->nud_state & (NUD_STALE | NUD_INCOMPLETE))) {
if (neigh->parms->mcast_probes + neigh->parms->app_probes) {
@@ -1024,6 +1026,13 @@ out_unlock_bh:
write_unlock(&neigh->lock);
local_bh_enable();
return rc;
+
+out_dead:
+ if (neigh->nud_state & NUD_STALE)
+ goto out_unlock_bh;
+ write_unlock_bh(&neigh->lock);
+ kfree_skb(skb);
+ return 1;
}
EXPORT_SYMBOL(__neigh_event_send);
@@ -1087,6 +1096,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
if (!(flags & NEIGH_UPDATE_F_ADMIN) &&
(old & (NUD_NOARP | NUD_PERMANENT)))
goto out;
+ if (neigh->dead)
+ goto out;
if (!(new & NUD_VALID)) {
neigh_del_timer(neigh);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] sctp: Fix race between OOTB responce and route removal
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (16 preceding siblings ...)
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] neigh: do not modify unlinked entries Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] crypto: talitos - avoid memleak in talitos_alg_alloc() Jiri Slaby
` (29 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Alexander Sverdlin, David S. Miller, Jiri Slaby
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 29c4afc4e98f4dc0ea9df22c631841f9c220b944 ]
There is NULL pointer dereference possible during statistics update if the route
used for OOTB responce is removed at unfortunate time. If the route exists when
we receive OOTB packet and we finally jump into sctp_packet_transmit() to send
ABORT, but in the meantime route is removed under our feet, we take "no_route"
path and try to update stats with IP_INC_STATS(sock_net(asoc->base.sk), ...).
But sctp_ootb_pkt_new() used to prepare responce packet doesn't call
sctp_transport_set_owner() and therefore there is no asoc associated with this
packet. Probably temporary asoc just for OOTB responces is overkill, so just
introduce a check like in all other places in sctp_packet_transmit(), where
"asoc" is dereferenced.
To reproduce this, one needs to
0. ensure that sctp module is loaded (otherwise ABORT is not generated)
1. remove default route on the machine
2. while true; do
ip route del [interface-specific route]
ip route add [interface-specific route]
done
3. send enough OOTB packets (i.e. HB REQs) from another host to trigger ABORT
responce
On x86_64 the crash looks like this:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
PGD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: ...
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 4.0.5-1-ARCH #1
Hardware name: ...
task: ffffffff818124c0 ti: ffffffff81800000 task.ti: ffffffff81800000
RIP: 0010:[<ffffffffa05ec9ac>] [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
RSP: 0018:ffff880127c037b8 EFLAGS: 00010296
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000015ff66b480
RDX: 00000015ff66b400 RSI: ffff880127c17200 RDI: ffff880123403700
RBP: ffff880127c03888 R08: 0000000000017200 R09: ffffffff814625af
R10: ffffea00047e4680 R11: 00000000ffffff80 R12: ffff8800b0d38a28
R13: ffff8800b0d38a28 R14: ffff8800b3e88000 R15: ffffffffa05f24e0
FS: 0000000000000000(0000) GS:ffff880127c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000020 CR3: 00000000c855b000 CR4: 00000000000007f0
Stack:
ffff880127c03910 ffff8800b0d38a28 ffffffff8189d240 ffff88011f91b400
ffff880127c03828 ffffffffa05c94c5 0000000000000000 ffff8800baa1c520
0000000000000000 0000000000000001 0000000000000000 0000000000000000
Call Trace:
<IRQ>
[<ffffffffa05c94c5>] ? sctp_sf_tabort_8_4_8.isra.20+0x85/0x140 [sctp]
[<ffffffffa05d6b42>] ? sctp_transport_put+0x52/0x80 [sctp]
[<ffffffffa05d0bfc>] sctp_do_sm+0xb8c/0x19a0 [sctp]
[<ffffffff810b0e00>] ? trigger_load_balance+0x90/0x210
[<ffffffff810e0329>] ? update_process_times+0x59/0x60
[<ffffffff812c7a40>] ? timerqueue_add+0x60/0xb0
[<ffffffff810e0549>] ? enqueue_hrtimer+0x29/0xa0
[<ffffffff8101f599>] ? read_tsc+0x9/0x10
[<ffffffff8116d4b5>] ? put_page+0x55/0x60
[<ffffffff810ee1ad>] ? clockevents_program_event+0x6d/0x100
[<ffffffff81462b68>] ? skb_free_head+0x58/0x80
[<ffffffffa029a10b>] ? chksum_update+0x1b/0x27 [crc32c_generic]
[<ffffffff81283f3e>] ? crypto_shash_update+0xce/0xf0
[<ffffffffa05d3993>] sctp_endpoint_bh_rcv+0x113/0x280 [sctp]
[<ffffffffa05dd4e6>] sctp_inq_push+0x46/0x60 [sctp]
[<ffffffffa05ed7a0>] sctp_rcv+0x880/0x910 [sctp]
[<ffffffffa05ecb50>] ? sctp_packet_transmit_chunk+0xb0/0xb0 [sctp]
[<ffffffffa05ecb70>] ? sctp_csum_update+0x20/0x20 [sctp]
[<ffffffff814b05a5>] ? ip_route_input_noref+0x235/0xd30
[<ffffffff81051d6b>] ? ack_ioapic_level+0x7b/0x150
[<ffffffff814b27be>] ip_local_deliver_finish+0xae/0x210
[<ffffffff814b2e15>] ip_local_deliver+0x35/0x90
[<ffffffff814b2a15>] ip_rcv_finish+0xf5/0x370
[<ffffffff814b3128>] ip_rcv+0x2b8/0x3a0
[<ffffffff81474193>] __netif_receive_skb_core+0x763/0xa50
[<ffffffff81476c28>] __netif_receive_skb+0x18/0x60
[<ffffffff81476cb0>] netif_receive_skb_internal+0x40/0xd0
[<ffffffff814776c8>] napi_gro_receive+0xe8/0x120
[<ffffffffa03946aa>] rtl8169_poll+0x2da/0x660 [r8169]
[<ffffffff8147896a>] net_rx_action+0x21a/0x360
[<ffffffff81078dc1>] __do_softirq+0xe1/0x2d0
[<ffffffff8107912d>] irq_exit+0xad/0xb0
[<ffffffff8157d158>] do_IRQ+0x58/0xf0
[<ffffffff8157b06d>] common_interrupt+0x6d/0x6d
<EOI>
[<ffffffff810e1218>] ? hrtimer_start+0x18/0x20
[<ffffffffa05d65f9>] ? sctp_transport_destroy_rcu+0x29/0x30 [sctp]
[<ffffffff81020c50>] ? mwait_idle+0x60/0xa0
[<ffffffff810216ef>] arch_cpu_idle+0xf/0x20
[<ffffffff810b731c>] cpu_startup_entry+0x3ec/0x480
[<ffffffff8156b365>] rest_init+0x85/0x90
[<ffffffff818eb035>] start_kernel+0x48b/0x4ac
[<ffffffff818ea120>] ? early_idt_handlers+0x120/0x120
[<ffffffff818ea339>] x86_64_start_reservations+0x2a/0x2c
[<ffffffff818ea49c>] x86_64_start_kernel+0x161/0x184
Code: 90 48 8b 80 b8 00 00 00 48 89 85 70 ff ff ff 48 83 bd 70 ff ff ff 00 0f 85 cd fa ff ff 48 89 df 31 db e8 18 63 e7 e0 48 8b 45 80 <48> 8b 40 20 48 8b 40 30 48 8b 80 68 01 00 00 65 48 ff 40 78 e9
RIP [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
RSP <ffff880127c037b8>
CR2: 0000000000000020
---[ end trace 5aec7fd2dc983574 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
drm_kms_helper: panic occurred, switching back to text console
---[ end Kernel panic - not syncing: Fatal exception in interrupt
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/sctp/output.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 69faf79a48c6..74d061d6e4e4 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -606,7 +606,9 @@ out:
return err;
no_route:
kfree_skb(nskb);
- IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES);
+
+ if (asoc)
+ IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES);
/* FIXME: Returning the 'err' will effect all the associations
* associated with a socket, although only one of the paths of the
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] crypto: talitos - avoid memleak in talitos_alg_alloc()
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (17 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] sctp: Fix race between OOTB responce and route removal Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] Revert "crypto: talitos - convert to use be16_add_cpu()" Jiri Slaby
` (28 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Horia Geant?, Herbert Xu, Jiri Slaby
From: Horia Geant? <horia.geanta@freescale.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 5fa7dadc898567ce14d6d6d427e7bd8ce6eb5d39 upstream.
Fixes: 1d11911a8c57 ("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function")
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/crypto/talitos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 661dc3eb1d66..9f6ba4c03bdb 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2563,6 +2563,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
break;
default:
dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type);
+ kfree(t_alg);
return ERR_PTR(-EINVAL);
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] Revert "crypto: talitos - convert to use be16_add_cpu()"
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (18 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] crypto: talitos - avoid memleak in talitos_alg_alloc() Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] iommu/amd: Handle large pages correctly in free_pagetable Jiri Slaby
` (27 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Horia Geant?, Wei Yongjun, Herbert Xu, Jiri Slaby
From: Horia Geant? <horia.geanta@freescale.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 69d9cd8c592f1abce820dbce7181bbbf6812cfbd upstream.
This reverts commit 7291a932c6e27d9768e374e9d648086636daf61c.
The conversion to be16_add_cpu() is incorrect in case cryptlen is
negative due to premature (i.e. before addition / subtraction)
implicit conversion of cryptlen (int -> u16) leading to sign loss.
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/crypto/talitos.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 9f6ba4c03bdb..06cd717b2cc9 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -935,7 +935,8 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count,
sg_count--;
link_tbl_ptr--;
}
- be16_add_cpu(&link_tbl_ptr->len, cryptlen);
+ link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len)
+ + cryptlen);
/* tag end of link table */
link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] iommu/amd: Handle large pages correctly in free_pagetable
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (19 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] Revert "crypto: talitos - convert to use be16_add_cpu()" Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm: KVM: force execution of HCPTR access on VM exit Jiri Slaby
` (26 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Joerg Roedel, Jiri Slaby
From: Joerg Roedel <jroedel@suse.de>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 0b3fff54bc01e8e6064d222a33e6fa7adabd94cd upstream.
Make sure that we are skipping over large PTEs while walking
the page-table tree.
Fixes: 5c34c403b723 ("iommu/amd: Fix memory leak in free_pagetable")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/iommu/amd_iommu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 27f9b8d433a3..b853bb47fc7d 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1915,9 +1915,15 @@ static void free_pt_##LVL (unsigned long __pt) \
pt = (u64 *)__pt; \
\
for (i = 0; i < 512; ++i) { \
+ /* PTE present? */ \
if (!IOMMU_PTE_PRESENT(pt[i])) \
continue; \
\
+ /* Large PTE? */ \
+ if (PM_PTE_LEVEL(pt[i]) == 0 || \
+ PM_PTE_LEVEL(pt[i]) == 7) \
+ continue; \
+ \
p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \
FN(p); \
} \
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] arm: KVM: force execution of HCPTR access on VM exit
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (20 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] iommu/amd: Handle large pages correctly in free_pagetable Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] powerpc/perf: Fix book3s kernel to userspace backtraces Jiri Slaby
` (25 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Marc Zyngier, Jiri Slaby
From: Marc Zyngier <marc.zyngier@arm.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 85e84ba31039595995dae80b277378213602891b upstream.
On VM entry, we disable access to the VFP registers in order to
perform a lazy save/restore of these registers.
On VM exit, we restore access, test if we did enable them before,
and save/restore the guest/host registers if necessary. In this
sequence, the FPEXC register is always accessed, irrespective
of the trapping configuration.
If the guest didn't touch the VFP registers, then the HCPTR access
has now enabled such access, but we're missing a barrier to ensure
architectural execution of the new HCPTR configuration. If the HCPTR
access has been delayed/reordered, the subsequent access to FPEXC
will cause a trap, which we aren't prepared to handle at all.
The same condition exists when trapping to enable VFP for the guest.
The fix is to introduce a barrier after enabling VFP access. In the
vmexit case, it can be relaxed to only takes place if the guest hasn't
accessed its view of the VFP registers, making the access to FPEXC safe.
The set_hcptr macro is modified to deal with both vmenter/vmexit and
vmtrap operations, and now takes an optional label that is branched to
when the guest hasn't touched the VFP registers.
Reported-by: Vikram Sethi <vikrams@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arm/kvm/interrupts.S | 10 ++++------
arch/arm/kvm/interrupts_head.S | 20 ++++++++++++++++++--
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
index 0d68d4073068..a1467e7689f5 100644
--- a/arch/arm/kvm/interrupts.S
+++ b/arch/arm/kvm/interrupts.S
@@ -159,13 +159,9 @@ __kvm_vcpu_return:
@ Don't trap coprocessor accesses for host kernel
set_hstr vmexit
set_hdcr vmexit
- set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11))
+ set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)), after_vfp_restore
#ifdef CONFIG_VFPv3
- @ Save floating point registers we if let guest use them.
- tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11))
- bne after_vfp_restore
-
@ Switch VFP/NEON hardware state to the host's
add r7, vcpu, #VCPU_VFP_GUEST
store_vfp_state r7
@@ -177,6 +173,8 @@ after_vfp_restore:
@ Restore FPEXC_EN which we clobbered on entry
pop {r2}
VFPFMXR FPEXC, r2
+#else
+after_vfp_restore:
#endif
@ Reset Hyp-role
@@ -467,7 +465,7 @@ switch_to_guest_vfp:
push {r3-r7}
@ NEON/VFP used. Turn on VFP access.
- set_hcptr vmexit, (HCPTR_TCP(10) | HCPTR_TCP(11))
+ set_hcptr vmtrap, (HCPTR_TCP(10) | HCPTR_TCP(11))
@ Switch VFP/NEON hardware state to the guest's
add r7, r0, #VCPU_VFP_HOST
diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S
index 76af93025574..2973b2d342fa 100644
--- a/arch/arm/kvm/interrupts_head.S
+++ b/arch/arm/kvm/interrupts_head.S
@@ -578,8 +578,13 @@ vcpu .req r0 @ vcpu pointer always in r0
.endm
/* Configures the HCPTR (Hyp Coprocessor Trap Register) on entry/return
- * (hardware reset value is 0). Keep previous value in r2. */
-.macro set_hcptr operation, mask
+ * (hardware reset value is 0). Keep previous value in r2.
+ * An ISB is emited on vmexit/vmtrap, but executed on vmexit only if
+ * VFP wasn't already enabled (always executed on vmtrap).
+ * If a label is specified with vmexit, it is branched to if VFP wasn't
+ * enabled.
+ */
+.macro set_hcptr operation, mask, label = none
mrc p15, 4, r2, c1, c1, 2
ldr r3, =\mask
.if \operation == vmentry
@@ -588,6 +593,17 @@ vcpu .req r0 @ vcpu pointer always in r0
bic r3, r2, r3 @ Don't trap defined coproc-accesses
.endif
mcr p15, 4, r3, c1, c1, 2
+ .if \operation != vmentry
+ .if \operation == vmexit
+ tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11))
+ beq 1f
+ .endif
+ isb
+ .if \label != none
+ b \label
+ .endif
+1:
+ .endif
.endm
/* Configures the HDCR (Hyp Debug Configuration Register) on entry/return
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] powerpc/perf: Fix book3s kernel to userspace backtraces
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (21 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm: KVM: force execution of HCPTR access on VM exit Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A Jiri Slaby
` (24 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Anton Blanchard, Michael Ellerman, Jiri Slaby
From: Anton Blanchard <anton@samba.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 72e349f1124a114435e599479c9b8d14bfd1ebcd upstream.
When we take a PMU exception or a software event we call
perf_read_regs(). This overloads regs->result with a boolean that
describes if we should use the sampled instruction address register
(SIAR) or the regs.
If the exception is in kernel, we start with the kernel regs and
backtrace through the kernel stack. At this point we switch to the
userspace regs and backtrace the user stack with perf_callchain_user().
Unfortunately these regs have not got the perf_read_regs() treatment,
so regs->result could be anything. If it is non zero,
perf_instruction_pointer() decides to use the SIAR, and we get issues
like this:
0.11% qemu-system-ppc [kernel.kallsyms] [k] _raw_spin_lock_irqsave
|
---_raw_spin_lock_irqsave
|
|--52.35%-- 0
| |
| |--46.39%-- __hrtimer_start_range_ns
| | kvmppc_run_core
| | kvmppc_vcpu_run_hv
| | kvmppc_vcpu_run
| | kvm_arch_vcpu_ioctl_run
| | kvm_vcpu_ioctl
| | do_vfs_ioctl
| | sys_ioctl
| | system_call
| | |
| | |--67.08%-- _raw_spin_lock_irqsave <--- hi mum
| | | |
| | | --100.00%-- 0x7e714
| | | 0x7e714
Notice the bogus _raw_spin_irqsave when we transition from kernel
(system_call) to userspace (0x7e714). We inserted what was in the SIAR.
Add a check in regs_use_siar() to check that the regs in question
are from a PMU exception. With this fix the backtrace makes sense:
0.47% qemu-system-ppc [kernel.vmlinux] [k] _raw_spin_lock_irqsave
|
---_raw_spin_lock_irqsave
|
|--53.83%-- 0
| |
| |--44.73%-- hrtimer_try_to_cancel
| | kvmppc_start_thread
| | kvmppc_run_core
| | kvmppc_vcpu_run_hv
| | kvmppc_vcpu_run
| | kvm_arch_vcpu_ioctl_run
| | kvm_vcpu_ioctl
| | do_vfs_ioctl
| | sys_ioctl
| | system_call
| | __ioctl
| | 0x7e714
| | 0x7e714
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/powerpc/perf/core-book3s.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 57a8ff90ed60..9610a08ef49c 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -124,7 +124,16 @@ static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {}
static bool regs_use_siar(struct pt_regs *regs)
{
- return !!regs->result;
+ /*
+ * When we take a performance monitor exception the regs are setup
+ * using perf_read_regs() which overloads some fields, in particular
+ * regs->result to tell us whether to use SIAR.
+ *
+ * However if the regs are from another exception, eg. a syscall, then
+ * they have not been setup using perf_read_regs() and so regs->result
+ * is something random.
+ */
+ return ((TRAP(regs) == 0xf00) && regs->result);
}
/*
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (22 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] powerpc/perf: Fix book3s kernel to userspace backtraces Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] MIPS: Fix KVM guest fixmap address Jiri Slaby
` (23 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Bjorn Helgaas, Jiri Slaby
From: Bjorn Helgaas <bhelgaas@google.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 1dace0116d0b05c967d94644fc4dfe96be2ecd3d upstream.
The Foxconn K8M890-8237A has two PCI host bridges, and we can't assign
resources correctly without the information from _CRS that tells us which
address ranges are claimed by which bridge. In the bugs mentioned below,
we incorrectly assign a sound card address (this example is from 1033299):
bus: 00 index 2 [mem 0x80000000-0xfcffffffff]
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-7f])
pci_root PNP0A08:00: host bridge window [mem 0x80000000-0xbfefffff] (ignored)
pci_root PNP0A08:00: host bridge window [mem 0xc0000000-0xdfffffff] (ignored)
pci_root PNP0A08:00: host bridge window [mem 0xf0000000-0xfebfffff] (ignored)
ACPI: PCI Root Bridge [PCI1] (domain 0000 [bus 80-ff])
pci_root PNP0A08:01: host bridge window [mem 0xbff00000-0xbfffffff] (ignored)
pci 0000:80:01.0: [1106:3288] type 0 class 0x000403
pci 0000:80:01.0: reg 10: [mem 0xbfffc000-0xbfffffff 64bit]
pci 0000:80:01.0: address space collision: [mem 0xbfffc000-0xbfffffff 64bit] conflicts with PCI Bus #00 [mem 0x80000000-0xfcffffffff]
pci 0000:80:01.0: BAR 0: assigned [mem 0xfd00000000-0xfd00003fff 64bit]
BUG: unable to handle kernel paging request at ffffc90000378000
IP: [<ffffffffa0345f63>] azx_create+0x37c/0x822 [snd_hda_intel]
We assigned 0xfd_0000_0000, but that is not in any of the host bridge
windows, and the sound card doesn't work.
Turn on pci=use_crs automatically for this system.
Link: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368
Link: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/x86/pci/acpi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index b30e937689d6..3a3e99bde773 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -84,6 +84,17 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = {
DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
},
},
+ /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368 */
+ /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299 */
+ {
+ .callback = set_use_crs,
+ .ident = "Foxconn K8M890-8237A",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Foxconn"),
+ DMI_MATCH(DMI_BOARD_NAME, "K8M890-8237A"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+ },
+ },
/* Now for the blacklist.. */
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] MIPS: Fix KVM guest fixmap address
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (23 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] KVM: x86: make vapics_in_nmi_mode atomic Jiri Slaby
` (22 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: James Hogan, linux-mips, Ralf Baechle
From: James Hogan <james.hogan@imgtec.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 8e748c8d09a9314eedb5c6367d9acfaacddcdc88 upstream.
KVM guest kernels for trap & emulate run in user mode, with a modified
set of kernel memory segments. However the fixmap address is still in
the normal KSeg3 region at 0xfffe0000 regardless, causing problems when
cache alias handling makes use of them when handling copy on write.
Therefore define FIXADDR_TOP as 0x7ffe0000 in the guest kernel mapped
region when CONFIG_KVM_GUEST is defined.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9887/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/mips/include/asm/mach-generic/spaces.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
index 9488fa5f8866..afc96ecb9004 100644
--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
@@ -94,7 +94,11 @@
#endif
#ifndef FIXADDR_TOP
+#ifdef CONFIG_KVM_GUEST
+#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
+#else
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
#endif
+#endif
#endif /* __ASM_MACH_GENERIC_SPACES_H */
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] KVM: x86: make vapics_in_nmi_mode atomic
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (24 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] MIPS: Fix KVM guest fixmap address Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] fs: Fix S_NOSEC handling Jiri Slaby
` (21 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Paolo Bonzini, rkrcmar
From: Radim Krčmář <rkrcmar@redhat.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 42720138b06301cc8a7ee8a495a6d021c4b6a9bc upstream.
Writes were a bit racy, but hard to turn into a bug at the same time.
(Particularly because modern Linux doesn't use this feature anymore.)
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[Actually the next patch makes it much, much easier to trigger the race
so I'm including this one for stable@ as well. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/i8254.c | 2 +-
arch/x86/kvm/lapic.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 7cb77dd749df..55f8ca8c20e4 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -562,7 +562,7 @@ struct kvm_arch {
struct kvm_pic *vpic;
struct kvm_ioapic *vioapic;
struct kvm_pit *vpit;
- int vapics_in_nmi_mode;
+ atomic_t vapics_in_nmi_mode;
struct mutex apic_map_lock;
struct kvm_apic_map *apic_map;
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 298781d4cfb4..1406ffde3e35 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -305,7 +305,7 @@ static void pit_do_work(struct kthread_work *work)
* LVT0 to NMI delivery. Other PIC interrupts are just sent to
* VCPU0, and only if its LVT0 is in EXTINT mode.
*/
- if (kvm->arch.vapics_in_nmi_mode > 0)
+ if (atomic_read(&kvm->arch.vapics_in_nmi_mode) > 0)
kvm_for_each_vcpu(i, vcpu, kvm)
kvm_apic_nmi_wd_deliver(vcpu);
}
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 92bbb397f59d..a4ce2b2f1418 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1088,10 +1088,10 @@ static void apic_manage_nmi_watchdog(struct kvm_lapic *apic, u32 lvt0_val)
if (!nmi_wd_enabled) {
apic_debug("Receive NMI setting on APIC_LVT0 "
"for cpu %d\n", apic->vcpu->vcpu_id);
- apic->vcpu->kvm->arch.vapics_in_nmi_mode++;
+ atomic_inc(&apic->vcpu->kvm->arch.vapics_in_nmi_mode);
}
} else if (nmi_wd_enabled)
- apic->vcpu->kvm->arch.vapics_in_nmi_mode--;
+ atomic_dec(&apic->vcpu->kvm->arch.vapics_in_nmi_mode);
}
static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] fs: Fix S_NOSEC handling
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (25 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] KVM: x86: make vapics_in_nmi_mode atomic Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] vfs: Remove incorrect debugging WARN in prepend_path Jiri Slaby
` (20 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Jan Kara, Al Viro
From: Jan Kara <jack@suse.cz>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 2426f3910069ed47c0cc58559a6d088af7920201 upstream.
file_remove_suid() could mistakenly set S_NOSEC inode bit when root was
modifying the file. As a result following writes to the file by ordinary
user would avoid clearing suid or sgid bits.
Fix the bug by checking actual mode bits before setting S_NOSEC.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
fs/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index d9134a0f5dd9..9ec57cb0aacd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1599,8 +1599,8 @@ int file_remove_suid(struct file *file)
error = security_inode_killpriv(dentry);
if (!error && killsuid)
error = __remove_suid(dentry, killsuid);
- if (!error && (inode->i_sb->s_flags & MS_NOSEC))
- inode->i_flags |= S_NOSEC;
+ if (!error)
+ inode_has_no_xattr(inode);
return error;
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] vfs: Remove incorrect debugging WARN in prepend_path
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (26 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] fs: Fix S_NOSEC handling Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible Jiri Slaby
` (19 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Eric W. Biederman, Jiri Slaby
From: "Eric W. Biederman" <ebiederm@xmission.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 93e3bce6287e1fb3e60d3324ed08555b5bbafa89 upstream.
The warning message in prepend_path is unclear and outdated. It was
added as a warning that the mechanism for generating names of pseudo
files had been removed from prepend_path and d_dname should be used
instead. Unfortunately the warning reads like a general warning,
making it unclear what to do with it.
Remove the warning. The transition it was added to warn about is long
over, and I added code several years ago which in rare cases causes
the warning to fire on legitimate code, and the warning is now firing
and scaring people for no good reason.
Reported-by: Ivan Delalande <colona@arista.com>
Reported-by: Omar Sandoval <osandov@osandov.com>
Fixes: f48cfddc6729e ("vfs: In d_path don't call d_dname on a mount point")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
fs/dcache.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index e619730ade4c..64cfe24cdd88 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2812,17 +2812,6 @@ restart:
vfsmnt = &mnt->mnt;
continue;
}
- /*
- * Filesystems needing to implement special "root names"
- * should do so with ->d_dname()
- */
- if (IS_ROOT(dentry) &&
- (dentry->d_name.len != 1 ||
- dentry->d_name.name[0] != '/')) {
- WARN(1, "Root dentry has weird name <%.*s>\n",
- (int) dentry->d_name.len,
- dentry->d_name.name);
- }
if (!error)
error = is_mounted(vfsmnt) ? 1 : 2;
break;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (27 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] vfs: Remove incorrect debugging WARN in prepend_path Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing Jiri Slaby
` (18 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Eric W. Biederman
From: "Eric W. Biederman" <ebiederm@xmission.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit ceeb0e5d39fcdf4dca2c997bf225c7fc49200b37 upstream.
Limit the mounts fs_fully_visible considers to locked mounts.
Unlocked can always be unmounted so considering them adds hassle
but no security benefit.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
fs/namespace.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 9ae6837ef5bf..bdc6223a7500 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2939,11 +2939,15 @@ bool fs_fully_visible(struct file_system_type *type)
if (mnt->mnt.mnt_root != mnt->mnt.mnt_sb->s_root)
continue;
- /* This mount is not fully visible if there are any child mounts
- * that cover anything except for empty directories.
+ /* This mount is not fully visible if there are any
+ * locked child mounts that cover anything except for
+ * empty directories.
*/
list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
struct inode *inode = child->mnt_mountpoint->d_inode;
+ /* Only worry about locked mounts */
+ if (!(mnt->mnt.mnt_flags & MNT_LOCKED))
+ continue;
if (!S_ISDIR(inode->i_mode))
goto next;
if (inode->i_nlink > 2)
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (28 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] rcu: Correctly handle non-empty Tiny RCU callback list with none ready Jiri Slaby
` (17 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Bjorn Helgaas
From: Bjorn Helgaas <bhelgaas@google.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 3d9fecf6bfb8b12bc2f9a4c7109895a2a2bb9436 upstream.
We enable _CRS on all systems from 2008 and later. On older systems, we
ignore _CRS and assume the whole physical address space (excluding RAM and
other devices) is available for PCI devices, but on systems that support
physical address spaces larger than 4GB, it's doubtful that the area above
4GB is really available for PCI.
After d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible"), we
try to use that space above 4GB *first*, so we're more likely to put a
device there.
On Juan's Toshiba Satellite Pro U200, BIOS left the graphics, sound, 1394,
and card reader devices unassigned (but only after Windows had been
booted). Only the sound device had a 64-bit BAR, so it was the only device
placed above 4GB, and hence the only device that didn't work.
Keep _CRS enabled even on pre-2008 systems if they support physical address
space larger than 4GB.
Fixes: d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible")
Reported-and-tested-by: Juan Dayer <jdayer@outlook.com>
Reported-and-tested-by: Alan Horsfield <alan@hazelgarth.co.uk>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=99221
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=907092
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jiri Slaby <jslaby@suse.com>
---
arch/x86/pci/acpi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 3a3e99bde773..a24e9c2e95da 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -135,8 +135,10 @@ void __init pci_acpi_crs_quirks(void)
{
int year;
- if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008)
- pci_use_crs = false;
+ if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) {
+ if (iomem_resource.end <= 0xffffffff)
+ pci_use_crs = false;
+ }
dmi_check_system(pci_crs_quirks);
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] rcu: Correctly handle non-empty Tiny RCU callback list with none ready
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (29 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ipr: Increase default adapter init stage change timeout Jiri Slaby
` (16 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Paul E. McKenney, Jiri Slaby
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 6e91f8cb138625be96070b778d9ba71ce520ea7e upstream.
If, at the time __rcu_process_callbacks() is invoked, there are callbacks
in Tiny RCU's callback list, but none of them are ready to be invoked,
the current list-management code will knit the non-ready callbacks out
of the list. This can result in hangs and possibly worse. This commit
therefore inserts a check for there being no callbacks that can be
invoked immediately.
This bug is unlikely to occur -- you have to get a new callback between
the time rcu_sched_qs() or rcu_bh_qs() was called, but before we get to
__rcu_process_callbacks(). It was detected by the addition of RCU-bh
testing to rcutorture, which in turn was instigated by Iftekhar Ahmed's
mutation testing. Although this bug was made much more likely by
915e8a4fe45e (rcu: Remove fastpath from __rcu_process_callbacks()), this
did not cause the bug, but rather made it much more probable. That
said, it takes more than 40 hours of rcutorture testing, on average,
for this bug to appear, so this fix cannot be considered an emergency.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
kernel/rcutiny.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 9ed6075dc562..c64d0ba663e0 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -282,6 +282,11 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
/* Move the ready-to-invoke callbacks to a local list. */
local_irq_save(flags);
+ if (rcp->donetail == &rcp->rcucblist) {
+ /* No callbacks ready, so just leave. */
+ local_irq_restore(flags);
+ return;
+ }
RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, rcp->qlen, -1));
list = rcp->rcucblist;
rcp->rcucblist = *rcp->donetail;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] ipr: Increase default adapter init stage change timeout
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (30 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] rcu: Correctly handle non-empty Tiny RCU callback list with none ready Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] Disable write buffering on Toshiba ToPIC95 Jiri Slaby
` (15 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Brian King, James Bottomley, Jiri Slaby
From: Brian King <brking@linux.vnet.ibm.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 45c44b5ff9caa743ed9c2bfd44307c536c9caf1e upstream.
Increase the default init stage change timeout from 15 seconds to 30 seconds.
This resolves issues we have seen with some adapters not transitioning
to the first init stage within 15 seconds, which results in adapter
initialization failures.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/scsi/ipr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index c5f2e9a0a4a4..f6d379725a00 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -267,7 +267,7 @@
#define IPR_RUNTIME_RESET 0x40000000
#define IPR_IPL_INIT_MIN_STAGE_TIME 5
-#define IPR_IPL_INIT_DEFAULT_STAGE_TIME 15
+#define IPR_IPL_INIT_DEFAULT_STAGE_TIME 30
#define IPR_IPL_INIT_STAGE_UNKNOWN 0x0
#define IPR_IPL_INIT_STAGE_TRANSOP 0xB0000000
#define IPR_IPL_INIT_STAGE_MASK 0xff000000
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] Disable write buffering on Toshiba ToPIC95
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (31 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ipr: Increase default adapter init stage change timeout Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ALSA: hda - Add headset support to Acer Aspire V5 Jiri Slaby
` (14 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Ryan Underwood, Dominik Brodowski, Jiri Slaby
From: Ryan Underwood <nemesis@icequake.net>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 2fb22a8042fe96b4220843f79241c116d90922c4 upstream.
Disable write buffering on the Toshiba ToPIC95 if it is enabled by
somebody (it is not supposed to be a power-on default according to
the datasheet). On the ToPIC95, practically no 32-bit Cardbus card
will work under heavy load without locking up the whole system if
this is left enabled. I tried about a dozen. It does not affect
16-bit cards. This is similar to the O2 bugs in early controller
revisions it seems.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55961
Signed-off-by: Ryan C. Underwood <nemesis@icequake.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/pcmcia/topic.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/pcmcia/topic.h b/drivers/pcmcia/topic.h
index 615a45a8fe86..582688fe7505 100644
--- a/drivers/pcmcia/topic.h
+++ b/drivers/pcmcia/topic.h
@@ -104,6 +104,9 @@
#define TOPIC_EXCA_IF_CONTROL 0x3e /* 8 bit */
#define TOPIC_EXCA_IFC_33V_ENA 0x01
+#define TOPIC_PCI_CFG_PPBCN 0x3e /* 16-bit */
+#define TOPIC_PCI_CFG_PPBCN_WBEN 0x0400
+
static void topic97_zoom_video(struct pcmcia_socket *sock, int onoff)
{
struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
@@ -138,6 +141,7 @@ static int topic97_override(struct yenta_socket *socket)
static int topic95_override(struct yenta_socket *socket)
{
u8 fctrl;
+ u16 ppbcn;
/* enable 3.3V support for 16bit cards */
fctrl = exca_readb(socket, TOPIC_EXCA_IF_CONTROL);
@@ -146,6 +150,18 @@ static int topic95_override(struct yenta_socket *socket)
/* tell yenta to use exca registers to power 16bit cards */
socket->flags |= YENTA_16BIT_POWER_EXCA | YENTA_16BIT_POWER_DF;
+ /* Disable write buffers to prevent lockups under load with numerous
+ Cardbus cards, observed on Tecra 500CDT and reported elsewhere on the
+ net. This is not a power-on default according to the datasheet
+ but some BIOSes seem to set it. */
+ if (pci_read_config_word(socket->dev, TOPIC_PCI_CFG_PPBCN, &ppbcn) == 0
+ && socket->dev->revision <= 7
+ && (ppbcn & TOPIC_PCI_CFG_PPBCN_WBEN)) {
+ ppbcn &= ~TOPIC_PCI_CFG_PPBCN_WBEN;
+ pci_write_config_word(socket->dev, TOPIC_PCI_CFG_PPBCN, ppbcn);
+ dev_info(&socket->dev->dev, "Disabled ToPIC95 Cardbus write buffers.\n");
+ }
+
return 0;
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] ALSA: hda - Add headset support to Acer Aspire V5
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (32 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] Disable write buffering on Toshiba ToPIC95 Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 Jiri Slaby
` (13 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Takashi Iwai, Jiri Slaby
From: Takashi Iwai <tiwai@suse.de>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 7819717b11346b8a5420b223b46600e394049c66 upstream.
Acer Aspire V5 with ALC282 codec needs the similar quirk like Dell
laptops to support the headset mic. The headset mic pin is 0x19 and
it's not exposed by BIOS, thus we need to fix the pincfg as well.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96201
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
sound/pci/hda/patch_realtek.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8c6997ff6d2a..cdac002ea37a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3730,6 +3730,7 @@ enum {
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
ALC269_FIXUP_HEADSET_MODE,
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
+ ALC269_FIXUP_ASPIRE_HEADSET_MIC,
ALC269_FIXUP_ASUS_X101_FUNC,
ALC269_FIXUP_ASUS_X101_VERB,
ALC269_FIXUP_ASUS_X101,
@@ -3959,6 +3960,15 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_headset_mode_no_hp_mic,
},
+ [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
+ },
[ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
@@ -4071,6 +4081,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
+ SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (33 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ALSA: hda - Add headset support to Acer Aspire V5 Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ARC: add compiler barrier to LLSC based cmpxchg Jiri Slaby
` (12 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Takashi Iwai, Jiri Slaby
From: Takashi Iwai <tiwai@suse.de>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 4df3fd1700abbb53bd874143dfd1f9ac9e7cbf4b upstream.
Fujitsu Lifebook E780 sets the sequence number 0x0f to only only of
the two headphones, thus the driver tries to assign another as the
line-out, and this results in the inconsistent mapping between the
created jack ctl and the actual I/O. Due to this, PulseAudio doesn't
handle it properly and gets the silent output.
The fix is to ignore the non-HP sequencer checks.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99681
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
sound/pci/hda/patch_realtek.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cdac002ea37a..88e76482b92a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3712,6 +3712,7 @@ enum {
ALC269_FIXUP_LIFEBOOK,
ALC269_FIXUP_LIFEBOOK_EXTMIC,
ALC269_FIXUP_LIFEBOOK_HP_PIN,
+ ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
ALC269_FIXUP_AMIC,
ALC269_FIXUP_DMIC,
ALC269VB_FIXUP_AMIC,
@@ -3844,6 +3845,10 @@ static const struct hda_fixup alc269_fixups[] = {
{ }
},
},
+ [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
+ },
[ALC269_FIXUP_AMIC] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
@@ -4154,6 +4159,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
+ SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] ARC: add compiler barrier to LLSC based cmpxchg
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (34 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: Do not attempt to use init_mm in reset_context() Jiri Slaby
` (11 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Vineet Gupta, Jiri Slaby
From: Vineet Gupta <vgupta@synopsys.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit d57f727264f1425a94689bafc7e99e502cb135b5 upstream.
When auditing cmpxchg call sites, Chuck noted that gcc was optimizing
away some of the desired LDs.
| do {
| new = old = *ipi_data_ptr;
| new |= 1U << msg;
| } while (cmpxchg(ipi_data_ptr, old, new) != old);
was generating to below
| 8015cef8: ld r2,[r4,0] <-- First LD
| 8015cefc: bset r1,r2,r1
|
| 8015cf00: llock r3,[r4] <-- atomic op
| 8015cf04: brne r3,r2,8015cf10
| 8015cf08: scond r1,[r4]
| 8015cf0c: bnz 8015cf00
|
| 8015cf10: brne r3,r2,8015cf00 <-- Branch doesn't go to orig LD
Although this was fixed by adding a ACCESS_ONCE in this call site, it
seems safer (for now at least) to add compiler barrier to LLSC based
cmpxchg
Reported-by: Chuck Jordan <cjordan@synopsys.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arc/include/asm/cmpxchg.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h
index 03cd6894855d..90de5c528da2 100644
--- a/arch/arc/include/asm/cmpxchg.h
+++ b/arch/arc/include/asm/cmpxchg.h
@@ -25,10 +25,11 @@ __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new)
" scond %3, [%1] \n"
" bnz 1b \n"
"2: \n"
- : "=&r"(prev)
- : "r"(ptr), "ir"(expected),
- "r"(new) /* can't be "ir". scond can't take limm for "b" */
- : "cc");
+ : "=&r"(prev) /* Early clobber, to prevent reg reuse */
+ : "r"(ptr), /* Not "m": llock only supports reg direct addr mode */
+ "ir"(expected),
+ "r"(new) /* can't be "ir". scond can't take LIMM for "b" */
+ : "cc", "memory"); /* so that gcc knows memory is being written here */
return prev;
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] arm64: Do not attempt to use init_mm in reset_context()
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (35 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ARC: add compiler barrier to LLSC based cmpxchg Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP Jiri Slaby
` (10 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Catalin Marinas
From: Catalin Marinas <catalin.marinas@arm.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 565630d503ef24e44c252bed55571b3a0d68455f upstream.
After secondary CPU boot or hotplug, the active_mm of the idle thread is
&init_mm. The init_mm.pgd (swapper_pg_dir) is only meant for TTBR1_EL1
and must not be set in TTBR0_EL1. Since when active_mm == &init_mm the
TTBR0_EL1 is already set to the reserved value, there is no need to
perform any context reset.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arm64/mm/context.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c
index baa758d37021..76c1e6cd36fc 100644
--- a/arch/arm64/mm/context.c
+++ b/arch/arm64/mm/context.c
@@ -92,6 +92,14 @@ static void reset_context(void *info)
unsigned int cpu = smp_processor_id();
struct mm_struct *mm = current->active_mm;
+ /*
+ * current->active_mm could be init_mm for the idle thread immediately
+ * after secondary CPU boot or hotplug. TTBR0_EL1 is already set to
+ * the reserved value, so no need to reset any context.
+ */
+ if (mm == &init_mm)
+ return;
+
smp_rmb();
asid = cpu_last_asid + cpu;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (36 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: Do not attempt to use init_mm in reset_context() Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: vdso: work-around broken ELF toolchains in Makefile Jiri Slaby
` (9 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Catalin Marinas, Dave P Martin
From: Dave P Martin <Dave.Martin@arm.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit b9bcc919931611498e856eae9bf66337330d04cc upstream.
The memmap freeing code in free_unused_memmap() computes the end of
each memblock by adding the memblock size onto the base. However,
if SPARSEMEM is enabled then the value (start) used for the base
may already have been rounded downwards to work out which memmap
entries to free after the previous memblock.
This may cause memmap entries that are in use to get freed.
In general, you're not likely to hit this problem unless there
are at least 2 memblocks and one of them is not aligned to a
sparsemem section boundary. Note that carve-outs can increase
the number of memblocks by splitting the regions listed in the
device tree.
This problem doesn't occur with SPARSEMEM_VMEMMAP, because the
vmemmap code deals with freeing the unused regions of the memmap
instead of requiring the arch code to do it.
This patch gets the memblock base out of the memblock directly when
computing the block end address to ensure the correct value is used.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arm64/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index de2de5db628d..cfe3ad835d16 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -253,7 +253,7 @@ static void __init free_unused_memmap(void)
* memmap entries are valid from the bank end aligned to
* MAX_ORDER_NR_PAGES.
*/
- prev_end = ALIGN(start + __phys_to_pfn(reg->size),
+ prev_end = ALIGN(__phys_to_pfn(reg->base + reg->size),
MAX_ORDER_NR_PAGES);
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] arm64: vdso: work-around broken ELF toolchains in Makefile
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (37 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] cpuidle / menu: Return (-1) if there are no suitable states Jiri Slaby
` (8 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Will Deacon, Catalin Marinas, Jiri Slaby
From: Will Deacon <will.deacon@arm.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 6f1a6ae87c0c60d7c462ef8fd071f291aa7a9abb upstream.
When building the kernel with a bare-metal (ELF) toolchain, the -shared
option may not be passed down to collect2, resulting in silent corruption
of the vDSO image (in particular, the DYNAMIC section is omitted).
The effect of this corruption is that the dynamic linker fails to find
the vDSO symbols and libc is instead used for the syscalls that we
intended to optimise (e.g. gettimeofday). Functionally, there is no
issue as the sigreturn trampoline is still intact and located by the
kernel.
This patch fixes the problem by explicitly passing -shared to the linker
when building the vDSO.
Reported-by: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Reported-by: James Greenlaigh <james.greenhalgh@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arm64/kernel/vdso/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index a268a9af0c2d..a622dd0be9c4 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -15,6 +15,10 @@ ccflags-y := -shared -fno-common -fno-builtin
ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
$(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
+# Workaround for bare-metal (ELF) toolchains that neglect to pass -shared
+# down to collect2, resulting in silent corruption of the vDSO image.
+ccflags-y += -Wl,-shared
+
obj-y += vdso.o
extra-y += vdso.lds vdso-offsets.h
CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] cpuidle / menu: Return (-1) if there are no suitable states
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (38 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: vdso: work-around broken ELF toolchains in Makefile Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regmap: Fix regmap_bulk_read in BE mode Jiri Slaby
` (7 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Rafael J. Wysocki, Shilpasri G Bhat
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 3836785a1bdcd6706c68ad46bf53adc0b057b310 upstream.
If there is a PM QoS latency limit and all of the sufficiently shallow
C-states are disabled, the cpuidle menu governor returns 0 which on
some systems is CPUIDLE_DRIVER_STATE_START and shouldn't be returned
if that C-state has been disabled.
Fix the issue by modifying the menu governor to return (-1) in such
situations.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[shilpab: Backport to 3.10.y
- adjust context
- add a check if 'next_state' is less than 0 in 'cpuidle_idle_call()',
this ensures that we exit 'cpuidle_idle_call()' if governor->select()
returns negative value]
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/cpuidle/cpuidle.c | 3 +++
| 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 22c07fb6ab78..ef44248a5c37 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -133,6 +133,9 @@ int cpuidle_idle_call(void)
/* ask the governor for the next state */
next_state = cpuidle_curr_governor->select(drv, dev);
+ if (next_state < 0)
+ return -EBUSY;
+
if (need_resched()) {
dev->last_residency = 0;
/* give the governor an opportunity to reflect on the outcome */
--git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index cf7f2f0e4ef5..027c484e1ec9 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -297,7 +297,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
data->needs_update = 0;
}
- data->last_state_idx = 0;
+ data->last_state_idx = CPUIDLE_DRIVER_STATE_START - 1;
data->exit_us = 0;
/* Special case when user has set very strict latency requirement */
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] regmap: Fix regmap_bulk_read in BE mode
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (39 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] cpuidle / menu: Return (-1) if there are no suitable states Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regmap: Fix possible shift overflow in regmap_field_init() Jiri Slaby
` (6 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Arun Chandran, Mark Brown, Jiri Slaby
From: Arun Chandran <achandran@mvista.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 15b8d2c41fe5839582029f65c5f7004db451cc2b upstream.
In big endian mode regmap_bulk_read gives incorrect data
for byte reads.
This is because memcpy of a single byte from an address
after full word read gives different results when
endianness differs. ie. we get little-end in LE and big-end in BE.
Signed-off-by: Arun Chandran <achandran@mvista.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/base/regmap/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 9f7990187653..45aec73d09bd 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1736,7 +1736,7 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
&ival);
if (ret != 0)
return ret;
- memcpy(val + (i * val_bytes), &ival, val_bytes);
+ map->format.format_val(val + (i * val_bytes), ival, 0);
}
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] regmap: Fix possible shift overflow in regmap_field_init()
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (40 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regmap: Fix regmap_bulk_read in BE mode Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regulator: core: fix constraints output buffer Jiri Slaby
` (5 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Maxime Coquelin, Mark Brown, Jiri Slaby
From: Maxime Coquelin <maxime.coquelin@st.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 921cc29473a0d7c109105c1876ddb432f4a4be7d upstream.
The way the mask is generated in regmap_field_init() is wrong.
Indeed, a field initialized with msb = 31 and lsb = 0 provokes a shift
overflow while calculating the mask field.
On some 32 bits architectures, such as x86, the generated mask is 0,
instead of the expected 0xffffffff.
This patch uses GENMASK() to fix the problem, as this macro is already safe
regarding shift overflow.
[-js: in 3.12, we do not have GENMASK for general access. Define
locally as RM_GENMASK.]
Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/base/regmap/regmap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 45aec73d09bd..8ece0fe4033f 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -813,14 +813,16 @@ struct regmap *devm_regmap_init(struct device *dev,
}
EXPORT_SYMBOL_GPL(devm_regmap_init);
+#define RM_GENMASK(h, l) \
+ (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
+
static void regmap_field_init(struct regmap_field *rm_field,
struct regmap *regmap, struct reg_field reg_field)
{
- int field_bits = reg_field.msb - reg_field.lsb + 1;
rm_field->regmap = regmap;
rm_field->reg = reg_field.reg;
rm_field->shift = reg_field.lsb;
- rm_field->mask = ((BIT(field_bits) - 1) << reg_field.lsb);
+ rm_field->mask = RM_GENMASK(reg_field.msb, reg_field.lsb);
}
/**
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] regulator: core: fix constraints output buffer
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (41 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regmap: Fix possible shift overflow in regmap_field_init() Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] spi: pl022: Specify 'num-cs' property as required in devicetree binding Jiri Slaby
` (4 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Stefan Wahren, Mark Brown, Jiri Slaby
From: Stefan Wahren <stefan.wahren@i2se.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit a7068e3932eee8268c4ce4e080a338ee7b8a27bf upstream.
The buffer for condtraints debug isn't big enough to hold the output
in all cases. So fix this issue by increasing the buffer.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index ef79c1c4280f..eb87279f3c73 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -773,7 +773,7 @@ static int suspend_prepare(struct regulator_dev *rdev, suspend_state_t state)
static void print_constraints(struct regulator_dev *rdev)
{
struct regulation_constraints *constraints = rdev->constraints;
- char buf[80] = "";
+ char buf[160] = "";
int count = 0;
int ret;
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] spi: pl022: Specify 'num-cs' property as required in devicetree binding
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (42 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regulator: core: fix constraints output buffer Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger Jiri Slaby
` (3 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Mark Brown, Ezequiel Garcia
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit ea6055c46eda1e19e02209814955e13f334bbe1b upstream.
Since commit 39a6ac11df65 ("spi/pl022: Devicetree support w/o platform data")
the 'num-cs' parameter cannot be passed through platform data when probing
with devicetree. Instead, it's a required devicetree property.
Fix the binding documentation so the property is properly specified.
Fixes: 39a6ac11df65 ("spi/pl022: Devicetree support w/o platform data")
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
Documentation/devicetree/bindings/spi/spi_pl022.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi_pl022.txt b/Documentation/devicetree/bindings/spi/spi_pl022.txt
index 22ed6797216d..4d1673ca8cf8 100644
--- a/Documentation/devicetree/bindings/spi/spi_pl022.txt
+++ b/Documentation/devicetree/bindings/spi/spi_pl022.txt
@@ -4,9 +4,9 @@ Required properties:
- compatible : "arm,pl022", "arm,primecell"
- reg : Offset and length of the register set for the device
- interrupts : Should contain SPI controller interrupt
+- num-cs : total number of chipselects
Optional properties:
-- num-cs : total number of chipselects
- cs-gpios : should specify GPIOs used for chipselects.
The gpios will be referred to as reg = <index> in the SPI child nodes.
If unspecified, a single SPI device without a chip select can be used.
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (43 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] spi: pl022: Specify 'num-cs' property as required in devicetree binding Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] mtd: fix: avoid race condition when accessing mtd->usecount Jiri Slaby
` (2 subsequent siblings)
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Grygorii Strashko, Rafael J. Wysocki, Jiri Slaby
From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 084609bf727981c7a2e6e69aefe0052c9d793300 upstream.
Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
hibernation callbacks means those pm functions will not be
called upon hibernation - that leads to system crash on ARM during
freezing if gpio-led is used in combination with CPU led trigger.
It may happen after freeze_noirq stage (GPIO is suspended)
and before syscore_suspend stage (CPU led trigger is suspended)
- usually when disable_nonboot_cpus() is called.
Log:
PM: noirq freeze of devices complete after 1.425 msecs
Disabling non-boot CPUs ...
^ system may crash or stuck here with message (TI AM572x)
WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
CPU1: shutdown
^ or here
Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
assigns the suspend and hibernation callbacks and move
led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
build warnings.
Fixes: 73e1ab41a80d (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/leds/led-class.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index f37d63cf726b..825545cdfb10 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -178,6 +178,7 @@ void led_classdev_resume(struct led_classdev *led_cdev)
}
EXPORT_SYMBOL_GPL(led_classdev_resume);
+#ifdef CONFIG_PM_SLEEP
static int led_suspend(struct device *dev)
{
struct led_classdev *led_cdev = dev_get_drvdata(dev);
@@ -197,11 +198,9 @@ static int led_resume(struct device *dev)
return 0;
}
+#endif
-static const struct dev_pm_ops leds_class_dev_pm_ops = {
- .suspend = led_suspend,
- .resume = led_resume,
-};
+static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume);
/**
* led_classdev_register - register a new object of led_classdev class.
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] mtd: fix: avoid race condition when accessing mtd->usecount
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (44 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] mtd: dc21285: use raw spinlock functions for nw_gpio_lock Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping Jiri Slaby
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Brian Norris
From: Brian Norris <computersforpeace@gmail.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 073db4a51ee43ccb827f54a4261c0583b028d5ab upstream.
On A MIPS 32-cores machine a BUG_ON was triggered because some acesses to
mtd->usecount were done without taking mtd_table_mutex.
kernel: Call Trace:
kernel: [<ffffffff80401818>] __put_mtd_device+0x20/0x50
kernel: [<ffffffff804086f4>] blktrans_release+0x8c/0xd8
kernel: [<ffffffff802577e0>] __blkdev_put+0x1a8/0x200
kernel: [<ffffffff802579a4>] blkdev_close+0x1c/0x30
kernel: [<ffffffff8022006c>] __fput+0xac/0x250
kernel: [<ffffffff80171208>] task_work_run+0xd8/0x120
kernel: [<ffffffff8012c23c>] work_notifysig+0x10/0x18
kernel:
kernel:
Code: 2442ffff ac8202d8 000217fe <00020336> dc820128 10400003
00000000 0040f809 00000000
kernel: ---[ end trace 080fbb4579b47a73 ]---
Fixed by taking the mutex in blktrans_open and blktrans_release.
Note that this locking is already suggested in
include/linux/mtd/blktrans.h:
struct mtd_blktrans_ops {
...
/* Called with mtd_table_mutex held; no race with add/remove */
int (*open)(struct mtd_blktrans_dev *dev);
void (*release)(struct mtd_blktrans_dev *dev);
...
};
But we weren't following it.
Originally reported by (and patched by) Zhang and Giuseppe,
independently. Improved and rewritten.
Reported-by: Zhang Xingcai <zhangxingcai@huawei.com>
Reported-by: Giuseppe Cantavenera <giuseppe.cantavenera.ext@nokia.com>
Tested-by: Giuseppe Cantavenera <giuseppe.cantavenera.ext@nokia.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/mtd/mtd_blkdevs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 5073cbc796d8..32d5e40c6863 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -199,6 +199,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/
mutex_lock(&dev->lock);
+ mutex_lock(&mtd_table_mutex);
if (dev->open)
goto unlock;
@@ -222,6 +223,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
unlock:
dev->open++;
+ mutex_unlock(&mtd_table_mutex);
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
return ret;
@@ -232,6 +234,7 @@ error_release:
error_put:
module_put(dev->tr->owner);
kref_put(&dev->ref, blktrans_dev_release);
+ mutex_unlock(&mtd_table_mutex);
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
return ret;
@@ -245,6 +248,7 @@ static void blktrans_release(struct gendisk *disk, fmode_t mode)
return;
mutex_lock(&dev->lock);
+ mutex_lock(&mtd_table_mutex);
if (--dev->open)
goto unlock;
@@ -258,6 +262,7 @@ static void blktrans_release(struct gendisk *disk, fmode_t mode)
__put_mtd_device(dev->mtd);
}
unlock:
+ mutex_unlock(&mtd_table_mutex);
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
}
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] mtd: dc21285: use raw spinlock functions for nw_gpio_lock
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (45 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] mtd: fix: avoid race condition when accessing mtd->usecount Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping Jiri Slaby
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Brian Norris, u.kleine-koenig
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit e5babdf928e5d0c432a8d4b99f20421ce14d1ab6 upstream.
Since commit bd31b85960a7 (which is in 3.2-rc1) nw_gpio_lock is a raw spinlock
that needs usage of the corresponding raw functions.
This fixes:
drivers/mtd/maps/dc21285.c: In function 'nw_en_write':
drivers/mtd/maps/dc21285.c:41:340: warning: passing argument 1 of 'spinlock_check' from incompatible pointer type
spin_lock_irqsave(&nw_gpio_lock, flags);
In file included from include/linux/seqlock.h:35:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mtd/maps/dc21285.c:8:
include/linux/spinlock.h:299:102: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
static inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
^
drivers/mtd/maps/dc21285.c:43:25: warning: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type
spin_unlock_irqrestore(&nw_gpio_lock, flags);
^
In file included from include/linux/seqlock.h:35:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mtd/maps/dc21285.c:8:
include/linux/spinlock.h:370:91: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
Fixes: bd31b85960a7 ("locking, ARM: Annotate low level hw locks as raw")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/mtd/maps/dc21285.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
index f8a7dd14cee0..70a3db3ab856 100644
--- a/drivers/mtd/maps/dc21285.c
+++ b/drivers/mtd/maps/dc21285.c
@@ -38,9 +38,9 @@ static void nw_en_write(void)
* we want to write a bit pattern XXX1 to Xilinx to enable
* the write gate, which will be open for about the next 2ms.
*/
- spin_lock_irqsave(&nw_gpio_lock, flags);
+ raw_spin_lock_irqsave(&nw_gpio_lock, flags);
nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE);
- spin_unlock_irqrestore(&nw_gpio_lock, flags);
+ raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
/*
* let the ISA bus to catch on...
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [patch added to the 3.12 stable tree] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
` (46 preceding siblings ...)
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] mtd: dc21285: use raw spinlock functions for nw_gpio_lock Jiri Slaby
@ 2015-07-27 8:02 ` Jiri Slaby
47 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:02 UTC (permalink / raw)
To: jslaby; +Cc: Mason, Zhang Rui, Lukasz Majewski
From: Lukasz Majewski <l.majewski@samsung.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 26bb0e9a1a938ec98ee07aa76533f1a711fba706 upstream.
It turns out that some boards can have instance->lower greater than 0 and
when thermal trend is dropping it results with next_target equal to -1.
Since the next_target is defined as unsigned long it is interpreted as
0xFFFFFFFF and larger than instance->upper.
As a result the next_target is set to instance->upper which ramps up to
maximal cooling device target when the temperature is steadily decreasing.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Cc: Mason <slash.tmp@free.fr>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/thermal/step_wise.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
index 769bfa3a4360..26d3aff18277 100644
--- a/drivers/thermal/step_wise.c
+++ b/drivers/thermal/step_wise.c
@@ -75,7 +75,7 @@ static unsigned long get_target_state(struct thermal_instance *instance,
next_target = instance->upper;
break;
case THERMAL_TREND_DROPPING:
- if (cur_state == instance->lower) {
+ if (cur_state <= instance->lower) {
if (!throttle)
next_target = THERMAL_NO_TARGET;
} else {
--
2.4.6
^ permalink raw reply related [flat|nested] 53+ messages in thread
* Re: [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs"
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs" Jiri Slaby
@ 2015-07-27 8:04 ` Christoph Hellwig
2015-07-27 8:20 ` Jiri Slaby
0 siblings, 1 reply; 53+ messages in thread
From: Christoph Hellwig @ 2015-07-27 8:04 UTC (permalink / raw)
To: jslaby
Cc: Christoph Hellwig, Jens Axboe, Andrew Morton, Linus Torvalds,
Jan Kara
On Mon, Jul 27, 2015 at 10:01:49AM +0200, Jiri Slaby wrote:
> From: Christoph Hellwig <hch@infradead.org>
>
> This patch has been added to the 3.12 stable tree. If you have any
> objections, please let us know.
How is reverting dead code -stable material?
.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs"
2015-07-27 8:04 ` Christoph Hellwig
@ 2015-07-27 8:20 ` Jiri Slaby
2015-07-30 12:13 ` Jiri Slaby
0 siblings, 1 reply; 53+ messages in thread
From: Jiri Slaby @ 2015-07-27 8:20 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Christoph Hellwig, Jens Axboe, Andrew Morton, Linus Torvalds,
Jan Kara, stable
On 07/27/2015, 10:04 AM, Christoph Hellwig wrote:
> On Mon, Jul 27, 2015 at 10:01:49AM +0200, Jiri Slaby wrote:
>> From: Christoph Hellwig <hch@infradead.org>
>>
>> This patch has been added to the 3.12 stable tree. If you have any
>> objections, please let us know.
>
> How is reverting dead code -stable material?
PLease see
http://www.spinics.net/lists/stable/msg95573.html
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs"
2015-07-27 8:20 ` Jiri Slaby
@ 2015-07-30 12:13 ` Jiri Slaby
0 siblings, 0 replies; 53+ messages in thread
From: Jiri Slaby @ 2015-07-30 12:13 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Christoph Hellwig, Jens Axboe, Andrew Morton, Linus Torvalds,
Jan Kara, stable
On 07/27/2015, 10:20 AM, Jiri Slaby wrote:
> On 07/27/2015, 10:04 AM, Christoph Hellwig wrote:
>> On Mon, Jul 27, 2015 at 10:01:49AM +0200, Jiri Slaby wrote:
>>> From: Christoph Hellwig <hch@infradead.org>
>>>
>>> This patch has been added to the 3.12 stable tree. If you have any
>>> objections, please let us know.
>>
>> How is reverting dead code -stable material?
>
> PLease see
> http://www.spinics.net/lists/stable/msg95573.html
Ok, after proper investigation, I dropped the patch as it does not makes
sense to do the revert when there are no users.
Thanks for pointing out.
--
js
suse labs
^ permalink raw reply [flat|nested] 53+ messages in thread
end of thread, other threads:[~2015-07-30 12:13 UTC | newest]
Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 8:01 [patch added to the 3.12 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] Btrfs: make xattr replace operations atomic Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] ARM: clk-imx6q: refine sata's parent Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] KVM: nSVM: Check for NRIPS support before updating control field Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] xfrm: release dst_orig in case of error in xfrm_lookup() Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] uninline destroy_super(), consolidate alloc_super() Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] get rid of s_files and files_lock Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs" Jiri Slaby
2015-07-27 8:04 ` Christoph Hellwig
2015-07-27 8:20 ` Jiri Slaby
2015-07-30 12:13 ` Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] PCI: pciehp: Add hotplug_lock to serialize hotplug events Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] arm64/mm: Remove hack in mmap randomize layout Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] bridge: fix multicast router rlist endless loop Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] net: don't wait for order-3 page allocation Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] sctp: fix ASCONF list handling Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] bridge: fix br_stp_set_bridge_priority race conditions Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] packet: read num_members once in packet_rcv_fanout() Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] packet: avoid out of bounds read in round robin fanout Jiri Slaby
2015-07-27 8:01 ` [patch added to the 3.12 stable tree] neigh: do not modify unlinked entries Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] sctp: Fix race between OOTB responce and route removal Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] crypto: talitos - avoid memleak in talitos_alg_alloc() Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] Revert "crypto: talitos - convert to use be16_add_cpu()" Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] iommu/amd: Handle large pages correctly in free_pagetable Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm: KVM: force execution of HCPTR access on VM exit Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] powerpc/perf: Fix book3s kernel to userspace backtraces Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] MIPS: Fix KVM guest fixmap address Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] KVM: x86: make vapics_in_nmi_mode atomic Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] fs: Fix S_NOSEC handling Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] vfs: Remove incorrect debugging WARN in prepend_path Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] rcu: Correctly handle non-empty Tiny RCU callback list with none ready Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ipr: Increase default adapter init stage change timeout Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] Disable write buffering on Toshiba ToPIC95 Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ALSA: hda - Add headset support to Acer Aspire V5 Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] ARC: add compiler barrier to LLSC based cmpxchg Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: Do not attempt to use init_mm in reset_context() Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] arm64: vdso: work-around broken ELF toolchains in Makefile Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] cpuidle / menu: Return (-1) if there are no suitable states Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regmap: Fix regmap_bulk_read in BE mode Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regmap: Fix possible shift overflow in regmap_field_init() Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] regulator: core: fix constraints output buffer Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] spi: pl022: Specify 'num-cs' property as required in devicetree binding Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] mtd: fix: avoid race condition when accessing mtd->usecount Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] mtd: dc21285: use raw spinlock functions for nw_gpio_lock Jiri Slaby
2015-07-27 8:02 ` [patch added to the 3.12 stable tree] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping Jiri Slaby
-- strict thread matches above, loose matches on Subject: below --
2015-06-30 13:35 [patch added to the 3.12 stable tree] ath3k: Add support of 0489:e076 AR3012 device Jiri Slaby
2015-06-30 13:36 ` [patch added to the 3.12 stable tree] revert "softirq: Add support for triggering softirq work on softirqs" Jiri Slaby
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).