Linux 4.12.2
Greg KH
maintainerI'm announcing the release of the 4.12.2 kernel.
All users of the 4.12 kernel series must upgrade.
The updated 4.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.12.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/x86/include/asm/pat.h | 1 arch/x86/kernel/setup.c | 7 +++++ arch/x86/mm/pat.c | 28 +++++++++------------- crypto/rsa-pkcs1pad.c | 2 - drivers/crypto/caam/caamalg.c | 3 -- drivers/staging/comedi/comedi_fops.c | 1 drivers/staging/vt6656/main_usb.c | 3 ++ drivers/tty/serial/imx.c | 26 ++++----------------- fs/ext4/sysfs.c | 2 - fs/proc/internal.h | 2 - fs/proc/proc_sysctl.c | 43 ++++++++++++++++++++++++----------- include/linux/sysctl.h | 2 - ipc/mqueue.c | 4 ++- kernel/locking/rwsem-spinlock.c | 4 +-- 15 files changed, 70 insertions(+), 60 deletions(-)
Chao Yu (1):
ext4: check return value of kstrtoull correctly in reserved_clusters_store
Cong Wang (1):
mqueue: fix a use-after-free in sys_mq_notify()
Eric W. Biederman (1):
proc: Fix proc_sys_prune_dcache to hold a sb reference
Greg Kroah-Hartman (1):
Linux 4.12.2
Horia Geantă (1):
crypto: caam - fix gfp allocation flags (part I)
Ian Abbott (1):
staging: comedi: fix clean-up of comedi_class in comedi_init()
Jason A. Donenfeld (1):
crypto: rsa-pkcs1pad - use constant time memory comparison for MACs
Kirill Tkhai (1):
locking/rwsem-spinlock: Fix EINTR branch in __down_write_common()
Malcolm Priestley (1):
staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
Mikulas Patocka (1):
x86/mm/pat: Don't report PAT on CPUs that don't support it
Peter Senna Tschudin (1):
imx-serial: RX DMA startup latency
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 12 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Fearless Coyote
arch/x86/include/asm/pat.h +1 -0
@@ -7,6 +7,7 @@bool pat_enabled (void );void pat_disable (const char *reason);extern void pat_init (void ); +extern void init_cache_modes (void );extern int reserve_memtype (u64 start,u64 end,enum page_cache_mode req_pcm,enum page_cache_mode *ret_pcm);
arch/x86/kernel/setup.c +7 -0
@@ -1076,6 +1076,13 @@ void __init setup_arch(char **cmdline_p) max_possible_pfn = max_pfn;/* +* This call is required when the CPU does not support PAT. If +* mtrr_bp_init() invoked it already via pat_init() the call has no +* effect. +*/ +init_cache_modes (); + +/* * Define random base addresses for memory sections after max_pfn is * defined and before each memory section base is used. */
arch/x86/mm/pat.c +12 -16
@@ -37,14 +37,14 @@#undef pr_fmt#define pr_fmt (fmt) "" fmt -static bool boot_cpu_done; - -static int __read_mostly __pat_enabled =IS_ENABLED (CONFIG_X86_PAT ); -static void init_cache_modes (void ); +static bool __read_mostly boot_cpu_done; +static bool __read_mostly pat_disabled = !IS_ENABLED (CONFIG_X86_PAT ); +static bool __read_mostly pat_initialized; +static bool __read_mostly init_cm_done;void pat_disable (const char *reason) { -if (!__pat_enabled) +if (pat_disabled)return ;if (boot_cpu_done) {
@@ -52,10 +52,8 @@ void pat_disable(const char *reason)return ; } - __pat_enabled =0 ; + pat_disabled = true;pr_info ("x86/PAT: %s\n" , reason); - -init_cache_modes (); }static int __init nopat (char *str)
@@ -67,7 +65,7 @@ early_param("nopat", nopat);bool pat_enabled (void ) { -return !!__pat_enabled; +return pat_initialized; }EXPORT_SYMBOL_GPL (pat_enabled);
@@ -205,6 +203,8 @@ static void __init_cache_modes(u64 pat)update_cache_mode_entry (i, cache); }pr_info ("x86/PAT: Configuration [0-7]: %s\n" , pat_msg); + + init_cm_done = true; }#define PAT (x, y) ((u64)PAT_ ## y << ((x)*8))
@@ -225,6 +225,7 @@ static void pat_bsp_init(u64 pat) }wrmsrl (MSR_IA32_CR_PAT , pat); + pat_initialized = true;__init_cache_modes (pat); }
@@ -242,10 +243,9 @@ static void pat_ap_init(u64 pat)wrmsrl (MSR_IA32_CR_PAT , pat); } -static void init_cache_modes (void ) +void init_cache_modes (void ) {u64 pat =0 ; -static int init_cm_done;if (init_cm_done)return ;
@@ -287,8 +287,6 @@ static void init_cache_modes(void) }__init_cache_modes (pat); - - init_cm_done =1 ; }/**
@@ -306,10 +304,8 @@ void pat_init(void)u64 pat;struct cpuinfo_x86 *c = &boot_cpu_data; -if (!pat_enabled ()) { -init_cache_modes (); +if (pat_disabled)return ; - } if ((c->x86_vendor == X86_VENDOR_INTEL) && (((c->x86 == 0x6) && (c->x86_model <= 0xd)) ||
crypto/rsa-pkcs1pad.c +1 -1
@@ -496,7 +496,7 @@ static int pkcs1pad_verify_complete(struct akcipher_request *req, int err) goto done; pos++; -if (memcmp (out_buf + pos, digest_info->data, digest_info->size)) +if (crypto_memneq (out_buf + pos, digest_info->data, digest_info->size)) goto done; pos += digest_info->size;
drivers/crypto/caam/caamalg.c +1 -2
@@ -1475,8 +1475,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_requeststruct crypto_ablkcipher *ablkcipher =crypto_ablkcipher_reqtfm (req);struct caam_ctx *ctx =crypto_ablkcipher_ctx (ablkcipher);struct device *jrdev = ctx->jrdev; -gfp_t flags = (req->base.flags & (CRYPTO_TFM_REQ_MAY_BACKLOG | -CRYPTO_TFM_REQ_MAY_SLEEP )) ? +gfp_t flags = (req->base.flags &CRYPTO_TFM_REQ_MAY_SLEEP ) ?GFP_KERNEL :GFP_ATOMIC ;int src_nents, mapped_src_nents, dst_nents =0 , mapped_dst_nents =0 ;struct ablkcipher_edesc *edesc;
drivers/staging/comedi/comedi_fops.c +1 -0
@@ -2915,6 +2915,7 @@ static int __init comedi_init(void) dev =comedi_alloc_board_minor (NULL );if (IS_ERR (dev)) {comedi_cleanup_board_minors (); +class_destroy (comedi_class);cdev_del (&comedi_cdev);unregister_chrdev_region (MKDEV (COMEDI_MAJOR ,0 ),COMEDI_NUM_MINORS );
drivers/staging/vt6656/main_usb.c +3 -0
@@ -513,6 +513,9 @@ static int vnt_start(struct ieee80211_hw *hw) goto free_all; } +if (vnt_key_init_table (priv)) + goto free_all; + priv->int_interval =1 ;/* bInterval is set to 1 */ vnt_int_start_interrupt (priv);
drivers/tty/serial/imx.c +5 -21
@@ -1340,29 +1340,13 @@ static int imx_startup(struct uart_port *port)imx_enable_ms (&sport->port);/* -* If the serial port is opened for reading start RX DMA immediately -* instead of waiting for RX FIFO interrupts. In our iMX53 the average -* delay for the first reception dropped from approximately 35000 -* microseconds to 1000 microseconds. +* Start RX DMA immediately instead of waiting for RX FIFO interrupts. +* In our iMX53 the average delay for the first reception dropped from +* approximately 35000 microseconds to 1000 microseconds. */ if (sport->dma_is_enabled) { -struct tty_struct *tty = sport->port.state->port.tty; -struct tty_file_private *file_priv; -int readcnt =0 ; - -spin_lock (&tty->files_lock); - -if (!list_empty (&tty->tty_files)) -list_for_each_entry (file_priv, &tty->tty_files, list) -if (!(file_priv->file->f_flags &O_WRONLY )) - readcnt++; - -spin_unlock (&tty->files_lock); - -if (readcnt >0 ) { -imx_disable_rx_int (sport); -start_rx_dma (sport); - } +imx_disable_rx_int (sport); +start_rx_dma (sport); }spin_unlock_irqrestore (&sport->port.lock, flags);
fs/ext4/sysfs.c +1 -1
@@ -100,7 +100,7 @@ static ssize_t reserved_clusters_store(struct ext4_attr *a,int ret; ret =kstrtoull (skip_spaces (buf),0 , &val); -if (!ret || val >= clusters) +if (ret || val >= clusters)return -EINVAL ;atomic64_set (&sbi->s_resv_clusters, val);
fs/proc/internal.h +1 -1
@@ -67,7 +67,7 @@ struct proc_inode {struct proc_dir_entry *pde;struct ctl_table_header *sysctl;struct ctl_table *sysctl_entry; -struct list_head sysctl_inodes; +struct hlist_node sysctl_inodes;const struct proc_ns_operations *ns_ops;struct inode vfs_inode; };
fs/proc/proc_sysctl.c +30 -13
76 lines not on this page · raw message
include/linux/sysctl.h +1 -1
@@ -143,7 +143,7 @@ struct ctl_table_headerstruct ctl_table_set *set;struct ctl_dir *parent;struct ctl_node *node; -struct list_head inodes;/* head for proc_inode->sysctl_inodes */ +struct hlist_head inodes;/* head for proc_inode->sysctl_inodes */ };struct ctl_dir {
ipc/mqueue.c +3 -1
@@ -1253,8 +1253,10 @@ SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes, timeo =MAX_SCHEDULE_TIMEOUT ; ret =netlink_attachskb (sock, nc, &timeo,NULL ); -if (ret ==1 ) +if (ret ==1 ) { + sock =NULL ; goto retry; + }if (ret) { sock =NULL ; nc =NULL ;
kernel/locking/rwsem-spinlock.c +2 -2
@@ -231,8 +231,8 @@ int __sched __down_write_common(struct rw_semaphore *sem, int state) out_nolock:list_del (&waiter.list); -if (!list_empty (&sem->wait_list)) -__rwsem_do_wake (sem,1 ); +if (!list_empty (&sem->wait_list) && sem->count >=0 ) +__rwsem_do_wake (sem,0 );raw_spin_unlock_irqrestore (&sem->wait_lock, flags);return -EINTR ;