* [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace
@ 2015-07-13 13:43 Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send Sasha Levin
` (35 more replies)
0 siblings, 36 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Eric W. Biederman, Sasha Levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 1b852bceb0d111e510d1a15826ecc4a19358d512 ]
Fresh mounts of proc and sysfs are a very special case that works very
much like a bind mount. Unfortunately the current structure can not
preserve the MNT_LOCK... mount flags. Therefore refactor the logic
into a form that can be modified to preserve those lock bits.
Add a new filesystem flag FS_USERNS_VISIBLE that requires some mount
of the filesystem be fully visible in the current mount namespace,
before the filesystem may be mounted.
Move the logic for calling fs_fully_visible from proc and sysfs into
fs/namespace.c where it has greater access to mount namespace state.
Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/namespace.c | 8 +++++++-
fs/proc/root.c | 5 +----
fs/sysfs/mount.c | 5 +----
include/linux/fs.h | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index a19d05c..5f01463 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2297,6 +2297,8 @@ unlock:
return err;
}
+static bool fs_fully_visible(struct file_system_type *fs_type);
+
/*
* create a new mount for userspace and request it to be added into the
* namespace's tree
@@ -2328,6 +2330,10 @@ static int do_new_mount(struct path *path, const char *fstype, int flags,
flags |= MS_NODEV;
mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV;
}
+ if (type->fs_flags & FS_USERNS_VISIBLE) {
+ if (!fs_fully_visible(type))
+ return -EPERM;
+ }
}
mnt = vfs_kern_mount(type, flags, name, data);
@@ -3125,7 +3131,7 @@ bool current_chrooted(void)
return chrooted;
}
-bool fs_fully_visible(struct file_system_type *type)
+static bool fs_fully_visible(struct file_system_type *type)
{
struct mnt_namespace *ns = current->nsproxy->mnt_ns;
struct mount *mnt;
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 094e44d..9e772f1 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -112,9 +112,6 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
ns = task_active_pid_ns(current);
options = data;
- if (!capable(CAP_SYS_ADMIN) && !fs_fully_visible(fs_type))
- return ERR_PTR(-EPERM);
-
/* Does the mounter have privilege over the pid namespace? */
if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN))
return ERR_PTR(-EPERM);
@@ -159,7 +156,7 @@ static struct file_system_type proc_fs_type = {
.name = "proc",
.mount = proc_mount,
.kill_sb = proc_kill_sb,
- .fs_flags = FS_USERNS_MOUNT,
+ .fs_flags = FS_USERNS_VISIBLE | FS_USERNS_MOUNT,
};
void __init proc_root_init(void)
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 8a49486..1c6ac6f 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -31,9 +31,6 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,
bool new_sb;
if (!(flags & MS_KERNMOUNT)) {
- if (!capable(CAP_SYS_ADMIN) && !fs_fully_visible(fs_type))
- return ERR_PTR(-EPERM);
-
if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET))
return ERR_PTR(-EPERM);
}
@@ -58,7 +55,7 @@ static struct file_system_type sysfs_fs_type = {
.name = "sysfs",
.mount = sysfs_mount,
.kill_sb = sysfs_kill_sb,
- .fs_flags = FS_USERNS_MOUNT,
+ .fs_flags = FS_USERNS_VISIBLE | FS_USERNS_MOUNT,
};
int __init sysfs_init(void)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9ab779e..84d6729 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1791,6 +1791,7 @@ struct file_system_type {
#define FS_HAS_SUBTYPE 4
#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
#define FS_USERNS_DEV_MOUNT 16 /* A userns mount does not imply MNT_NODEV */
+#define FS_USERNS_VISIBLE 32 /* FS must already be visible */
#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
struct dentry *(*mount) (struct file_system_type *, int,
const char *, void *);
@@ -1878,7 +1879,6 @@ extern int vfs_ustat(dev_t, struct kstatfs *);
extern int freeze_super(struct super_block *super);
extern int thaw_super(struct super_block *super);
extern bool our_mnt(struct vfsmount *mnt);
-extern bool fs_fully_visible(struct file_system_type *);
extern int current_umask(void);
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime Sasha Levin
` (34 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Nicolas Ferre, Greg Kroah-Hartman, Sasha Levin
From: Nicolas Ferre <nicolas.ferre@atmel.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 8687634b7908c42eb700e0469e110e02833611d1 ]
In RS485 mode, we may want to set the delay_rts_after_send value to 0.
In the datasheet, the 0 value is said to "disable" the Transmitter Timeguard but
this is exactly the expected behavior if we want no delay...
Moreover, if the value was set to non-zero value by device-tree or earlier
ioctl command, it was impossible to change it back to zero.
Reported-by: Sami Pietikäinen <Sami.Pietikainen@wapice.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/tty/serial/atmel_serial.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 11300f7..daaed7c 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -311,8 +311,7 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf)
if (rs485conf->flags & SER_RS485_ENABLED) {
dev_dbg(port->dev, "Setting UART to RS485\n");
atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;
- if ((rs485conf->delay_rts_after_send) > 0)
- UART_PUT_TTGR(port, rs485conf->delay_rts_after_send);
+ UART_PUT_TTGR(port, rs485conf->delay_rts_after_send);
mode |= ATMEL_US_USMODE_RS485;
} else {
dev_dbg(port->dev, "Setting UART to RS232\n");
@@ -2016,9 +2015,7 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
mode &= ~ATMEL_US_USMODE;
if (atmel_port->rs485.flags & SER_RS485_ENABLED) {
- if ((atmel_port->rs485.delay_rts_after_send) > 0)
- UART_PUT_TTGR(port,
- atmel_port->rs485.delay_rts_after_send);
+ UART_PUT_TTGR(port, atmel_port->rs485.delay_rts_after_send);
mode |= ATMEL_US_USMODE_RS485;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] kprobes/x86: Return correct length in __copy_instruction() Sasha Levin
` (33 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Eric W. Biederman, Sasha Levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 8c6cf9cc829fcd0b179b59f7fe288941d0e31108 ]
Ignore an existing mount if the locked readonly, nodev or atime
attributes are less permissive than the desired attributes
of the new mount.
On success ensure the new mount locks all of the same readonly, nodev and
atime attributes as the old mount.
The nosuid and noexec attributes are not checked here as this change
is destined for stable and enforcing those attributes causes a
regression in lxc and libvirt-lxc where those applications will not
start and there are no known executables on sysfs or proc and no known
way to create exectuables without code modifications
Cc: stable@vger.kernel.org
Fixes: e51db73532955 ("userns: Better restrictions on when proc and sysfs can be mounted")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/namespace.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 5f01463..6dff373 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2297,7 +2297,7 @@ unlock:
return err;
}
-static bool fs_fully_visible(struct file_system_type *fs_type);
+static bool fs_fully_visible(struct file_system_type *fs_type, int *new_mnt_flags);
/*
* create a new mount for userspace and request it to be added into the
@@ -2331,7 +2331,7 @@ static int do_new_mount(struct path *path, const char *fstype, int flags,
mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV;
}
if (type->fs_flags & FS_USERNS_VISIBLE) {
- if (!fs_fully_visible(type))
+ if (!fs_fully_visible(type, &mnt_flags))
return -EPERM;
}
}
@@ -3131,9 +3131,10 @@ bool current_chrooted(void)
return chrooted;
}
-static bool fs_fully_visible(struct file_system_type *type)
+static bool fs_fully_visible(struct file_system_type *type, int *new_mnt_flags)
{
struct mnt_namespace *ns = current->nsproxy->mnt_ns;
+ int new_flags = *new_mnt_flags;
struct mount *mnt;
bool visible = false;
@@ -3152,6 +3153,19 @@ static bool fs_fully_visible(struct file_system_type *type)
if (mnt->mnt.mnt_root != mnt->mnt.mnt_sb->s_root)
continue;
+ /* Verify the mount flags are equal to or more permissive
+ * than the proposed new mount.
+ */
+ if ((mnt->mnt.mnt_flags & MNT_LOCK_READONLY) &&
+ !(new_flags & MNT_READONLY))
+ continue;
+ if ((mnt->mnt.mnt_flags & MNT_LOCK_NODEV) &&
+ !(new_flags & MNT_NODEV))
+ continue;
+ if ((mnt->mnt.mnt_flags & MNT_LOCK_ATIME) &&
+ ((mnt->mnt.mnt_flags & MNT_ATIME_MASK) != (new_flags & MNT_ATIME_MASK)))
+ continue;
+
/* This mount is not fully visible if there are any child mounts
* that cover anything except for empty directories.
*/
@@ -3162,6 +3176,10 @@ static bool fs_fully_visible(struct file_system_type *type)
if (inode->i_nlink > 2)
goto next;
}
+ /* Preserve the locked attributes */
+ *new_mnt_flags |= mnt->mnt.mnt_flags & (MNT_LOCK_READONLY | \
+ MNT_LOCK_NODEV | \
+ MNT_LOCK_ATIME);
visible = true;
goto found;
next: ;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] kprobes/x86: Return correct length in __copy_instruction()
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected Sasha Levin
` (32 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits
Cc: Eugene Shatokhin, Masami Hiramatsu, Ingo Molnar, Sasha Levin
From: Eugene Shatokhin <eugene.shatokhin@rosalab.ru>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit c80e5c0c23ce2282476fdc64c4b5e3d3a40723fd ]
On x86-64, __copy_instruction() always returns 0 (error) if the
instruction uses %rip-relative addressing. This is because
kernel_insn_init() is called the second time for 'insn' instance
in such cases and sets all its fields to 0.
Because of this, trying to place a kprobe on such instruction
will fail, register_kprobe() will return -EINVAL.
This patch fixes the problem.
Signed-off-by: Eugene Shatokhin <eugene.shatokhin@rosalab.ru>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/20150317100918.28349.94654.stgit@localhost.localdomain
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/kprobes/core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 93d2c04..f2e281c 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -330,13 +330,16 @@ int __copy_instruction(u8 *dest, u8 *src)
{
struct insn insn;
kprobe_opcode_t buf[MAX_INSN_SIZE];
+ int length;
kernel_insn_init(&insn, (void *)recover_probed_instruction(buf, (unsigned long)src));
insn_get_length(&insn);
+ length = insn.length;
+
/* Another subsystem puts a breakpoint, failed to recover */
if (insn.opcode.bytes[0] == BREAKPOINT_INSTRUCTION)
return 0;
- memcpy(dest, insn.kaddr, insn.length);
+ memcpy(dest, insn.kaddr, length);
#ifdef CONFIG_X86_64
if (insn_rip_relative(&insn)) {
@@ -366,7 +369,7 @@ int __copy_instruction(u8 *dest, u8 *src)
*(s32 *) disp = (s32) newdisp;
}
#endif
- return insn.length;
+ return length;
}
static int arch_copy_kprobe(struct kprobe *p)
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (2 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] kprobes/x86: Return correct length in __copy_instruction() Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Sasha Levin
` (31 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits
Cc: Konrad Rzeszutek Wilk, Borislav Petkov, H. Peter Anvin,
Linus Torvalds, Michael Chan, Thomas Gleixner, boris.ostrovsky,
cascardo, david.vrabel, sanjeevb, siva.kallam, vyasevich,
xen-devel, Ingo Molnar, Sasha Levin
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit a6dfa128ce5c414ab46b1d690f7a1b8decb8526d ]
A huge amount of NIC drivers use the DMA API, however if
compiled under 32-bit an very important part of the DMA API can
be ommitted leading to the drivers not working at all
(especially if used with 'swiotlb=force iommu=soft').
As Prashant Sreedharan explains it: "the driver [tg3] uses
DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of
the dma "mapping" and dma_unmap_addr() to get the "mapping"
value. On most of the platforms this is a no-op, but ... with
"iommu=soft and swiotlb=force" this house keeping is required,
... otherwise we pass 0 while calling pci_unmap_/pci_dma_sync_
instead of the DMA address."
As such enable this even when using 32-bit kernels.
Reported-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Prashant Sreedharan <prashant@broadcom.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boris.ostrovsky@oracle.com
Cc: cascardo@linux.vnet.ibm.com
Cc: david.vrabel@citrix.com
Cc: sanjeevb@broadcom.com
Cc: siva.kallam@broadcom.com
Cc: vyasevich@gmail.com
Cc: xen-devel@lists.xensource.com
Link: http://lkml.kernel.org/r/20150417190448.GA9462@l.oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3635fff..c9148e2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -173,7 +173,7 @@ config SBUS
config NEED_DMA_MAP_STATE
def_bool y
- depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG
+ depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG || SWIOTLB
config NEED_SG_DMA_LENGTH
def_bool y
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (3 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs/ufs: revert "ufs: fix deadlocks introduced by sb mutex merge" Sasha Levin
` (30 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Chen Gang, Pablo Neira Ayuso, Sasha Levin
From: Chen Gang <gang.chen.5i5j@gmail.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit b18c5d15e8714336365d9d51782d5b53afa0443c ]
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: Sasha Levin <sasha.levin@oracle.com>
---
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 9e287cb..a5599fc 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -86,7 +86,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;
@@ -94,7 +94,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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] fs/ufs: revert "ufs: fix deadlocks introduced by sb mutex merge"
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (4 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex Sasha Levin
` (29 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits
Cc: Fabian Frederick, Ian Campbell, Evgeniy Dushistov,
Alexey Khoroshilov, Roger Pau Monne, Ian Jackson, Al Viro,
Andrew Morton, Sasha Levin
From: Fabian Frederick <fabf@skynet.be>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 13b987ea275840d74d9df9a44326632fab1894da ]
This reverts commit 9ef7db7f38d0 ("ufs: fix deadlocks introduced by sb
mutex merge") That patch tried to solve commit 0244756edc4b98c ("ufs: sb
mutex merge + mutex_destroy") which is itself partially reverted due to
multiple deadlocks.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Suggested-by: Jan Kara <jack@suse.cz>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ufs/inode.c | 5 ++++-
fs/ufs/namei.c | 14 ++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index be7d42c..2d93ab0 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -902,6 +902,9 @@ void ufs_evict_inode(struct inode * inode)
invalidate_inode_buffers(inode);
clear_inode(inode);
- if (want_delete)
+ if (want_delete) {
+ lock_ufs(inode->i_sb);
ufs_free_inode(inode);
+ unlock_ufs(inode->i_sb);
+ }
}
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index fd65deb..6515899 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -128,12 +128,12 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
if (l > sb->s_blocksize)
goto out_notlocked;
+ lock_ufs(dir->i_sb);
inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO);
err = PTR_ERR(inode);
if (IS_ERR(inode))
- goto out_notlocked;
+ goto out;
- lock_ufs(dir->i_sb);
if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) {
/* slow symlink */
inode->i_op = &ufs_symlink_inode_operations;
@@ -184,9 +184,13 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
struct inode * inode;
int err;
+ lock_ufs(dir->i_sb);
+ inode_inc_link_count(dir);
+
inode = ufs_new_inode(dir, S_IFDIR|mode);
+ err = PTR_ERR(inode);
if (IS_ERR(inode))
- return PTR_ERR(inode);
+ goto out_dir;
inode->i_op = &ufs_dir_inode_operations;
inode->i_fop = &ufs_dir_operations;
@@ -194,9 +198,6 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
inode_inc_link_count(inode);
- lock_ufs(dir->i_sb);
- inode_inc_link_count(dir);
-
err = ufs_make_empty(inode, dir);
if (err)
goto out_fail;
@@ -215,6 +216,7 @@ out_fail:
inode_dec_link_count(inode);
unlock_new_inode(inode);
iput (inode);
+out_dir:
inode_dec_link_count(dir);
unlock_ufs(dir->i_sb);
goto out;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (5 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs/ufs: revert "ufs: fix deadlocks introduced by sb mutex merge" Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv Sasha Levin
` (28 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits
Cc: Fabian Frederick, Ian Campbell, Evgeniy Dushistov,
Alexey Khoroshilov, Roger Pau Monne, Ian Jackson, Al Viro,
Andrew Morton, Sasha Levin
From: Fabian Frederick <fabf@skynet.be>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit cdd9eefdf905e92e7fc6cc393314efe68dc6ff66 ]
Commit 0244756edc4b98c ("ufs: sb mutex merge + mutex_destroy") generated
deadlocks in read/write mode on mkdir.
This patch partially reverts it keeping fixes by Andrew Morton and
mutex_destroy()
[AV: fixed a missing bit in ufs_remount()]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Reported-by: Ian Campbell <ian.campbell@citrix.com>
Suggested-by: Jan Kara <jack@suse.cz>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ufs/balloc.c | 34 +++++++++++++++++-----------------
fs/ufs/ialloc.c | 16 ++++++++--------
fs/ufs/super.c | 10 ++++++++++
fs/ufs/ufs.h | 1 +
4 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index 2c10360..a7106ed 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -51,8 +51,8 @@ void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count)
if (ufs_fragnum(fragment) + count > uspi->s_fpg)
ufs_error (sb, "ufs_free_fragments", "internal error");
-
- lock_ufs(sb);
+
+ mutex_lock(&UFS_SB(sb)->s_lock);
cgno = ufs_dtog(uspi, fragment);
bit = ufs_dtogd(uspi, fragment);
@@ -115,13 +115,13 @@ void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count)
if (sb->s_flags & MS_SYNCHRONOUS)
ubh_sync_block(UCPI_UBH(ucpi));
ufs_mark_sb_dirty(sb);
-
- unlock_ufs(sb);
+
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT\n");
return;
failed:
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT (FAILED)\n");
return;
}
@@ -151,7 +151,7 @@ void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count)
goto failed;
}
- lock_ufs(sb);
+ mutex_lock(&UFS_SB(sb)->s_lock);
do_more:
overflow = 0;
@@ -211,12 +211,12 @@ do_more:
}
ufs_mark_sb_dirty(sb);
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT\n");
return;
failed_unlock:
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
failed:
UFSD("EXIT (FAILED)\n");
return;
@@ -357,7 +357,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
usb1 = ubh_get_usb_first(uspi);
*err = -ENOSPC;
- lock_ufs(sb);
+ mutex_lock(&UFS_SB(sb)->s_lock);
tmp = ufs_data_ptr_to_cpu(sb, p);
if (count + ufs_fragnum(fragment) > uspi->s_fpb) {
@@ -378,19 +378,19 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
"fragment %llu, tmp %llu\n",
(unsigned long long)fragment,
(unsigned long long)tmp);
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
return INVBLOCK;
}
if (fragment < UFS_I(inode)->i_lastfrag) {
UFSD("EXIT (ALREADY ALLOCATED)\n");
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
return 0;
}
}
else {
if (tmp) {
UFSD("EXIT (ALREADY ALLOCATED)\n");
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
return 0;
}
}
@@ -399,7 +399,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
* There is not enough space for user on the device
*/
if (!capable(CAP_SYS_RESOURCE) && ufs_freespace(uspi, UFS_MINFREE) <= 0) {
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT (FAILED)\n");
return 0;
}
@@ -424,7 +424,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
ufs_clear_frags(inode, result + oldcount,
newcount - oldcount, locked_page != NULL);
}
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT, result %llu\n", (unsigned long long)result);
return result;
}
@@ -439,7 +439,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
fragment + count);
ufs_clear_frags(inode, result + oldcount, newcount - oldcount,
locked_page != NULL);
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT, result %llu\n", (unsigned long long)result);
return result;
}
@@ -477,7 +477,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
*err = 0;
UFS_I(inode)->i_lastfrag = max(UFS_I(inode)->i_lastfrag,
fragment + count);
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
if (newcount < request)
ufs_free_fragments (inode, result + newcount, request - newcount);
ufs_free_fragments (inode, tmp, oldcount);
@@ -485,7 +485,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
return result;
}
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT (FAILED)\n");
return 0;
}
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
index 7caa016..fd0203c 100644
--- a/fs/ufs/ialloc.c
+++ b/fs/ufs/ialloc.c
@@ -69,11 +69,11 @@ void ufs_free_inode (struct inode * inode)
ino = inode->i_ino;
- lock_ufs(sb);
+ mutex_lock(&UFS_SB(sb)->s_lock);
if (!((ino > 1) && (ino < (uspi->s_ncg * uspi->s_ipg )))) {
ufs_warning(sb, "ufs_free_inode", "reserved inode or nonexistent inode %u\n", ino);
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
return;
}
@@ -81,7 +81,7 @@ void ufs_free_inode (struct inode * inode)
bit = ufs_inotocgoff (ino);
ucpi = ufs_load_cylinder (sb, cg);
if (!ucpi) {
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
return;
}
ucg = ubh_get_ucg(UCPI_UBH(ucpi));
@@ -115,7 +115,7 @@ void ufs_free_inode (struct inode * inode)
ubh_sync_block(UCPI_UBH(ucpi));
ufs_mark_sb_dirty(sb);
- unlock_ufs(sb);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT\n");
}
@@ -193,7 +193,7 @@ struct inode *ufs_new_inode(struct inode *dir, umode_t mode)
sbi = UFS_SB(sb);
uspi = sbi->s_uspi;
- lock_ufs(sb);
+ mutex_lock(&sbi->s_lock);
/*
* Try to place the inode in its parent directory
@@ -331,21 +331,21 @@ cg_found:
sync_dirty_buffer(bh);
brelse(bh);
}
- unlock_ufs(sb);
+ mutex_unlock(&sbi->s_lock);
UFSD("allocating inode %lu\n", inode->i_ino);
UFSD("EXIT\n");
return inode;
fail_remove_inode:
- unlock_ufs(sb);
+ mutex_unlock(&sbi->s_lock);
clear_nlink(inode);
unlock_new_inode(inode);
iput(inode);
UFSD("EXIT (FAILED): err %d\n", err);
return ERR_PTR(err);
failed:
- unlock_ufs(sb);
+ mutex_unlock(&sbi->s_lock);
make_bad_inode(inode);
iput (inode);
UFSD("EXIT (FAILED): err %d\n", err);
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index da73801..aa7d50b 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -698,6 +698,7 @@ static int ufs_sync_fs(struct super_block *sb, int wait)
unsigned flags;
lock_ufs(sb);
+ mutex_lock(&UFS_SB(sb)->s_lock);
UFSD("ENTER\n");
@@ -715,6 +716,7 @@ static int ufs_sync_fs(struct super_block *sb, int wait)
ufs_put_cstotal(sb);
UFSD("EXIT\n");
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return 0;
@@ -1281,6 +1283,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
sync_filesystem(sb);
lock_ufs(sb);
+ mutex_lock(&UFS_SB(sb)->s_lock);
uspi = UFS_SB(sb)->s_uspi;
flags = UFS_SB(sb)->s_flags;
usb1 = ubh_get_usb_first(uspi);
@@ -1294,6 +1297,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
new_mount_opt = 0;
ufs_set_opt (new_mount_opt, ONERROR_LOCK);
if (!ufs_parse_options (data, &new_mount_opt)) {
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return -EINVAL;
}
@@ -1301,12 +1305,14 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
new_mount_opt |= ufstype;
} else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) {
pr_err("ufstype can't be changed during remount\n");
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return -EINVAL;
}
if ((*mount_flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) {
UFS_SB(sb)->s_mount_opt = new_mount_opt;
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return 0;
}
@@ -1330,6 +1336,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
*/
#ifndef CONFIG_UFS_FS_WRITE
pr_err("ufs was compiled with read-only support, can't be mounted as read-write\n");
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return -EINVAL;
#else
@@ -1339,11 +1346,13 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
ufstype != UFS_MOUNT_UFSTYPE_SUNx86 &&
ufstype != UFS_MOUNT_UFSTYPE_UFS2) {
pr_err("this ufstype is read-only supported\n");
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return -EINVAL;
}
if (!ufs_read_cylinder_structures(sb)) {
pr_err("failed during remounting\n");
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return -EPERM;
}
@@ -1351,6 +1360,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
#endif
}
UFS_SB(sb)->s_mount_opt = new_mount_opt;
+ mutex_unlock(&UFS_SB(sb)->s_lock);
unlock_ufs(sb);
return 0;
}
diff --git a/fs/ufs/ufs.h b/fs/ufs/ufs.h
index 2a07396..cf6368d 100644
--- a/fs/ufs/ufs.h
+++ b/fs/ufs/ufs.h
@@ -30,6 +30,7 @@ struct ufs_sb_info {
int work_queued; /* non-zero if the delayed work is queued */
struct delayed_work sync_work; /* FS sync delayed work */
spinlock_t work_lock; /* protects sync_work and work_queued */
+ struct mutex s_lock;
};
struct ufs_inode_info {
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (6 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:54 ` Marc Kleine-Budde
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs: Fix S_NOSEC handling Sasha Levin
` (27 subsequent siblings)
35 siblings, 1 reply; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Oliver Hartkopp, Marc Kleine-Budde, Sasha Levin
From: Oliver Hartkopp <socketcan@hartkopp.net>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 36c01245eb8046c16eee6431e7dbfbb302635fa8 ]
As reported by Manfred Schlaegl here
http://marc.info/?l=linux-netdev&m=143482089824232&w=2
commit 514ac99c64b "can: fix multiple delivery of a single CAN frame for
overlapping CAN filters" requires the skb->tstamp to be set to check for
identical CAN skbs.
As net timestamping is influenced by several players (netstamp_needed and
netdev_tstamp_prequeue) Manfred missed a proper timestamp which leads to
CAN frame loss.
As skb timestamping became now mandatory for CAN related skbs this patch
makes sure that received CAN skbs always have a proper timestamp set.
Maybe there's a better solution in the future but this patch fixes the
CAN frame loss so far.
Reported-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/net/can/dev.c | 5 +++++
drivers/net/can/slcan.c | 1 +
drivers/net/can/vcan.c | 3 +++
net/can/af_can.c | 6 +++++-
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 573b53b..bb686e1 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -360,6 +360,9 @@ unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx)
struct can_frame *cf = (struct can_frame *)skb->data;
u8 dlc = cf->can_dlc;
+ if (!(skb->tstamp.tv64))
+ __net_timestamp(skb);
+
netif_rx(priv->echo_skb[idx]);
priv->echo_skb[idx] = NULL;
@@ -496,6 +499,7 @@ struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf)
if (unlikely(!skb))
return NULL;
+ __net_timestamp(skb);
skb->protocol = htons(ETH_P_CAN);
skb->pkt_type = PACKET_BROADCAST;
skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -524,6 +528,7 @@ struct sk_buff *alloc_canfd_skb(struct net_device *dev,
if (unlikely(!skb))
return NULL;
+ __net_timestamp(skb);
skb->protocol = htons(ETH_P_CANFD);
skb->pkt_type = PACKET_BROADCAST;
skb->ip_summed = CHECKSUM_UNNECESSARY;
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index acb5b92..cb6b472 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -210,6 +210,7 @@ static void slc_bump(struct slcan *sl)
if (!skb)
return;
+ __net_timestamp(skb);
skb->dev = sl->dev;
skb->protocol = htons(ETH_P_CAN);
skb->pkt_type = PACKET_BROADCAST;
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 4e94057..30e4627 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -81,6 +81,9 @@ static void vcan_rx(struct sk_buff *skb, struct net_device *dev)
skb->dev = dev;
skb->ip_summed = CHECKSUM_UNNECESSARY;
+ if (!(skb->tstamp.tv64))
+ __net_timestamp(skb);
+
netif_rx_ni(skb);
}
diff --git a/net/can/af_can.c b/net/can/af_can.c
index d6030d6..9a32449 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -313,8 +313,12 @@ int can_send(struct sk_buff *skb, int loop)
return err;
}
- if (newskb)
+ if (newskb) {
+ if (!(newskb->tstamp.tv64))
+ __net_timestamp(newskb);
+
netif_rx_ni(newskb);
+ }
/* update statistics */
can_stats.tx_frames++;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] fs: Fix S_NOSEC handling
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (7 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] tracing: Have filter check for balanced ops Sasha Levin
` (26 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Jan Kara, Al Viro, Sasha Levin
From: Jan Kara <jack@suse.cz>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2426f3910069ed47c0cc58559a6d088af7920201 ]
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.
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 26753ba..56d1d2b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1631,8 +1631,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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] tracing: Have filter check for balanced ops
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (8 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs: Fix S_NOSEC handling Sasha Levin
@ 2015-07-13 13:43 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] sb_edac: Fix erroneous bytes->gigabytes conversion Sasha Levin
` (25 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:43 UTC (permalink / raw)
To: stable, stable-commits
Cc: Steven Rostedt, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Sasha Levin
From: Steven Rostedt <rostedt@goodmis.org>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2cf30dc180cea808077f003c5116388183e54f9e ]
When the following filter is used it causes a warning to trigger:
# cd /sys/kernel/debug/tracing
# echo "((dev==1)blocks==2)" > events/ext4/ext4_truncate_exit/filter
-bash: echo: write error: Invalid argument
# cat events/ext4/ext4_truncate_exit/filter
((dev==1)blocks==2)
^
parse_error: No error
------------[ cut here ]------------
WARNING: CPU: 2 PID: 1223 at kernel/trace/trace_events_filter.c:1640 replace_preds+0x3c5/0x990()
Modules linked in: bnep lockd grace bluetooth ...
CPU: 3 PID: 1223 Comm: bash Tainted: G W 4.1.0-rc3-test+ #450
Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012
0000000000000668 ffff8800c106bc98 ffffffff816ed4f9 ffff88011ead0cf0
0000000000000000 ffff8800c106bcd8 ffffffff8107fb07 ffffffff8136b46c
ffff8800c7d81d48 ffff8800d4c2bc00 ffff8800d4d4f920 00000000ffffffea
Call Trace:
[<ffffffff816ed4f9>] dump_stack+0x4c/0x6e
[<ffffffff8107fb07>] warn_slowpath_common+0x97/0xe0
[<ffffffff8136b46c>] ? _kstrtoull+0x2c/0x80
[<ffffffff8107fb6a>] warn_slowpath_null+0x1a/0x20
[<ffffffff81159065>] replace_preds+0x3c5/0x990
[<ffffffff811596b2>] create_filter+0x82/0xb0
[<ffffffff81159944>] apply_event_filter+0xd4/0x180
[<ffffffff81152bbf>] event_filter_write+0x8f/0x120
[<ffffffff811db2a8>] __vfs_write+0x28/0xe0
[<ffffffff811dda43>] ? __sb_start_write+0x53/0xf0
[<ffffffff812e51e0>] ? security_file_permission+0x30/0xc0
[<ffffffff811dc408>] vfs_write+0xb8/0x1b0
[<ffffffff811dc72f>] SyS_write+0x4f/0xb0
[<ffffffff816f5217>] system_call_fastpath+0x12/0x6a
---[ end trace e11028bd95818dcd ]---
Worse yet, reading the error message (the filter again) it says that
there was no error, when there clearly was. The issue is that the
code that checks the input does not check for balanced ops. That is,
having an op between a closed parenthesis and the next token.
This would only cause a warning, and fail out before doing any real
harm, but it should still not caues a warning, and the error reported
should work:
# cd /sys/kernel/debug/tracing
# echo "((dev==1)blocks==2)" > events/ext4/ext4_truncate_exit/filter
-bash: echo: write error: Invalid argument
# cat events/ext4/ext4_truncate_exit/filter
((dev==1)blocks==2)
^
parse_error: Meaningless filter expression
And give no kernel warning.
Link: http://lkml.kernel.org/r/20150615175025.7e809215@gandalf.local.home
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: stable@vger.kernel.org # 2.6.31+
Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
kernel/trace/trace_events_filter.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index bcb9145..51afcb7 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1369,19 +1369,24 @@ static int check_preds(struct filter_parse_state *ps)
{
int n_normal_preds = 0, n_logical_preds = 0;
struct postfix_elt *elt;
+ int cnt = 0;
list_for_each_entry(elt, &ps->postfix, list) {
- if (elt->op == OP_NONE)
+ if (elt->op == OP_NONE) {
+ cnt++;
continue;
+ }
+ cnt--;
if (elt->op == OP_AND || elt->op == OP_OR) {
n_logical_preds++;
continue;
}
n_normal_preds++;
+ WARN_ON_ONCE(cnt < 0);
}
- if (!n_normal_preds || n_logical_preds >= n_normal_preds) {
+ if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) {
parse_error(ps, FILT_ERR_INVALID_FILTER, 0);
return -EINVAL;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] sb_edac: Fix erroneous bytes->gigabytes conversion
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (9 preceding siblings ...)
2015-07-13 13:43 ` [added to the 3.18 stable tree] tracing: Have filter check for balanced ops Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: Zero the tuple in nfnl_cthelper_parse_tuple() Sasha Levin
` (24 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Jim Snow, Jim Snow, Lukasz Anaczkowski, Mauro Carvalho Chehab,
Vinson Lee, Greg Kroah-Hartman, Sasha Levin
From: Jim Snow <jim.m.snow@intel.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit ece9210859abb2cc0126f8adbfbbdee668d4906a ]
commit 8c009100295597f23978c224aec5751a365bc965 upstream.
Signed-off-by: Jim Snow <jim.snow@intel.com>
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[ vlee: Backported to 3.14. Adjusted context. ]
Signed-off-by: Vinson Lee <vlee@twitter.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/edac/sb_edac.c | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index a46c4af..15697c6 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -910,7 +910,7 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
u32 reg;
u64 limit, prv = 0;
u64 tmp_mb;
- u32 mb, kb;
+ u32 gb, mb;
u32 rir_way;
/*
@@ -920,15 +920,17 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
pvt->tolm = pvt->info.get_tolm(pvt);
tmp_mb = (1 + pvt->tolm) >> 20;
- mb = div_u64_rem(tmp_mb, 1000, &kb);
- edac_dbg(0, "TOLM: %u.%03u GB (0x%016Lx)\n", mb, kb, (u64)pvt->tolm);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
+ edac_dbg(0, "TOLM: %u.%03u GB (0x%016Lx)\n",
+ gb, (mb*1000)/1024, (u64)pvt->tolm);
/* Address range is already 45:25 */
pvt->tohm = pvt->info.get_tohm(pvt);
tmp_mb = (1 + pvt->tohm) >> 20;
- mb = div_u64_rem(tmp_mb, 1000, &kb);
- edac_dbg(0, "TOHM: %u.%03u GB (0x%016Lx)\n", mb, kb, (u64)pvt->tohm);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
+ edac_dbg(0, "TOHM: %u.%03u GB (0x%016Lx)\n",
+ gb, (mb*1000)/1024, (u64)pvt->tohm);
/*
* Step 2) Get SAD range and SAD Interleave list
@@ -950,11 +952,11 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
break;
tmp_mb = (limit + 1) >> 20;
- mb = div_u64_rem(tmp_mb, 1000, &kb);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
edac_dbg(0, "SAD#%d %s up to %u.%03u GB (0x%016Lx) Interleave: %s reg=0x%08x\n",
n_sads,
get_dram_attr(reg),
- mb, kb,
+ gb, (mb*1000)/1024,
((u64)tmp_mb) << 20L,
INTERLEAVE_MODE(reg) ? "8:6" : "[8:6]XOR[18:16]",
reg);
@@ -985,9 +987,9 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
break;
tmp_mb = (limit + 1) >> 20;
- mb = div_u64_rem(tmp_mb, 1000, &kb);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
edac_dbg(0, "TAD#%d: up to %u.%03u GB (0x%016Lx), socket interleave %d, memory interleave %d, TGT: %d, %d, %d, %d, reg=0x%08x\n",
- n_tads, mb, kb,
+ n_tads, gb, (mb*1000)/1024,
((u64)tmp_mb) << 20L,
(u32)TAD_SOCK(reg),
(u32)TAD_CH(reg),
@@ -1010,10 +1012,10 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
tad_ch_nilv_offset[j],
®);
tmp_mb = TAD_OFFSET(reg) >> 20;
- mb = div_u64_rem(tmp_mb, 1000, &kb);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
edac_dbg(0, "TAD CH#%d, offset #%d: %u.%03u GB (0x%016Lx), reg=0x%08x\n",
i, j,
- mb, kb,
+ gb, (mb*1000)/1024,
((u64)tmp_mb) << 20L,
reg);
}
@@ -1035,10 +1037,10 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
tmp_mb = pvt->info.rir_limit(reg) >> 20;
rir_way = 1 << RIR_WAY(reg);
- mb = div_u64_rem(tmp_mb, 1000, &kb);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
edac_dbg(0, "CH#%d RIR#%d, limit: %u.%03u GB (0x%016Lx), way: %d, reg=0x%08x\n",
i, j,
- mb, kb,
+ gb, (mb*1000)/1024,
((u64)tmp_mb) << 20L,
rir_way,
reg);
@@ -1049,10 +1051,10 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
®);
tmp_mb = RIR_OFFSET(reg) << 6;
- mb = div_u64_rem(tmp_mb, 1000, &kb);
+ gb = div_u64_rem(tmp_mb, 1024, &mb);
edac_dbg(0, "CH#%d RIR#%d INTL#%d, offset %u.%03u GB (0x%016Lx), tgt: %d, reg=0x%08x\n",
i, j, k,
- mb, kb,
+ gb, (mb*1000)/1024,
((u64)tmp_mb) << 20L,
(u32)RIR_RNK_TGT(reg),
reg);
@@ -1090,7 +1092,7 @@ static int get_memory_error_data(struct mem_ctl_info *mci,
u8 ch_way, sck_way, pkg, sad_ha = 0;
u32 tad_offset;
u32 rir_way;
- u32 mb, kb;
+ u32 mb, gb;
u64 ch_addr, offset, limit = 0, prv = 0;
@@ -1359,10 +1361,10 @@ static int get_memory_error_data(struct mem_ctl_info *mci,
continue;
limit = pvt->info.rir_limit(reg);
- mb = div_u64_rem(limit >> 20, 1000, &kb);
+ gb = div_u64_rem(limit >> 20, 1024, &mb);
edac_dbg(0, "RIR#%d, limit: %u.%03u GB (0x%016Lx), way: %d\n",
n_rir,
- mb, kb,
+ gb, (mb*1000)/1024,
limit,
1 << RIR_WAY(reg));
if (ch_addr <= limit)
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] netfilter: Zero the tuple in nfnl_cthelper_parse_tuple()
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (10 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] sb_edac: Fix erroneous bytes->gigabytes conversion Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set Sasha Levin
` (23 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Ian Wilson, Pablo Neira Ayuso, Sasha Levin
From: Ian Wilson <iwilson@brocade.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 78146572b9cd20452da47951812f35b1ad4906be ]
nfnl_cthelper_parse_tuple() is called from nfnl_cthelper_new(),
nfnl_cthelper_get() and nfnl_cthelper_del(). In each case they pass
a pointer to an nf_conntrack_tuple data structure local variable:
struct nf_conntrack_tuple tuple;
...
ret = nfnl_cthelper_parse_tuple(&tuple, tb[NFCTH_TUPLE]);
The problem is that this local variable is not initialized, and
nfnl_cthelper_parse_tuple() only initializes two fields: src.l3num and
dst.protonum. This leaves all other fields with undefined values
based on whatever is on the stack:
tuple->src.l3num = ntohs(nla_get_be16(tb[NFCTH_TUPLE_L3PROTONUM]));
tuple->dst.protonum = nla_get_u8(tb[NFCTH_TUPLE_L4PROTONUM]);
The symptom observed was that when the rpc and tns helpers were added
then traffic to port 1536 was being sent to user-space.
Signed-off-by: Ian Wilson <iwilson@brocade.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/netfilter/nfnetlink_cthelper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index a5599fc..54330fb 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -77,6 +77,9 @@ nfnl_cthelper_parse_tuple(struct nf_conntrack_tuple *tuple,
if (!tb[NFCTH_TUPLE_L3PROTONUM] || !tb[NFCTH_TUPLE_L4PROTONUM])
return -EINVAL;
+ /* Not all fields are initialized so first zero the tuple */
+ memset(tuple, 0, sizeof(struct nf_conntrack_tuple));
+
tuple->src.l3num = ntohs(nla_get_be16(tb[NFCTH_TUPLE_L3PROTONUM]));
tuple->dst.protonum = nla_get_u8(tb[NFCTH_TUPLE_L4PROTONUM]);
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (11 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: Zero the tuple in nfnl_cthelper_parse_tuple() Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: nf_tables: allow to change chain policy without hook if it exists Sasha Levin
` (22 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Pablo Neira Ayuso, Sasha Levin
From: Pablo Neira Ayuso <pablo@netfilter.org>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 749177ccc74f9c6d0f51bd78a15c652a2134aa11 ]
ip6tables extensions check for this flag to restrict match/target to a
given protocol. Without this flag set, SYNPROXY6 returns an error.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/netfilter/nft_compat.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
index 265e190..e22a296 100644
--- a/net/netfilter/nft_compat.c
+++ b/net/netfilter/nft_compat.c
@@ -97,6 +97,9 @@ nft_target_set_tgchk_param(struct xt_tgchk_param *par,
entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0;
break;
case AF_INET6:
+ if (proto)
+ entry->e6.ipv6.flags |= IP6T_F_PROTO;
+
entry->e6.ipv6.proto = proto;
entry->e6.ipv6.invflags = inv ? IP6T_INV_PROTO : 0;
break;
@@ -304,6 +307,9 @@ nft_match_set_mtchk_param(struct xt_mtchk_param *par, const struct nft_ctx *ctx,
entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0;
break;
case AF_INET6:
+ if (proto)
+ entry->e6.ipv6.flags |= IP6T_F_PROTO;
+
entry->e6.ipv6.proto = proto;
entry->e6.ipv6.invflags = inv ? IP6T_INV_PROTO : 0;
break;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] netfilter: nf_tables: allow to change chain policy without hook if it exists
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (12 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] x86/microcode/intel: Guard against stack overflow in the loader Sasha Levin
` (21 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Pablo Neira Ayuso, Sasha Levin
From: Pablo Neira Ayuso <pablo@netfilter.org>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit d6b6cb1d3e6f78d55c2d4043d77d0d8def3f3b99 ]
If there's an existing base chain, we have to allow to change the
default policy without indicating the hook information.
However, if the chain doesn't exists, we have to enforce the presence of
the hook attribute.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/netfilter/nf_tables_api.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 71b574c..9fe2baa 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1221,7 +1221,10 @@ static int nf_tables_newchain(struct sock *nlsk, struct sk_buff *skb,
if (nla[NFTA_CHAIN_POLICY]) {
if ((chain != NULL &&
- !(chain->flags & NFT_BASE_CHAIN)) ||
+ !(chain->flags & NFT_BASE_CHAIN)))
+ return -EOPNOTSUPP;
+
+ if (chain == NULL &&
nla[NFTA_CHAIN_HOOK] == NULL)
return -EOPNOTSUPP;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] x86/microcode/intel: Guard against stack overflow in the loader
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (13 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: nf_tables: allow to change chain policy without hook if it exists Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] Btrfs: make xattr replace operations atomic Sasha Levin
` (20 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Quentin Casasnovas, H. Peter Anvin, Fenghua Yu, Borislav Petkov,
Sasha Levin
From: Quentin Casasnovas <quentin.casasnovas@oracle.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4 ]
mc_saved_tmp is a static array allocated on the stack, we need to make
sure mc_saved_count stays within its bounds, otherwise we're overflowing
the stack in _save_mc(). A specially crafted microcode header could lead
to a kernel crash or potentially kernel execution.
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1422964824-22056-1-git-send-email-quentin.casasnovas@oracle.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/cpu/microcode/intel_early.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c
index ec9df6f..5e109a3 100644
--- a/arch/x86/kernel/cpu/microcode/intel_early.c
+++ b/arch/x86/kernel/cpu/microcode/intel_early.c
@@ -321,7 +321,7 @@ get_matching_model_microcode(int cpu, unsigned long start,
unsigned int mc_saved_count = mc_saved_data->mc_saved_count;
int i;
- while (leftover) {
+ while (leftover && mc_saved_count < ARRAY_SIZE(mc_saved_tmp)) {
mc_header = (struct microcode_header_intel *)ucode_ptr;
mc_size = get_totalsize(mc_header);
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] Btrfs: make xattr replace operations atomic
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (14 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] x86/microcode/intel: Guard against stack overflow in the loader Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: clk-imx6q: refine sata's parent Sasha Levin
` (19 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Filipe Manana, Chris Mason, Greg Kroah-Hartman, Sasha Levin
From: Filipe Manana <fdmanana@suse.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 02590fd855d1690568b2fa439c942e933221b57a ]
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
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 c81ce0c..f54511d 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -2920,7 +2920,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 fe69edd..ba5aec7 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -607,6 +607,7 @@ struct btrfs_path {
unsigned int leave_spinning:1;
unsigned int search_commit_root:1;
unsigned int need_commit_sem:1;
+ unsigned int skip_release_on_error:1;
};
/*
@@ -3686,6 +3687,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 fc8df86..1752625 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 00eacd8..01bad72 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -29,6 +29,7 @@
#include "xattr.h"
#include "disk-io.h"
#include "props.h"
+#include "locking.h"
ssize_t __btrfs_getxattr(struct inode *inode, const char *name,
@@ -91,7 +92,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);
@@ -103,84 +104,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(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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] ARM: clk-imx6q: refine sata's parent
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (15 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] Btrfs: make xattr replace operations atomic Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: nSVM: Check for NRIPS support before updating control field Sasha Levin
` (18 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Sebastien Szymanski, Shawn Guo, Dirk Behme, Greg Kroah-Hartman,
Sasha Levin
From: Sebastien Szymanski <sebastien.szymanski@armadeus.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 3a3ac04f0e0ef48c2d30ae6df7b8906421c2b35d ]
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
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 2daef61..5474a76 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -439,7 +439,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
clk[IMX6QDL_CLK_GPMI_IO] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28);
clk[IMX6QDL_CLK_GPMI_APB] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30);
clk[IMX6QDL_CLK_ROM] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0);
- clk[IMX6QDL_CLK_SATA] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4);
+ clk[IMX6QDL_CLK_SATA] = imx_clk_gate2("sata", "ahb", base + 0x7c, 4);
clk[IMX6QDL_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6);
clk[IMX6QDL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12);
clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14);
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] KVM: nSVM: Check for NRIPS support before updating control field
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (16 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: clk-imx6q: refine sata's parent Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] arm64/kvm: Fix assembler compatibility of macros Sasha Levin
` (17 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Bandan Das, Paolo Bonzini, Sasha Levin
From: Bandan Das <bsd@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit f104765b4f81fd74d69e0eb161e89096deade2db ]
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: Sasha Levin <sasha.levin@oracle.com>
---
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 170e7d4..b83bff8 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -511,8 +511,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) !=
@@ -4306,7 +4308,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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] arm64/kvm: Fix assembler compatibility of macros
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (17 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: nSVM: Check for NRIPS support before updating control field Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] iommu/amd: Handle large pages correctly in free_pagetable Sasha Levin
` (16 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Geoff Levand, Will Deacon, Sasha Levin
From: Geoff Levand <geoff@infradead.org>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 286fb1cc32b11c18da3573a8c8c37a4f9da16e30 ]
Some of the macros defined in kvm_arm.h are useful in assembly files, but are
not compatible with the assembler. Change any C language integer constant
definitions using appended U, UL, or ULL to the UL() preprocessor macro. Also,
add a preprocessor include of the asm/memory.h file which defines the UL()
macro.
Fixes build errors like these when using kvm_arm.h in assembly
source files:
Error: unexpected characters following instruction at operand 3 -- `and x0,x1,#((1U<<25)-1)'
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm64/include/asm/kvm_arm.h | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 7fd3e27..8afb863 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include/asm/kvm_arm.h
@@ -18,6 +18,7 @@
#ifndef __ARM64_KVM_ARM_H__
#define __ARM64_KVM_ARM_H__
+#include <asm/memory.h>
#include <asm/types.h>
/* Hyp Configuration Register (HCR) bits */
@@ -160,9 +161,9 @@
#endif
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
-#define VTTBR_BADDR_MASK (((1LLU << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
-#define VTTBR_VMID_SHIFT (48LLU)
-#define VTTBR_VMID_MASK (0xffLLU << VTTBR_VMID_SHIFT)
+#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
+#define VTTBR_VMID_SHIFT (UL(48))
+#define VTTBR_VMID_MASK (UL(0xFF) << VTTBR_VMID_SHIFT)
/* Hyp System Trap Register */
#define HSTR_EL2_TTEE (1 << 16)
@@ -185,13 +186,13 @@
/* Exception Syndrome Register (ESR) bits */
#define ESR_EL2_EC_SHIFT (26)
-#define ESR_EL2_EC (0x3fU << ESR_EL2_EC_SHIFT)
-#define ESR_EL2_IL (1U << 25)
+#define ESR_EL2_EC (UL(0x3f) << ESR_EL2_EC_SHIFT)
+#define ESR_EL2_IL (UL(1) << 25)
#define ESR_EL2_ISS (ESR_EL2_IL - 1)
#define ESR_EL2_ISV_SHIFT (24)
-#define ESR_EL2_ISV (1U << ESR_EL2_ISV_SHIFT)
+#define ESR_EL2_ISV (UL(1) << ESR_EL2_ISV_SHIFT)
#define ESR_EL2_SAS_SHIFT (22)
-#define ESR_EL2_SAS (3U << ESR_EL2_SAS_SHIFT)
+#define ESR_EL2_SAS (UL(3) << ESR_EL2_SAS_SHIFT)
#define ESR_EL2_SSE (1 << 21)
#define ESR_EL2_SRT_SHIFT (16)
#define ESR_EL2_SRT_MASK (0x1f << ESR_EL2_SRT_SHIFT)
@@ -205,16 +206,16 @@
#define ESR_EL2_FSC_TYPE (0x3c)
#define ESR_EL2_CV_SHIFT (24)
-#define ESR_EL2_CV (1U << ESR_EL2_CV_SHIFT)
+#define ESR_EL2_CV (UL(1) << ESR_EL2_CV_SHIFT)
#define ESR_EL2_COND_SHIFT (20)
-#define ESR_EL2_COND (0xfU << ESR_EL2_COND_SHIFT)
+#define ESR_EL2_COND (UL(0xf) << ESR_EL2_COND_SHIFT)
#define FSC_FAULT (0x04)
#define FSC_PERM (0x0c)
/* Hyp Prefetch Fault Address Register (HPFAR/HDFAR) */
-#define HPFAR_MASK (~0xFUL)
+#define HPFAR_MASK (~UL(0xf))
#define ESR_EL2_EC_UNKNOWN (0x00)
#define ESR_EL2_EC_WFI (0x01)
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] iommu/amd: Handle large pages correctly in free_pagetable
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (18 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] arm64/kvm: Fix assembler compatibility of macros Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] arm: KVM: force execution of HCPTR access on VM exit Sasha Levin
` (15 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Joerg Roedel, stable, Sasha Levin
From: Joerg Roedel <jroedel@suse.de>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 0b3fff54bc01e8e6064d222a33e6fa7adabd94cd ]
Make sure that we are skipping over large PTEs while walking
the page-table tree.
Cc: stable@kernel.org
Fixes: 5c34c403b723 ("iommu/amd: Fix memory leak in free_pagetable")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
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 505a9ad..fab0ea1 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1870,9 +1870,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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] arm: KVM: force execution of HCPTR access on VM exit
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (19 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] iommu/amd: Handle large pages correctly in free_pagetable Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: x86: make vapics_in_nmi_mode atomic Sasha Levin
` (14 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Marc Zyngier, Sasha Levin
From: Marc Zyngier <marc.zyngier@arm.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 85e84ba31039595995dae80b277378213602891b ]
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>
Cc: stable@kernel.org # v3.9+
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
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 01dcb0e..d66d608 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
@@ -472,7 +470,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 14d4883..f6f1481 100644
--- a/arch/arm/kvm/interrupts_head.S
+++ b/arch/arm/kvm/interrupts_head.S
@@ -599,8 +599,13 @@ ARM_BE8(rev r6, r6 )
.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
@@ -609,6 +614,17 @@ ARM_BE8(rev r6, r6 )
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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] KVM: x86: make vapics_in_nmi_mode atomic
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (20 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] arm: KVM: force execution of HCPTR access on VM exit Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] vfs: Remove incorrect debugging WARN in prepend_path Sasha Levin
` (13 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Radim Krčmář, Paolo Bonzini, Sasha Levin
From: Radim Krčmář <rkrcmar@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 42720138b06301cc8a7ee8a495a6d021c4b6a9bc ]
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]
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
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 6c0709f..306d152 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -571,7 +571,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 298781d..1406ffd 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 b8345dd..fe637ca 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1112,10 +1112,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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] vfs: Remove incorrect debugging WARN in prepend_path
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (21 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: x86: make vapics_in_nmi_mode atomic Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] x86/boot: Fix overflow warning with 32-bit binutils Sasha Levin
` (12 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Eric W. Biederman, Sasha Levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 93e3bce6287e1fb3e60d3324ed08555b5bbafa89 ]
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.
Cc: stable@vger.kernel.org
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: Sasha Levin <sasha.levin@oracle.com>
---
fs/dcache.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index e0750b8..d0539a4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2893,17 +2893,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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] x86/boot: Fix overflow warning with 32-bit binutils
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (22 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] vfs: Remove incorrect debugging WARN in prepend_path Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] perf: Fix ring_buffer_attach() RCU sync, again Sasha Levin
` (11 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Borislav Petkov, Borislav Petkov, Andrew Morton, H. Peter Anvin,
Linus Torvalds, Peter Zijlstra, Thomas Gleixner, Ingo Molnar,
Sasha Levin
From: Borislav Petkov <bp@alien8.de>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 04c17341b42699a5859a8afa05e64ba08a4e5235 ]
When building the kernel with 32-bit binutils built with support
only for the i386 target, we get the following warning:
arch/x86/kernel/head_32.S:66: Warning: shift count out of range (32 is not between 0 and 31)
The problem is that in that case, binutils' internal type
representation is 32-bit wide and the shift range overflows.
In order to fix this, manipulate the shift expression which
creates the 4GiB constant to not overflow the shift count.
Suggested-by: Michael Matz <matz@suse.de>
Reported-and-tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/head_32.S | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 30a2aa3..e7be529 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -61,9 +61,16 @@
#define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
#endif
-/* Number of possible pages in the lowmem region */
-LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT)
-
+/*
+ * Number of possible pages in the lowmem region.
+ *
+ * We shift 2 by 31 instead of 1 by 32 to the left in order to avoid a
+ * gas warning about overflowing shift count when gas has been compiled
+ * with only a host target support using a 32-bit type for internal
+ * representation.
+ */
+LOWMEM_PAGES = (((2<<31) - __PAGE_OFFSET) >> PAGE_SHIFT)
+
/* Enough space to fit pagetables for the low memory linear map */
MAPPING_BEYOND_END = PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] perf: Fix ring_buffer_attach() RCU sync, again
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (23 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] x86/boot: Fix overflow warning with 32-bit binutils Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] perf/x86: Honor the architectural performance monitoring version Sasha Levin
` (10 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Oleg Nesterov, Peter Zijlstra (Intel), Alexander Shishkin,
Andrew Morton, Andy Lutomirski, Borislav Petkov, Brian Gerst,
Denys Vlasenko, H. Peter Anvin, Linus Torvalds, Paul E. McKenney,
Thomas Gleixner, dave, der.herr, josh, tj, Ingo Molnar,
Sasha Levin
From: Oleg Nesterov <oleg@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2f993cf093643b98477c421fa2b9a98dcc940323 ]
While looking for other users of get_state/cond_sync. I Found
ring_buffer_attach() and it looks obviously buggy?
Don't we need to ensure that we have "synchronize" _between_
list_del() and list_add() ?
IOW. Suppose that ring_buffer_attach() preempts right_after
get_state_synchronize_rcu() and gp completes before spin_lock().
In this case cond_synchronize_rcu() does nothing and we reuse
->rb_entry without waiting for gp in between?
It also moves the ->rcu_pending check under "if (rb)", to make it
more readable imo.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave@stgolabs.net
Cc: der.herr@hofr.at
Cc: josh@joshtriplett.org
Cc: tj@kernel.org
Fixes: b69cf53640da ("perf: Fix a race between ring_buffer_detach() and ring_buffer_attach()")
Link: http://lkml.kernel.org/r/20150530200425.GA15748@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
kernel/events/core.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index e631dac..cb86038 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4057,20 +4057,20 @@ static void ring_buffer_attach(struct perf_event *event,
WARN_ON_ONCE(event->rcu_pending);
old_rb = event->rb;
- event->rcu_batches = get_state_synchronize_rcu();
- event->rcu_pending = 1;
-
spin_lock_irqsave(&old_rb->event_lock, flags);
list_del_rcu(&event->rb_entry);
spin_unlock_irqrestore(&old_rb->event_lock, flags);
- }
- if (event->rcu_pending && rb) {
- cond_synchronize_rcu(event->rcu_batches);
- event->rcu_pending = 0;
+ event->rcu_batches = get_state_synchronize_rcu();
+ event->rcu_pending = 1;
}
if (rb) {
+ if (event->rcu_pending) {
+ cond_synchronize_rcu(event->rcu_batches);
+ event->rcu_pending = 0;
+ }
+
spin_lock_irqsave(&rb->event_lock, flags);
list_add_rcu(&event->rb_entry, &rb->event_list);
spin_unlock_irqrestore(&rb->event_lock, flags);
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] perf/x86: Honor the architectural performance monitoring version
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (24 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] perf: Fix ring_buffer_attach() RCU sync, again Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later Sasha Levin
` (9 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Palik, Imre, Peter Zijlstra (Intel), Andrew Morton,
Andy Lutomirski, Anthony Liguori, Arnaldo Carvalho de Melo,
Borislav Petkov, Brian Gerst, Denys Vlasenko, H. Peter Anvin,
Linus Torvalds, Oleg Nesterov, Paul Mackerras, Thomas Gleixner,
Ingo Molnar, Sasha Levin
From: "Palik, Imre" <imrep@amazon.de>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 2c33645d366d13b969d936b68b9f4875b1fdddea ]
Architectural performance monitoring, version 1, doesn't support fixed counters.
Currently, even if a hypervisor advertises support for architectural
performance monitoring version 1, perf may still try to use the fixed
counters, as the constraints are set up based on the CPU model.
This patch ensures that perf honors the architectural performance monitoring
version returned by CPUID, and it only uses the fixed counters for version 2
and above.
(Some of the ideas in this patch came from Peter Zijlstra.)
Signed-off-by: Imre Palik <imrep@amazon.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Anthony Liguori <aliguori@amazon.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1433767609-1039-1-git-send-email-imrep.amz@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/cpu/perf_event_intel.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 498b6d9..df11583 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -2604,13 +2604,13 @@ __init int intel_pmu_init(void)
* counter, so do not extend mask to generic counters
*/
for_each_event_constraint(c, x86_pmu.event_constraints) {
- if (c->cmask != FIXED_EVENT_FLAGS
- || c->idxmsk64 == INTEL_PMC_MSK_FIXED_REF_CYCLES) {
- continue;
+ if (c->cmask == FIXED_EVENT_FLAGS
+ && c->idxmsk64 != INTEL_PMC_MSK_FIXED_REF_CYCLES) {
+ c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
}
-
- c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
- c->weight += x86_pmu.num_counters;
+ c->idxmsk64 &=
+ ~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed));
+ c->weight = hweight64(c->idxmsk64);
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (25 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] perf/x86: Honor the architectural performance monitoring version Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-19 10:43 ` Hans de Goede
2015-07-13 13:44 ` [added to the 3.18 stable tree] usb: gadget: f_fs: add extra check before unregister_gadget_item Sasha Levin
` (8 subsequent siblings)
35 siblings, 1 reply; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Hans de Goede, Maxime Ripard, Sasha Levin
From: Hans de Goede <hdegoede@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 8bf1b9b3d90194a174493febc731f7783f2adf1a ]
The touchscreen controller in the A13 and later has a different temperature
curve than the one in the original A10, change the compatible for the A13 and
later so that the kernel will use the correct curve.
Reported-by: Tong Zhang <lovewilliam@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/sun5i-a10s.dtsi | 2 +-
arch/arm/boot/dts/sun5i-a13.dtsi | 2 +-
arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 531272c..fd2bcd3 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -526,7 +526,7 @@
};
rtp: rtp@01c25000 {
- compatible = "allwinner,sun4i-a10-ts";
+ compatible = "allwinner,sun5i-a13-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
};
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index b131068..f9b01999 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -474,7 +474,7 @@
};
rtp: rtp@01c25000 {
- compatible = "allwinner,sun4i-a10-ts";
+ compatible = "allwinner,sun5i-a13-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
};
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 82097c9..dcff778 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -896,7 +896,7 @@
};
rtp: rtp@01c25000 {
- compatible = "allwinner,sun4i-a10-ts";
+ compatible = "allwinner,sun5i-a13-ts";
reg = <0x01c25000 0x100>;
interrupts = <0 29 4>;
};
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] usb: gadget: f_fs: add extra check before unregister_gadget_item
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (26 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] selinux: fix setting of security labels on NFS Sasha Levin
` (7 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Rui Miguel Silva, Felipe Balbi, Sasha Levin
From: Rui Miguel Silva <rui.silva@linaro.org>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit f14e9ad17f46051b02bffffac2036486097de19e ]
ffs_closed can race with configfs_rmdir which will call config_item_release, so
add an extra check to avoid calling the unregister_gadget_item with an null
gadget item.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/gadget/function/f_fs.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 63314ed..ab9b7ac 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -3400,6 +3400,7 @@ done:
static void ffs_closed(struct ffs_data *ffs)
{
struct ffs_dev *ffs_obj;
+ struct f_fs_opts *opts;
ENTER();
ffs_dev_lock();
@@ -3413,8 +3414,13 @@ static void ffs_closed(struct ffs_data *ffs)
if (ffs_obj->ffs_closed_callback)
ffs_obj->ffs_closed_callback(ffs);
- if (!ffs_obj->opts || ffs_obj->opts->no_configfs
- || !ffs_obj->opts->func_inst.group.cg_item.ci_parent)
+ if (ffs_obj->opts)
+ opts = ffs_obj->opts;
+ else
+ goto done;
+
+ if (opts->no_configfs || !opts->func_inst.group.cg_item.ci_parent
+ || !atomic_read(&opts->func_inst.group.cg_item.ci_kref.refcount))
goto done;
unregister_gadget_item(ffs_obj->opts->
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] selinux: fix setting of security labels on NFS
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (27 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] usb: gadget: f_fs: add extra check before unregister_gadget_item Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: s390: virtio-ccw: don't overwrite config space values Sasha Levin
` (6 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: J. Bruce Fields, Eric Paris, David Quigley, Paul Moore,
Sasha Levin
From: "J. Bruce Fields" <bfields@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 9fc2b4b436cff7d8403034676014f1be9d534942 ]
Before calling into the filesystem, vfs_setxattr calls
security_inode_setxattr, which ends up calling selinux_inode_setxattr in
our case. That returns -EOPNOTSUPP whenever SBLABEL_MNT is not set.
SBLABEL_MNT was supposed to be set by sb_finish_set_opts, which sets it
only if selinux_is_sblabel_mnt returns true.
The selinux_is_sblabel_mnt logic was broken by eadcabc697e9 "SELinux: do
all flags twiddling in one place", which didn't take into the account
the SECURITY_FS_USE_NATIVE behavior that had been introduced for nfs
with eb9ae686507b "SELinux: Add new labeling type native labels".
This caused setxattr's of security labels over NFSv4.2 to fail.
Cc: stable@kernel.org # 3.13
Cc: Eric Paris <eparis@redhat.com>
Cc: David Quigley <dpquigl@davequigley.com>
Reported-by: Richard Chan <rc556677@outlook.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
[PM: added the stable dependency]
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
security/selinux/hooks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index c603b20..b1e455b 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -405,7 +405,8 @@ static int selinux_is_sblabel_mnt(struct super_block *sb)
if (sbsec->behavior == SECURITY_FS_USE_XATTR ||
sbsec->behavior == SECURITY_FS_USE_TRANS ||
- sbsec->behavior == SECURITY_FS_USE_TASK)
+ sbsec->behavior == SECURITY_FS_USE_TASK ||
+ sbsec->behavior == SECURITY_FS_USE_NATIVE)
return 1;
/* Special handling for sysfs. Is genfs but also has setxattr handler*/
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] KVM: s390: virtio-ccw: don't overwrite config space values
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (28 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] selinux: fix setting of security labels on NFS Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: x86: properly restore LVT0 Sasha Levin
` (5 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Cornelia Huck, Christian Borntraeger, Paolo Bonzini, Sasha Levin
From: Cornelia Huck <cornelia.huck@de.ibm.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 431dae778aea4eed31bd12e5ee82edc571cd4d70 ]
Eric noticed problems with vhost-scsi and virtio-ccw: vhost-scsi
complained about overwriting values in the config space, which
was triggered by a broken implementation of virtio-ccw's config
get/set routines. It was probably sheer luck that we did not hit
this before.
When writing a value to the config space, the WRITE_CONF ccw will
always write from the beginning of the config space up to and
including the value to be set. If the config space up to the value
has not yet been retrieved from the device, however, we'll end up
overwriting values. Keep track of the known config space and update
if needed to avoid this.
Moreover, READ_CONF will only read the number of bytes it has been
instructed to retrieve, so we must not copy more than that to the
buffer, or we might overwrite trailing values.
Reported-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Eric Farman <farman@linux.vnet.ibm.com>
Tested-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/s390/kvm/virtio_ccw.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index bda52f1..397e6b8 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -64,6 +64,7 @@ struct virtio_ccw_device {
bool is_thinint;
bool going_away;
bool device_lost;
+ unsigned int config_ready;
void *airq_info;
};
@@ -758,8 +759,11 @@ static void virtio_ccw_get_config(struct virtio_device *vdev,
if (ret)
goto out_free;
- memcpy(vcdev->config, config_area, sizeof(vcdev->config));
- memcpy(buf, &vcdev->config[offset], len);
+ memcpy(vcdev->config, config_area, offset + len);
+ if (buf)
+ memcpy(buf, &vcdev->config[offset], len);
+ if (vcdev->config_ready < offset + len)
+ vcdev->config_ready = offset + len;
out_free:
kfree(config_area);
@@ -782,6 +786,9 @@ static void virtio_ccw_set_config(struct virtio_device *vdev,
if (!config_area)
goto out_free;
+ /* Make sure we don't overwrite fields. */
+ if (vcdev->config_ready < offset)
+ virtio_ccw_get_config(vdev, 0, NULL, offset);
memcpy(&vcdev->config[offset], buf, len);
/* Write the config area to the host. */
memcpy(config_area, vcdev->config, sizeof(vcdev->config));
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] KVM: x86: properly restore LVT0
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (29 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: s390: virtio-ccw: don't overwrite config space values Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible Sasha Levin
` (4 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits
Cc: Radim Krčmář, Paolo Bonzini, Greg Kroah-Hartman,
Sasha Levin
From: Radim Krčmář <rkrcmar@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 58382447b9a9989da551a7b17e72756f6e238bb8 ]
commit db1385624c686fe99fe2d1b61a36e1537b915d08 upstream.
Legacy NMI watchdog didn't work after migration/resume, because
vapics_in_nmi_mode was left at 0.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kvm/lapic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index fe637ca..de8e500 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1687,6 +1687,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu,
apic_update_ppr(apic);
hrtimer_cancel(&apic->lapic_timer.timer);
+ apic_manage_nmi_watchdog(apic, kvm_apic_get_reg(apic, APIC_LVT0));
update_divide_count(apic);
start_apic_timer(apic);
apic->irr_pending = true;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (30 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: x86: properly restore LVT0 Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ufs: Fix warning from unlock_new_inode() Sasha Levin
` (3 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Eric W. Biederman, Greg Kroah-Hartman, Sasha Levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit c89d4319ae55186496c43b7a6e510aa1d09dd387 ]
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/namespace.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 6dff373..da23ad8 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -3166,11 +3166,15 @@ static bool fs_fully_visible(struct file_system_type *type, int *new_mnt_flags)
((mnt->mnt.mnt_flags & MNT_ATIME_MASK) != (new_flags & MNT_ATIME_MASK)))
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.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] ufs: Fix warning from unlock_new_inode()
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (31 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ufs: Fix possible deadlock when looking up directories Sasha Levin
` (2 subsequent siblings)
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Jan Kara, Al Viro, Sasha Levin
From: Jan Kara <jack@suse.cz>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 12ecbb4b1d765a5076920999298d9625439dbe58 ]
Commit e4502c63f56aeca88 (ufs: deal with nfsd/iget races) introduced
unlock_new_inode() call into ufs_add_nondir(). However that function
gets called also from ufs_link() which hands it already initialized
inode and thus unlock_new_inode() complains. The problem is harmless but
annoying.
Fix the problem by opencoding necessary stuff in ufs_link()
Fixes: e4502c63f56aeca887ced37f24e0def1ef11cec8
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ufs/namei.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index 6515899..3812cf7 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -174,7 +174,12 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
inode_inc_link_count(inode);
ihold(inode);
- error = ufs_add_nondir(dentry, inode);
+ error = ufs_add_link(dentry, inode);
+ if (error) {
+ inode_dec_link_count(inode);
+ iput(inode);
+ } else
+ d_instantiate(dentry, inode);
unlock_ufs(dir->i_sb);
return error;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] ufs: Fix possible deadlock when looking up directories
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (32 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] ufs: Fix warning from unlock_new_inode() Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex_init() Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation" Sasha Levin
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Jan Kara, Al Viro, Sasha Levin
From: Jan Kara <jack@suse.cz>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 514d748f69c97a51a2645eb198ac5c6218f22ff9 ]
Commit e4502c63f56aeca88 (ufs: deal with nfsd/iget races) made ufs
create inodes with I_NEW flag set. However ufs_mkdir() never cleared
this flag. Thus if someone ever tried to lookup the directory by inode
number, he would deadlock waiting for I_NEW to be cleared. Luckily this
mostly happens only if the filesystem is exported over NFS since
otherwise we have the inode attached to dentry and don't look it up by
inode number. In rare cases dentry can get freed without inode being
freed and then we'd hit the deadlock even without NFS export.
Fix the problem by clearing I_NEW before instantiating new directory
inode.
Fixes: e4502c63f56aeca887ced37f24e0def1ef11cec8
Reported-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ufs/namei.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index 3812cf7..e8ee298 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -212,6 +212,7 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
goto out_fail;
unlock_ufs(dir->i_sb);
+ unlock_new_inode(inode);
d_instantiate(dentry, inode);
out:
return err;
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex_init()
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (33 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] ufs: Fix possible deadlock when looking up directories Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation" Sasha Levin
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Fabian Frederick, Al Viro, Sasha Levin
From: Fabian Frederick <fabf@skynet.be>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit e4f95517f18271b1da36cfc5d700e46844396d6e ]
Add last missing line in commit "cdd9eefdf905"
("fs/ufs: restore s_lock mutex")
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ufs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index aa7d50b..ce02dff 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -805,6 +805,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
UFSD("flag %u\n", (int)(sb->s_flags & MS_RDONLY));
mutex_init(&sbi->mutex);
+ mutex_init(&sbi->s_lock);
spin_lock_init(&sbi->work_lock);
INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs);
/*
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation"
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
` (34 preceding siblings ...)
2015-07-13 13:44 ` [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex_init() Sasha Levin
@ 2015-07-13 13:44 ` Sasha Levin
35 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 13:44 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Sasha Levin
This reverts commit ed7f7f145ec1445a130513db9ad8f1547f77a578.
Reverting from stable tree as fix was found to be buggy. New fix pending.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/nfs/nfs4proc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b13edc0..c9ff4a1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5356,7 +5356,6 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
atomic_inc(&lsp->ls_count);
/* Ensure we don't close file until we're done freeing locks! */
p->ctx = get_nfs_open_context(ctx);
- get_file(fl->fl_file);
memcpy(&p->fl, fl, sizeof(p->fl));
p->server = NFS_SERVER(inode);
return p;
@@ -5368,7 +5367,6 @@ static void nfs4_locku_release_calldata(void *data)
nfs_free_seqid(calldata->arg.seqid);
nfs4_put_lock_state(calldata->lsp);
put_nfs_open_context(calldata->ctx);
- fput(calldata->fl.fl_file);
kfree(calldata);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv
2015-07-13 13:43 ` [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv Sasha Levin
@ 2015-07-13 13:54 ` Marc Kleine-Budde
2015-07-13 15:53 ` Sasha Levin
0 siblings, 1 reply; 42+ messages in thread
From: Marc Kleine-Budde @ 2015-07-13 13:54 UTC (permalink / raw)
To: Sasha Levin, stable, stable-commits; +Cc: Oliver Hartkopp
[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]
On 07/13/2015 03:43 PM, Sasha Levin wrote:
> From: Oliver Hartkopp <socketcan@hartkopp.net>
>
> This patch has been added to the 3.18 stable tree. If you have any
> objections, please let us know.
>
> ===============
>
> [ Upstream commit 36c01245eb8046c16eee6431e7dbfbb302635fa8 ]
>
> As reported by Manfred Schlaegl here
>
> http://marc.info/?l=linux-netdev&m=143482089824232&w=2
>
> commit 514ac99c64b "can: fix multiple delivery of a single CAN frame for
> overlapping CAN filters" requires the skb->tstamp to be set to check for
> identical CAN skbs.
>
> As net timestamping is influenced by several players (netstamp_needed and
> netdev_tstamp_prequeue) Manfred missed a proper timestamp which leads to
> CAN frame loss.
>
> As skb timestamping became now mandatory for CAN related skbs this patch
> makes sure that received CAN skbs always have a proper timestamp set.
> Maybe there's a better solution in the future but this patch fixes the
> CAN frame loss so far.
>
> Reported-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> Cc: linux-stable <stable@vger.kernel.org>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
You and Oliver decided that this is not relevant for 3.18...See Oliver's
mail:
> this patch fixes commit 514ac99c64b "can: fix multiple delivery of a single
> CAN frame for overlapping CAN filters" which is currently not on your list for
> 3.18.
>
> Indeed I would suggest to omit either commit 514ac99c64b and the patch below
> for 3.18 stable.
>
> Commit 514ac99c64b changes the number of returned frames in some cases and by
> now developers can trust on the fact that this behaviour change comes with
> Linux 4.1.
>
> So nothing breaks when we omit commit 514ac99c64b and 36c01245eb804 for 3.18.
>
> The fact that the patch below emerged on the stable ML is that it is relevant
> for 4.1 which was released in this phase.
Or have I missed something?
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv
2015-07-13 13:54 ` Marc Kleine-Budde
@ 2015-07-13 15:53 ` Sasha Levin
0 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-13 15:53 UTC (permalink / raw)
To: Marc Kleine-Budde, stable, stable-commits; +Cc: Oliver Hartkopp
On 07/13/2015 09:54 AM, Marc Kleine-Budde wrote:
> You and Oliver decided that this is not relevant for 3.18...See Oliver's mail:
You're correct, I forgot to update my skip list. Thanks for the heads up!
Thanks,
Sasha
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later Sasha Levin
@ 2015-07-19 10:43 ` Hans de Goede
2015-07-21 1:14 ` Sasha Levin
0 siblings, 1 reply; 42+ messages in thread
From: Hans de Goede @ 2015-07-19 10:43 UTC (permalink / raw)
To: Sasha Levin, stable, stable-commits; +Cc: Maxime Ripard
Hi,
On 13-07-15 15:44, Sasha Levin wrote:
> From: Hans de Goede <hdegoede@redhat.com>
>
> This patch has been added to the 3.18 stable tree. If you have any
> objections, please let us know.
This patch was only intended for 4.1, it is wrong for anything older,
please drop this from 3.18.
Regards,
Hans
>
> ===============
>
> [ Upstream commit 8bf1b9b3d90194a174493febc731f7783f2adf1a ]
>
> The touchscreen controller in the A13 and later has a different temperature
> curve than the one in the original A10, change the compatible for the A13 and
> later so that the kernel will use the correct curve.
>
> Reported-by: Tong Zhang <lovewilliam@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---
> arch/arm/boot/dts/sun5i-a10s.dtsi | 2 +-
> arch/arm/boot/dts/sun5i-a13.dtsi | 2 +-
> arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
> index 531272c..fd2bcd3 100644
> --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
> @@ -526,7 +526,7 @@
> };
>
> rtp: rtp@01c25000 {
> - compatible = "allwinner,sun4i-a10-ts";
> + compatible = "allwinner,sun5i-a13-ts";
> reg = <0x01c25000 0x100>;
> interrupts = <29>;
> };
> diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
> index b131068..f9b01999 100644
> --- a/arch/arm/boot/dts/sun5i-a13.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
> @@ -474,7 +474,7 @@
> };
>
> rtp: rtp@01c25000 {
> - compatible = "allwinner,sun4i-a10-ts";
> + compatible = "allwinner,sun5i-a13-ts";
> reg = <0x01c25000 0x100>;
> interrupts = <29>;
> };
> diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
> index 82097c9..dcff778 100644
> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> @@ -896,7 +896,7 @@
> };
>
> rtp: rtp@01c25000 {
> - compatible = "allwinner,sun4i-a10-ts";
> + compatible = "allwinner,sun5i-a13-ts";
> reg = <0x01c25000 0x100>;
> interrupts = <0 29 4>;
> };
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later
2015-07-19 10:43 ` Hans de Goede
@ 2015-07-21 1:14 ` Sasha Levin
0 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2015-07-21 1:14 UTC (permalink / raw)
To: Hans de Goede, stable, stable-commits; +Cc: Maxime Ripard
On 07/19/2015 06:43 AM, Hans de Goede wrote:
> Hi,
>
> On 13-07-15 15:44, Sasha Levin wrote:
>> From: Hans de Goede <hdegoede@redhat.com>
>>
>> This patch has been added to the 3.18 stable tree. If you have any
>> objections, please let us know.
>
> This patch was only intended for 4.1, it is wrong for anything older,
> please drop this from 3.18.
I've removed it, thanks for the heads-up.
Thanks,
Sasha
^ permalink raw reply [flat|nested] 42+ messages in thread
* [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later
2016-04-17 9:59 [added to the 3.18 stable tree] x86/iopl/64: Properly context-switch IOPL on Xen PV Sasha Levin
@ 2016-04-17 10:02 ` Sasha Levin
0 siblings, 0 replies; 42+ messages in thread
From: Sasha Levin @ 2016-04-17 10:02 UTC (permalink / raw)
To: stable, stable-commits; +Cc: Hans de Goede, Maxime Ripard, Sasha Levin
From: Hans de Goede <hdegoede@redhat.com>
This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.
===============
[ Upstream commit 8bf1b9b3d90194a174493febc731f7783f2adf1a ]
The touchscreen controller in the A13 and later has a different temperature
curve than the one in the original A10, change the compatible for the A13 and
later so that the kernel will use the correct curve.
Reported-by: Tong Zhang <lovewilliam@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/sun5i-a10s.dtsi | 2 +-
arch/arm/boot/dts/sun5i-a13.dtsi | 2 +-
arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 531272c..fd2bcd3 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -526,7 +526,7 @@
};
rtp: rtp@01c25000 {
- compatible = "allwinner,sun4i-a10-ts";
+ compatible = "allwinner,sun5i-a13-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
};
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index b131068..f9b01999 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -474,7 +474,7 @@
};
rtp: rtp@01c25000 {
- compatible = "allwinner,sun4i-a10-ts";
+ compatible = "allwinner,sun5i-a13-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
};
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 82097c9..dcff778 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -896,7 +896,7 @@
};
rtp: rtp@01c25000 {
- compatible = "allwinner,sun4i-a10-ts";
+ compatible = "allwinner,sun5i-a13-ts";
reg = <0x01c25000 0x100>;
interrupts = <0 29 4>;
};
--
2.5.0
^ permalink raw reply related [flat|nested] 42+ messages in thread
end of thread, other threads:[~2016-04-17 10:04 UTC | newest]
Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-13 13:43 [added to the 3.18 stable tree] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] kprobes/x86: Return correct length in __copy_instruction() Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs/ufs: revert "ufs: fix deadlocks introduced by sb mutex merge" Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] can: fix loss of CAN frames in raw_rcv Sasha Levin
2015-07-13 13:54 ` Marc Kleine-Budde
2015-07-13 15:53 ` Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] fs: Fix S_NOSEC handling Sasha Levin
2015-07-13 13:43 ` [added to the 3.18 stable tree] tracing: Have filter check for balanced ops Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] sb_edac: Fix erroneous bytes->gigabytes conversion Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: Zero the tuple in nfnl_cthelper_parse_tuple() Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] netfilter: nf_tables: allow to change chain policy without hook if it exists Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] x86/microcode/intel: Guard against stack overflow in the loader Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] Btrfs: make xattr replace operations atomic Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: clk-imx6q: refine sata's parent Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: nSVM: Check for NRIPS support before updating control field Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] arm64/kvm: Fix assembler compatibility of macros Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] iommu/amd: Handle large pages correctly in free_pagetable Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] arm: KVM: force execution of HCPTR access on VM exit Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: x86: make vapics_in_nmi_mode atomic Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] vfs: Remove incorrect debugging WARN in prepend_path Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] x86/boot: Fix overflow warning with 32-bit binutils Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] perf: Fix ring_buffer_attach() RCU sync, again Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] perf/x86: Honor the architectural performance monitoring version Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later Sasha Levin
2015-07-19 10:43 ` Hans de Goede
2015-07-21 1:14 ` Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] usb: gadget: f_fs: add extra check before unregister_gadget_item Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] selinux: fix setting of security labels on NFS Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: s390: virtio-ccw: don't overwrite config space values Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] KVM: x86: properly restore LVT0 Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] vfs: Ignore unlocked mounts in fs_fully_visible Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ufs: Fix warning from unlock_new_inode() Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] ufs: Fix possible deadlock when looking up directories Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] fs/ufs: restore s_lock mutex_init() Sasha Levin
2015-07-13 13:44 ` [added to the 3.18 stable tree] Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation" Sasha Levin
-- strict thread matches above, loose matches on Subject: below --
2016-04-17 9:59 [added to the 3.18 stable tree] x86/iopl/64: Properly context-switch IOPL on Xen PV Sasha Levin
2016-04-17 10:02 ` [added to the 3.18 stable tree] ARM: dts: sunxi: Adjust touchscreen compatible for sun5i and later Sasha Levin
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).