Linux 3.16.41
I'm announcing the release of the 3.16.41 kernel.
All users of the 3.16 kernel series should upgrade.
The updated 3.16.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git
The diff from 3.16.40 is attached to this message.
Ben.
------------
Documentation/sysctl/fs.txt | 7 +++++ Makefile | 2 +- arch/x86/kvm/emulate.c | 66 +++++++++++++++++++++++++++++++++-------- arch/x86/kvm/vmx.c | 11 ++++--- drivers/usb/serial/kl5kusb105.c | 9 +++--- fs/ext4/super.c | 9 ++++++ fs/mount.h | 2 ++ fs/namespace.c | 49 +++++++++++++++++++++++++++++- fs/pnode.c | 2 +- fs/pnode.h | 1 + fs/posix_acl.c | 9 +++--- include/linux/mount.h | 2 ++ kernel/sysctl.c | 9 ++++++ net/dccp/input.c | 3 +- net/ipv4/ip_sockglue.c | 9 +++++- net/ipv4/tcp.c | 6 ++++ net/ipv6/ip6_gre.c | 41 +++++++++++++------------ security/selinux/hooks.c | 2 +- 18 files changed, 187 insertions(+), 52 deletions(-)
Andrey Konovalov (1):
dccp: fix freeing skb too early for IPV6_RECVPKTINFO
Ben Hutchings (1):
Linux 3.16.41
Eric Dumazet (3):
ip6_gre: fix ip6gre_err() invalid reads
ipv4: keep skb->dst around in presence of IP options
tcp: avoid infinite loop in tcp_splice_read()
Eric W. Biederman (1):
mnt: Add a per mount namespace limit on the number of mounts
Eryu Guan (1):
ext4: validate s_first_meta_bg at mount time
Gu Zheng (1):
tmpfs: clear S_ISGID when setting posix ACLs
Jim Mattson (1):
kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
Johan Hovold (1):
USB: serial: kl5kusb105: fix line-state error handling
Paolo Bonzini (1):
KVM: x86: fix emulation of "MOV SS, null selector"
Stephen Smalley (1):
selinux: fix off-by-one in setprocattr
Steve Rutherford (1):
KVM: x86: Introduce segmented_write_std
Documentation/sysctl/fs.txt +7 -0
@@ -265,6 +265,13 @@ aio-nr can grow to. ============================================================== +mount-max: + +This denotes the maximum number of mounts that may exist +in a mount namespace. + +============================================================== + 2. /proc/sys/fs/binfmt_misc ----------------------------------------------------------
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 40 +SUBLEVEL = 41 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/x86/kvm/emulate.c +54 -12
101 lines not on this page · raw message
arch/x86/kvm/vmx.c +5 -6
@@ -1073,10 +1073,10 @@ static inline int nested_cpu_has_ept(struct vmcs12 *vmcs12)return nested_cpu_has2 (vmcs12,SECONDARY_EXEC_ENABLE_EPT ); } -static inline bool is_exception (u32 intr_info) +static inline bool is_nmi (u32 intr_info) {return (intr_info & (INTR_INFO_INTR_TYPE_MASK |INTR_INFO_VALID_MASK )) - == (INTR_TYPE_HARD_EXCEPTION |INTR_INFO_VALID_MASK ); + == (INTR_TYPE_NMI_INTR |INTR_INFO_VALID_MASK ); } static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
@@ -4838,7 +4838,7 @@ static int handle_exception(struct kvm_vcpu *vcpu)if (is_machine_check (intr_info))return handle_machine_check (vcpu); -if ((intr_info &INTR_INFO_INTR_TYPE_MASK ) ==INTR_TYPE_NMI_INTR ) +if (is_nmi (intr_info))return 1 ;/* already handled by vmx_vcpu_run() */ if (is_no_device (intr_info)) {
@@ -6888,7 +6888,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)switch (exit_reason) {case EXIT_REASON_EXCEPTION_NMI : -if (!is_exception (intr_info)) +if (is_nmi (intr_info))return 0 ;else if (is_page_fault (intr_info))return enable_ept;
@@ -7185,8 +7185,7 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)kvm_machine_check ();/* We need to handle NMIs before interrupts are enabled */ -if ((exit_intr_info &INTR_INFO_INTR_TYPE_MASK ) ==INTR_TYPE_NMI_INTR && - (exit_intr_info &INTR_INFO_VALID_MASK )) { +if (is_nmi (exit_intr_info)) {kvm_before_handle_nmi (&vmx->vcpu); asm("int $2" );kvm_after_handle_nmi (&vmx->vcpu);
drivers/usb/serial/kl5kusb105.c +5 -4
@@ -195,10 +195,11 @@ static int klsi_105_get_line_state(struct usb_serial_port *port, status_buf,KLSI_STATUSBUF_LEN ,10000 ); -if (rc <0 ) -dev_err (&port->dev,"Reading line status failed (error = %d)\n" , - rc); -else { +if (rc !=KLSI_STATUSBUF_LEN ) { +dev_err (&port->dev,"reading line status failed: %d\n" , rc); +if (rc >=0 ) + rc = -EIO ; + }else { status =get_unaligned_le16 (status_buf); dev_info(&port->serial->dev->dev, "read status %x %x\n",
fs/ext4/super.c +9 -0
@@ -3905,6 +3905,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) (EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb))); db_count = (sbi->s_groups_count +EXT4_DESC_PER_BLOCK (sb) -1 ) /EXT4_DESC_PER_BLOCK (sb); +if (EXT4_HAS_INCOMPAT_FEATURE (sb,EXT4_FEATURE_INCOMPAT_META_BG )) { +if (le32_to_cpu (es->s_first_meta_bg) >= db_count) { +ext4_msg (sb,KERN_WARNING , +"first meta block group too large: %u " +"(group descriptor block count %u)" , +le32_to_cpu (es->s_first_meta_bg), db_count); + goto failed_mount; + } + } sbi->s_group_desc =ext4_kvmalloc (db_count *sizeof (struct buffer_head *),GFP_KERNEL );
fs/mount.h +2 -0
@@ -11,6 +11,8 @@ struct mnt_namespace {u64 seq;/* Sequence number to prevent loops */ wait_queue_head_t poll;u64 event; +unsigned int mounts;/* # of mounts in the namespace */ +unsigned int pending_mounts; };struct mnt_pcp {
fs/namespace.c +48 -1
114 lines not on this page · raw message
fs/pnode.c +1 -1
@@ -258,7 +258,7 @@ static int propagate_one(struct mount *m)read_sequnlock_excl (&mount_lock); }hlist_add_head (&child->mnt_hash, list); -return 0 ; +return count_mounts (m->mnt_ns, child); }/*
fs/pnode.h +1 -0
@@ -50,4 +50,5 @@ void mnt_set_mountpoint(struct mount *, struct mountpoint *,struct mount *copy_tree (struct mount *,struct dentry *,int );bool is_path_reachable (struct mount *,struct dentry *,const struct path *root); +int count_mounts (struct mnt_namespace *ns,struct mount *mnt);#endif /* _LINUX_PNODE_H */
fs/posix_acl.c +4 -5
@@ -904,11 +904,10 @@ int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type)int error;if (type ==ACL_TYPE_ACCESS ) { - error =posix_acl_equiv_mode (acl, &inode->i_mode); -if (error <0 ) -return 0 ; -if (error ==0 ) - acl =NULL ; + error =posix_acl_update_mode (inode, + &inode->i_mode, &acl); +if (error) +return error; } inode->i_ctime =CURRENT_TIME ;
include/linux/mount.h +2 -0
@@ -91,4 +91,6 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);extern dev_t name_to_dev_t (char *name); +extern unsigned int sysctl_mount_max; +#endif /* _LINUX_MOUNT_H */
kernel/sysctl.c +9 -0
@@ -63,6 +63,7 @@#include <linux/binfmts.h> #include <linux/sched/sysctl.h> #include <linux/kexec.h> +#include <linux/mount.h> #include <asm/uaccess.h> #include <asm/processor.h>
@@ -1685,6 +1686,14 @@ static struct ctl_table fs_table[] = { .mode = 0644, .proc_handler = proc_doulongvec_minmax, }, + { + .procname = "mount-max", + .data = &sysctl_mount_max, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &one, + }, { } };
net/dccp/input.c +2 -1
@@ -606,7 +606,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,if (inet_csk (sk)->icsk_af_ops->conn_request (sk, skb) <0 )return 1 ; - goto discard; +consume_skb (skb); +return 0 ; }if (dh->dccph_type ==DCCP_PKT_RESET ) goto discard;
net/ipv4/ip_sockglue.c +8 -1
@@ -1082,7 +1082,14 @@ void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb) pktinfo->ipi_ifindex =0 ; pktinfo->ipi_spec_dst.s_addr =0 ; } -skb_dst_drop (skb); +/* We need to keep the dst for __ip_options_echo() +* We could restrict the test to opt.ts_needtime || opt.srr, +* but the following is good enough as IP options are not often used. +*/ +if (unlikely (IPCB (skb)->opt.optlen)) +skb_dst_force (skb); +else +skb_dst_drop (skb); } int ip_setsockopt(struct sock *sk, int level,
net/ipv4/tcp.c +6 -0
@@ -765,6 +765,12 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, ret = -EAGAIN ;break ; } +/* if __tcp_splice_read() got nothing while we have +* an skb in receive queue, we do not want to loop. +* This might happen with URG data. +*/ +if (!skb_queue_empty (&sk->sk_receive_queue)) +break ;sk_wait_data (sk, &timeo);if (signal_pending (current)) { ret =sock_intr_errno (timeo);
net/ipv6/ip6_gre.c +22 -19
63 lines not on this page · raw message
security/selinux/hooks.c +1 -1
@@ -5546,7 +5546,7 @@ static int selinux_setprocattr(struct task_struct *p,return error;/* Obtain a SID for the context, if one was specified. */ -if (size && str[1 ] && str[1 ] !='\n' ) { +if (size && str[0 ] && str[0 ] !='\n' ) {if (str[size-1 ] =='\n' ) { str[size-1 ] =0 ; size--;