Linux 4.9.153
Greg KH
maintainerI'm announcing the release of the 4.9.153 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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
------------
Documentation/filesystems/proc.txt | 4 ++- Makefile | 2 - arch/arm64/kernel/perf_event.c | 1 arch/mips/Kconfig | 3 ++ arch/mips/sibyte/common/Makefile | 1 arch/mips/sibyte/common/dma.c | 14 +++++++++++ arch/powerpc/xmon/xmon.c | 18 +++++++++++--- drivers/base/bus.c | 7 ++++- drivers/char/ipmi/ipmi_ssif.c | 25 +++++++++++++------- drivers/clk/imx/clk-imx6q.c | 6 ++++ drivers/cpuidle/cpuidle-pseries.c | 8 +++++- drivers/infiniband/sw/rxe/rxe_req.c | 1 drivers/md/dm-kcopyd.c | 19 +++++++++++---- drivers/md/dm-snap.c | 22 +++++++++++++++++ drivers/media/firewire/firedtv-avc.c | 6 +++- drivers/media/firewire/firedtv.h | 6 +++- drivers/mmc/host/atmel-mci.c | 3 +- drivers/net/ethernet/intel/e1000e/ptp.c | 13 ++++++++-- drivers/net/ethernet/realtek/r8169.c | 2 + drivers/platform/x86/asus-wmi.c | 3 +- drivers/scsi/megaraid/megaraid_sas_fp.c | 2 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 - drivers/scsi/smartpqi/smartpqi_init.c | 3 ++ drivers/target/target_core_spc.c | 17 +++++++++---- drivers/tty/serial/amba-pl011.c | 2 + drivers/tty/serial/pic32_uart.c | 1 drivers/tty/serial/serial_core.c | 22 ++++++++++++----- drivers/tty/serial/xilinx_uartps.c | 1 fs/jffs2/super.c | 3 +- fs/ocfs2/localalloc.c | 9 +++++-- fs/pstore/ram_core.c | 5 ++++ include/asm-generic/qspinlock_types.h | 2 + include/linux/backing-dev-defs.h | 8 ++++++ mm/page-writeback.c | 35 ++++++++++++++++------------ net/core/sock.c | 1 net/ipv6/af_inet6.c | 14 ++++++++++- scripts/kconfig/zconf.l | 4 ++- security/selinux/hooks.c | 2 - sound/firewire/Kconfig | 1 sound/firewire/bebob/bebob.c | 2 - sound/firewire/oxfw/oxfw.c | 8 ++++++ tools/lib/subcmd/Makefile | 2 - tools/perf/arch/x86/util/intel-pt.c | 11 ++++++++ tools/perf/util/parse-events.c | 2 - tools/perf/util/svghelper.c | 2 - 45 files changed, 255 insertions(+), 70 deletions(-)
Adrian Hunter (1):
perf intel-pt: Fix error with config term "pt=0"
Anders Roxell (3):
writeback: don't decrement wb->refcnt if !wb->bdi
serial: set suppress_bind_attrs flag only if builtin
arm64: perf: set suppress_bind_attrs flag to true
Arnaldo Carvalho de Melo (3):
perf svghelper: Fix unchecked usage of strncpy()
perf parse-events: Fix unchecked usage of strncpy() tools lib subcmd: Don't add the kernel sources to the include path
Breno Leitao (2):
powerpc/xmon: Fix invocation inside lock region powerpc/pseries/cpuidle: Fix preempt warning
Brian Foster (1):
mm/page-writeback.c: don't break integrity writeback on ->writepage() error
Chuck Lever (1):
rxe: IB_WR_REG_MR does not capture MR's iova field
Corey Minyard (1):
ipmi:ssif: Fix handling of multi-part return messages
Daniel Santos (1):
jffs2: Fix use of uninitialized delayed_work, lockdep breakage
Daniel Vetter (1):
sysfs: Disable lockdep for driver bind/unbind files
Dave Airlie (1):
locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness
David Ahern (2):
ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address
ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses
David Disseldorp (1):
scsi: target: use consistent left-aligned ASCII INQUIRY data
Greg Kroah-Hartman (1):
Linux 4.9.153
Joel Fernandes (Google) (1):
pstore/ram: Do not treat empty buffers as valid
Jonas Danielsson (1):
mmc: atmel-mci: do not assume idle after atmci_request_end
João Paulo Rechi Vita (1):
platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey
Junxiao Bi (1):
ocfs2: fix panic due to unrecovered local alloc
Kai-Heng Feng (1):
r8169: Add support for new Realtek Ethernet
Kevin Barnett (1):
scsi: smartpqi: correct lun reset issues
Lucas Stach (1):
clk: imx6q: reset exclusive gates on init
Maciej W. Rozycki (1):
MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur
Masahiro Yamada (2):
kconfig: fix file name and line number of warn_ignored_character()
kconfig: fix memory leak when EOF is encountered in quotation
Michal Hocko (1):
mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smaps
Miroslav Lichvar (1):
e1000e: allow non-monotonic SYSTIM readings
Nathan Chancellor (1):
media: firewire: Fix app_info parameter type in avc_ca{,_app}_info
Nikos Tsironis (2):
dm kcopyd: Fix bug causing workqueue stalls
dm snapshot: Fix excessive memory usage and workqueue stalls
Ondrej Mosnacek (1):
selinux: always allow mounting submounts
Qian Cai (1):
scsi: megaraid: fix out-of-bound array accesses
Sergey Senozhatsky (1):
tty/serial: do not free trasnmit buffer page under port lock
Takashi Sakamoto (2):
ALSA: oxfw: add support for APOGEE duet FireWire
ALSA: bebob: fix model-id of unit for Apogee Ensemble
yupeng (1):
net: call sk_dst_reset when set SO_DONTROUTE
Greg KH
maintainerDocumentation/filesystems/proc.txt +3 -1
@@ -484,7 +484,9 @@ manner. The codes are the following: Note that there is no guarantee that every flag and associated mnemonic will be present in all further kernel releases. Things get changed, the flags may -be vanished or the reverse -- new added. +be vanished or the reverse -- new added. Interpretation of their meaning +might change in future as well. So each consumer of these flags has to +follow each specific kernel version for the exact semantic. This file is only present if the CONFIG_MMU kernel configuration option is enabled.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 152 +SUBLEVEL = 153 EXTRAVERSION = NAME = Roaring Lionus
arch/arm64/kernel/perf_event.c +1 -0
@@ -1114,6 +1114,7 @@ static struct platform_driver armv8_pmu_driver = { .driver = { .name = ARMV8_PMU_PDEV_NAME, .of_match_table = armv8_pmu_of_device_ids, + .suppress_bind_attrs = true, }, .probe = armv8_pmu_device_probe, };
arch/mips/Kconfig +3 -0
@@ -791,6 +791,7 @@ config SIBYTE_SWARM select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_LITTLE_ENDIAN select ZONE_DMA32 if 64BIT + select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI config SIBYTE_LITTLESUR bool "Sibyte BCM91250C2-LittleSur"
@@ -813,6 +814,7 @@ config SIBYTE_SENTOSA select SYS_HAS_CPU_SB1 select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN + select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI config SIBYTE_BIGSUR bool "Sibyte BCM91480B-BigSur"
@@ -826,6 +828,7 @@ config SIBYTE_BIGSUR select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_LITTLE_ENDIAN select ZONE_DMA32 if 64BIT + select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI config SNI_RM bool "SNI RM200/300/400"
arch/mips/sibyte/common/Makefile +1 -0
@@ -1,4 +1,5 @@ obj-y := cfe.o +obj-$(CONFIG_SWIOTLB) += dma.o obj-$(CONFIG_SIBYTE_BUS_WATCHER) += bus_watcher.o obj-$(CONFIG_SIBYTE_CFE_CONSOLE) += cfe_console.o obj-$(CONFIG_SIBYTE_TBPROF) += sb_tbprof.o
arch/mips/sibyte/common/dma.c new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* DMA support for Broadcom SiByte platforms. +* +* Copyright (c) 2018 Maciej W. Rozycki +*/ + +#include <linux/swiotlb.h> +#include <asm/bootinfo.h> + +void __init plat_swiotlb_setup (void ) +{ +swiotlb_init (1 ); +}
arch/powerpc/xmon/xmon.c +14 -4
@@ -73,6 +73,9 @@ static int xmon_gate;#define xmon_owner 0#endif /* CONFIG_SMP */ +#ifdef CONFIG_PPC_PSERIES +static int set_indicator_token =RTAS_UNKNOWN_SERVICE ; +#endif static unsigned long in_xmon__read_mostly =0 ;static unsigned long adrs;
@@ -340,7 +343,6 @@ static inline void disable_surveillance(void)#ifdef CONFIG_PPC_PSERIES /* Since this can't be a module, args should end up below 4GB. */ static struct rtas_args args; -int token;/* * At this point we have got all the cpus we can into
@@ -349,11 +351,11 @@ static inline void disable_surveillance(void)* If we did try to take rtas.lock there would be a * real possibility of deadlock. */ - token =rtas_token ("set-indicator" ); -if (token ==RTAS_UNKNOWN_SERVICE ) +if (set_indicator_token ==RTAS_UNKNOWN_SERVICE )return ; -rtas_call_unlocked (&args, token,3 ,1 ,NULL ,SURVEILLANCE_TOKEN ,0 ,0 ); +rtas_call_unlocked (&args, set_indicator_token,3 ,1 ,NULL , +SURVEILLANCE_TOKEN ,0 ,0 );#endif /* CONFIG_PPC_PSERIES */ }
@@ -3227,6 +3229,14 @@ static void xmon_init(int enable) __debugger_iabr_match = xmon_iabr_match; __debugger_break_match = xmon_break_match; __debugger_fault_handler = xmon_fault_handler; + +#ifdef CONFIG_PPC_PSERIES +/* +* Get the token here to avoid trying to get a lock +* during the crash, causing a deadlock. +*/ + set_indicator_token =rtas_token ("set-indicator" ); +#endif }else { __debugger =NULL ; __debugger_ipi =NULL ;
drivers/base/bus.c +5 -2
@@ -33,6 +33,9 @@ static struct kset *system_kset;#define to_drv_attr (_attr) container_of(_attr, struct driver_attribute, attr) +#define DRIVER_ATTR_IGNORE_LOCKDEP (_name, _mode, _show, _store) \ + struct driver_attribute driver_attr_##_name = \ + __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)static int __must_check bus_rescan_devices_helper (struct device *dev,void *data);
@@ -197,7 +200,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,bus_put (bus);return err; } -static DRIVER_ATTR_WO (unbind); +static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, S_IWUSR, NULL, unbind_store);/* * Manually attach a device to a driver.
@@ -233,7 +236,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,bus_put (bus);return err; } -static DRIVER_ATTR_WO (bind); +static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store);static ssize_t show_drivers_autoprobe (struct bus_type *bus,char *buf) {
drivers/char/ipmi/ipmi_ssif.c +17 -8
@@ -641,8 +641,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,/* Remove the multi-part read marker. */ len -=2 ; + data +=2 ;for (i =0 ; i < len; i++) - ssif_info->data[i] = data[i+2 ]; + ssif_info->data[i] = data[i]; ssif_info->multi_len = len; ssif_info->multi_pos =1 ;
@@ -670,8 +671,19 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, } blocknum = data[0 ]; + len--; + data++; + +if (blocknum !=0xff && len !=31 ) { +/* All blocks but the last must have 31 data bytes. */ + result = -EIO ; +if (ssif_info->ssif_debug &SSIF_DEBUG_MSG ) +pr_info ("Received middle message <31\n" ); -if (ssif_info->multi_len + len -1 >IPMI_MAX_MSG_LENGTH ) { + goto continue_op; + } + +if (ssif_info->multi_len + len >IPMI_MAX_MSG_LENGTH ) {/* Received message too big, abort the operation. */ result = -E2BIG ;if (ssif_info->ssif_debug &SSIF_DEBUG_MSG )
@@ -680,16 +692,14 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, goto continue_op; } -/* Remove the blocknum from the data. */ - len--;for (i =0 ; i < len; i++) - ssif_info->data[i + ssif_info->multi_len] = data[i +1 ]; + ssif_info->data[i + ssif_info->multi_len] = data[i]; ssif_info->multi_len += len;if (blocknum ==0xff ) {/* End of read */ len = ssif_info->multi_len; data = ssif_info->data; - }else if (blocknum +1 != ssif_info->multi_pos) { + }else if (blocknum != ssif_info->multi_pos) {/* * Out of sequence block, just abort. Block * numbers start at zero for the second block,
@@ -717,6 +727,7 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, } } + continue_op:if (result <0 ) {ssif_inc_stat (ssif_info, receive_errors); }else {
@@ -724,8 +735,6 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,ssif_inc_stat (ssif_info, received_message_parts); } - - continue_op:if (ssif_info->ssif_debug &SSIF_DEBUG_STATE )pr_info (PFX "DONE 1: state = %d, result=%d.\n" , ssif_info->ssif_state, result);
drivers/clk/imx/clk-imx6q.c +5 -1
@@ -258,8 +258,12 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)* lvds1_gate and lvds2_gate are pseudo-gates. Both can be * independently configured as clock inputs or outputs. We treat * the "output_enable" bit as a gate, even though it's really just -* enabling clock output. +* enabling clock output. Initially the gate bits are cleared, as +* otherwise the exclusive configuration gets locked in the setup done +* by software running before the clock driver, with no way to change +* it. */ +writel (readl (base +0x160 ) & ~0x3c00 , base +0x160 ); clk[IMX6QDL_CLK_LVDS1_GATE ] =imx_clk_gate_exclusive ("lvds1_gate" ,"lvds1_sel" , base +0x160 ,10 ,BIT (12 )); clk[IMX6QDL_CLK_LVDS2_GATE ] =imx_clk_gate_exclusive ("lvds2_gate" ,"lvds2_sel" , base +0x160 ,11 ,BIT (13 ));
drivers/cpuidle/cpuidle-pseries.c +7 -1
@@ -230,7 +230,13 @@ static int pseries_idle_probe(void)return -ENODEV ;if (firmware_has_feature (FW_FEATURE_SPLPAR )) { -if (lppaca_shared_proc (get_lppaca ())) { +/* +* Use local_paca instead of get_lppaca() since +* preemption is not disabled, and it is not required in +* fact, since lppaca_ptr does not need to be the value +* associated to the current CPU, it can be from any CPU. +*/ +if (lppaca_shared_proc (local_paca->lppaca_ptr)) { cpuidle_state_table = shared_states; max_idle_state =ARRAY_SIZE (shared_states); }else {
drivers/infiniband/sw/rxe/rxe_req.c +1 -0
@@ -643,6 +643,7 @@ int rxe_requester(void *arg) rmr->access = wqe->wr.wr.reg.access; rmr->lkey = wqe->wr.wr.reg.key; rmr->rkey = wqe->wr.wr.reg.key; + rmr->iova = wqe->wr.wr.reg.mr->iova; wqe->state = wqe_state_done; wqe->status =IB_WC_SUCCESS ; }else {
drivers/md/dm-kcopyd.c +14 -5
@@ -55,15 +55,17 @@ struct dm_kcopyd_client {struct dm_kcopyd_throttle *throttle;/* -* We maintain three lists of jobs: +* We maintain four lists of jobs: * * i) jobs waiting for pages * ii) jobs that have pages, and are waiting for the io to be issued. -* iii) jobs that have completed. +* iii) jobs that don't need to do any IO and just run a callback +* iv) jobs that have completed. * -* All three of these are protected by job_lock. +* All four of these are protected by job_lock. */ spinlock_t job_lock; +struct list_head callback_jobs;struct list_head complete_jobs;struct list_head io_jobs;struct list_head pages_jobs;
@@ -584,6 +586,7 @@ static void do_work(struct work_struct *work)struct dm_kcopyd_client *kc =container_of (work, struct dm_kcopyd_client, kcopyd_work);struct blk_plug plug; +unsigned long flags;/* * The order that these are called is *very* important.
@@ -592,6 +595,10 @@ static void do_work(struct work_struct *work)* list. io jobs call wake when they complete and it all * starts again. */ +spin_lock_irqsave (&kc->job_lock, flags); +list_splice_tail_init (&kc->callback_jobs, &kc->complete_jobs); +spin_unlock_irqrestore (&kc->job_lock, flags); +blk_start_plug (&plug);process_jobs (&kc->complete_jobs, kc, run_complete_job);process_jobs (&kc->pages_jobs, kc, run_pages_job);
@@ -609,7 +616,7 @@ static void dispatch_job(struct kcopyd_job *job)struct dm_kcopyd_client *kc = job->kc;atomic_inc (&kc->nr_jobs);if (unlikely (!job->source.count)) -push (&kc->complete_jobs, job); +push (&kc->callback_jobs, job);else if (job->pages == &zero_page_list)push (&kc->io_jobs, job);else
@@ -796,7 +803,7 @@ void dm_kcopyd_do_callback(void *j, int read_err, unsigned long write_err) job->read_err = read_err; job->write_err = write_err; -push (&kc->complete_jobs, job); +push (&kc->callback_jobs, job);wake (kc); }EXPORT_SYMBOL (dm_kcopyd_do_callback);
@@ -826,6 +833,7 @@ struct dm_kcopyd_client *dm_kcopyd_client_create(struct dm_kcopyd_throttle *throreturn ERR_PTR (-ENOMEM );spin_lock_init (&kc->job_lock); +INIT_LIST_HEAD (&kc->callback_jobs);INIT_LIST_HEAD (&kc->complete_jobs);INIT_LIST_HEAD (&kc->io_jobs);INIT_LIST_HEAD (&kc->pages_jobs);
@@ -875,6 +883,7 @@ void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc)/* Wait for completion of all jobs submitted by this client. */ wait_event (kc->destroyq, !atomic_read (&kc->nr_jobs)); +BUG_ON (!list_empty (&kc->callback_jobs));BUG_ON (!list_empty (&kc->complete_jobs));BUG_ON (!list_empty (&kc->io_jobs));BUG_ON (!list_empty (&kc->pages_jobs));
drivers/md/dm-snap.c +22 -0
@@ -19,6 +19,7 @@#include <linux/vmalloc.h> #include <linux/log2.h> #include <linux/dm-kcopyd.h> +#include <linux/semaphore.h> #include "dm.h"
@@ -105,6 +106,9 @@ struct dm_snapshot {/* The on disk metadata handler */ struct dm_exception_store *store; +/* Maximum number of in-flight COW jobs. */ +struct semaphore cow_count; +struct dm_kcopyd_client *kcopyd_client;/* Wait for events based on state_bits */
@@ -145,6 +149,19 @@ struct dm_snapshot {#define RUNNING_MERGE 0#define SHUTDOWN_MERGE 1 +/* +* Maximum number of chunks being copied on write. +* +* The value was decided experimentally as a trade-off between memory +* consumption, stalling the kernel's workqueues and maintaining a high enough +* throughput. +*/ +#define DEFAULT_COW_THRESHOLD 2048 + +static int cow_threshold =DEFAULT_COW_THRESHOLD ; +module_param_named (snapshot_cow_threshold, cow_threshold, int,0644 ); +MODULE_PARM_DESC (snapshot_cow_threshold,"Maximum number of chunks being copied on write" ); +DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM (snapshot_copy_throttle,"A percentage of time allocated for copy on write" );
@@ -1189,6 +1206,8 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad_hash_tables; } +sema_init (&s->cow_count, (cow_threshold >0 ) ? cow_threshold :INT_MAX ); + s->kcopyd_client =dm_kcopyd_client_create (&dm_kcopyd_throttle);if (IS_ERR (s->kcopyd_client)) { r =PTR_ERR (s->kcopyd_client);
@@ -1560,6 +1579,7 @@ static void copy_callback(int read_err, unsigned long write_err, void *context) }list_add (&pe->out_of_order_entry, lh); } +up (&s->cow_count); }/*
@@ -1583,6 +1603,7 @@ static void start_copy(struct dm_snap_pending_exception *pe) dest.count = src.count;/* Hand over to kcopyd */ +down (&s->cow_count);dm_kcopyd_copy (s->kcopyd_client, &src,1 , &dest,0 , copy_callback, pe); }
@@ -1602,6 +1623,7 @@ static void start_full_bio(struct dm_snap_pending_exception *pe, pe->full_bio = bio; pe->full_bio_end_io = bio->bi_end_io; +down (&s->cow_count); callback_data =dm_kcopyd_prepare_callback (s->kcopyd_client, copy_callback, pe);
drivers/media/firewire/firedtv-avc.c +4 -2
@@ -968,7 +968,8 @@ static int get_ca_object_length(struct avc_response_frame *r)return r->operand[7 ]; } -int avc_ca_app_info (struct firedtv *fdtv,char *app_info,unsigned int *len) +int avc_ca_app_info (struct firedtv *fdtv,unsigned char *app_info, +unsigned int *len) {struct avc_command_frame *c = (void *)fdtv->avc_data;struct avc_response_frame *r = (void *)fdtv->avc_data;
@@ -1009,7 +1010,8 @@ int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len)return ret; } -int avc_ca_info (struct firedtv *fdtv,char *app_info,unsigned int *len) +int avc_ca_info (struct firedtv *fdtv,unsigned char *app_info, +unsigned int *len) {struct avc_command_frame *c = (void *)fdtv->avc_data;struct avc_response_frame *r = (void *)fdtv->avc_data;
drivers/media/firewire/firedtv.h +4 -2
@@ -124,8 +124,10 @@ int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst, struct dvb_diseqc_master_cmd *diseqcmd);void avc_remote_ctrl_work (struct work_struct *work);int avc_register_remote_control (struct firedtv *fdtv); -int avc_ca_app_info (struct firedtv *fdtv,char *app_info,unsigned int *len); -int avc_ca_info (struct firedtv *fdtv,char *app_info,unsigned int *len); +int avc_ca_app_info (struct firedtv *fdtv,unsigned char *app_info, +unsigned int *len); +int avc_ca_info (struct firedtv *fdtv,unsigned char *app_info, +unsigned int *len);int avc_ca_reset (struct firedtv *fdtv);int avc_ca_pmt (struct firedtv *fdtv,char *app_info,int length);int avc_ca_get_time_date (struct firedtv *fdtv,int *interval);
drivers/mmc/host/atmel-mci.c +2 -1
@@ -1984,13 +1984,14 @@ static void atmci_tasklet_func(unsigned long priv) }atmci_request_end (host, host->mrq); - state =STATE_IDLE ; + goto unlock;/* atmci_request_end() sets host->state */ break ; } }while (state != prev_state); host->state = state; +unlock:spin_unlock (&host->lock); }
drivers/net/ethernet/intel/e1000e/ptp.c +10 -3
@@ -191,10 +191,14 @@ static int e1000e_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, ptp_clock_info);unsigned long flags; -u64 ns; +u64 cycles, ns;spin_lock_irqsave (&adapter->systim_lock, flags); - ns =timecounter_read (&adapter->tc); + +/* Use timecounter_cyc2time() to allow non-monotonic SYSTIM readings */ + cycles = adapter->cc.read (&adapter->cc); + ns =timecounter_cyc2time (&adapter->tc, cycles); +spin_unlock_irqrestore (&adapter->systim_lock, flags); *ts =ns_to_timespec64 (ns);
@@ -250,9 +254,12 @@ static void e1000e_systim_overflow_work(struct work_struct *work) systim_overflow_work.work);struct e1000_hw *hw = &adapter->hw;struct timespec64 ts; +u64 ns; - adapter->ptp_clock_info.gettime64 (&adapter->ptp_clock_info, &ts); +/* Update the timecounter */ + ns =timecounter_read (&adapter->tc); + ts =ns_to_timespec64 (ns);e_dbg ("SYSTIM overflow check at %lld.%09lu\n" , (long long ) ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/realtek/r8169.c +2 -0
@@ -324,6 +324,8 @@ enum cfg_version { };static const struct pci_device_id rtl8169_pci_tbl[] = { + {PCI_VDEVICE (REALTEK ,0x2502 ),RTL_CFG_1 }, + {PCI_VDEVICE (REALTEK ,0x2600 ),RTL_CFG_1 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8129 ),0 ,0 ,RTL_CFG_0 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8136 ),0 ,0 ,RTL_CFG_2 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8161 ),0 ,0 ,RTL_CFG_1 },
drivers/platform/x86/asus-wmi.c +2 -1
@@ -2154,7 +2154,8 @@ static int asus_wmi_add(struct platform_device *pdev) err =asus_wmi_backlight_init (asus);if (err && err != -ENODEV ) goto fail_backlight; - } + }else + err =asus_wmi_set_devstate (ASUS_WMI_DEVID_BACKLIGHT ,2 ,NULL ); status =wmi_install_notify_handler (asus->driver->event_guid, asus_wmi_notify, asus);
drivers/scsi/megaraid/megaraid_sas_fp.c +1 -1
@@ -1275,7 +1275,7 @@ void mr_update_load_balance_params(struct MR_DRV_RAID_MAP_ALL *drv_map,for (ldCount =0 ; ldCount <MAX_LOGICAL_DRIVES_EXT ; ldCount++) { ld =MR_TargetIdToLdGet (ldCount, drv_map); -if (ld >=MAX_LOGICAL_DRIVES_EXT ) { +if (ld >=MAX_LOGICAL_DRIVES_EXT -1 ) { lbInfo[ldCount].loadBalanceFlag =0 ;continue ; }
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -1
@@ -1902,7 +1902,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance, device_id < instance->fw_supported_vd_count)) { ld =MR_TargetIdToLdGet (device_id, local_map_ptr); -if (ld >= instance->fw_supported_vd_count) +if (ld >= instance->fw_supported_vd_count -1 ) fp_possible =0 ; raid =MR_LdRaidGet (ld, local_map_ptr);
drivers/scsi/smartpqi/smartpqi_init.c +3 -0
@@ -2523,6 +2523,9 @@ static unsigned int pqi_process_io_intr(struct pqi_ctrl_info *ctrl_info,switch (response->header.iu_type) {case PQI_RESPONSE_IU_RAID_PATH_IO_SUCCESS :case PQI_RESPONSE_IU_AIO_PATH_IO_SUCCESS : +if (io_request->scmd) + io_request->scmd->result =0 ; +/* fall through */ case PQI_RESPONSE_IU_GENERAL_MANAGEMENT :break ;case PQI_RESPONSE_IU_TASK_MANAGEMENT :
drivers/target/target_core_spc.c +12 -5
@@ -108,12 +108,17 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) buf[7 ] =0x2 ;/* CmdQue=1 */ -memcpy (&buf[8 ],"LIO-ORG " ,8 ); -memset (&buf[16 ],0x20 ,16 ); +/* +* ASCII data fields described as being left-aligned shall have any +* unused bytes at the end of the field (i.e., highest offset) and the +* unused bytes shall be filled with ASCII space characters (20h). +*/ +memset (&buf[8 ],0x20 ,8 +16 +4 ); +memcpy (&buf[8 ],"LIO-ORG" ,sizeof ("LIO-ORG" ) -1 );memcpy (&buf[16 ], dev->t10_wwn.model, -min_t (size_t,strlen (dev->t10_wwn.model),16 )); +strnlen (dev->t10_wwn.model,16 ));memcpy (&buf[32 ], dev->t10_wwn.revision, -min_t (size_t,strlen (dev->t10_wwn.revision),4 )); +strnlen (dev->t10_wwn.revision,4 )); buf[4 ] =31 ;/* Set additional length to 31 */ return 0 ;
@@ -251,7 +256,9 @@ spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) buf[off] =0x2 ;/* ASCII */ buf[off+1 ] =0x1 ;/* T10 Vendor ID */ buf[off+2 ] =0x0 ; -memcpy (&buf[off+4 ],"LIO-ORG" ,8 ); +/* left align Vendor ID and pad with spaces */ +memset (&buf[off+4 ],0x20 ,8 ); +memcpy (&buf[off+4 ],"LIO-ORG" ,sizeof ("LIO-ORG" ) -1 );/* Extra Byte for NULL Terminator */ id_len++;/* Identifier Length */
drivers/tty/serial/amba-pl011.c +2 -0
@@ -2712,6 +2712,7 @@ static struct platform_driver arm_sbsa_uart_platform_driver = { .name = "sbsa-uart", .of_match_table = of_match_ptr(sbsa_uart_of_match), .acpi_match_table = ACPI_PTR(sbsa_uart_acpi_match), + .suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011), }, };
@@ -2740,6 +2741,7 @@ static struct amba_driver pl011_driver = { .drv = { .name = "uart-pl011", .pm = &pl011_dev_pm_ops, + .suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011), }, .id_table = pl011_ids, .probe = pl011_probe,
drivers/tty/serial/pic32_uart.c +1 -0
@@ -920,6 +920,7 @@ static struct platform_driver pic32_uart_platform_driver = { .driver = { .name = PIC32_DEV_NAME, .of_match_table = of_match_ptr(pic32_serial_dt_ids), + .suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_PIC32), }, };
drivers/tty/serial/serial_core.c +16 -6
@@ -195,10 +195,15 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,if (!state->xmit.buf) { state->xmit.buf = (unsigned char *) page;uart_circ_clear (&state->xmit); +uart_port_unlock (uport, flags); }else { +uart_port_unlock (uport, flags); +/* +* Do not free() the page under the port lock, see +* uart_shutdown(). +*/ free_page (page); } -uart_port_unlock (uport, flags); retval = uport->ops->startup (uport);if (retval ==0 ) {
@@ -258,6 +263,7 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)struct uart_port *uport =uart_port_check (state);struct tty_port *port = &state->port;unsigned long flags =0 ; +char *xmit_buf =NULL ;/* * Set the TTY IO error marker
@@ -288,14 +294,18 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)tty_port_set_suspended (port,0 );/* -* Free the transmit buffer page. +* Do not free() the transmit buffer page under the port lock since +* this can create various circular locking scenarios. For instance, +* console driver may need to allocate/free a debug object, which +* can endup in printk() recursion. */ uart_port_lock (state, flags); -if (state->xmit.buf) { -free_page ((unsigned long )state->xmit.buf); - state->xmit.buf =NULL ; - } + xmit_buf = state->xmit.buf; + state->xmit.buf =NULL ;uart_port_unlock (uport, flags); + +if (xmit_buf) +free_page ((unsigned long )xmit_buf); }/**
drivers/tty/serial/xilinx_uartps.c +1 -0
@@ -1602,6 +1602,7 @@ static struct platform_driver cdns_uart_platform_driver = { .name = CDNS_UART_NAME, .of_match_table = cdns_uart_of_match, .pm = &cdns_uart_dev_pm_ops, + .suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_XILINX_PS_UART), }, };
fs/jffs2/super.c +2 -1
@@ -101,7 +101,8 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)struct jffs2_sb_info *c =JFFS2_SB_INFO (sb);#ifdef CONFIG_JFFS2_FS_WRITEBUFFER -cancel_delayed_work_sync (&c->wbuf_dwork); +if (jffs2_is_writebuffered (c)) +cancel_delayed_work_sync (&c->wbuf_dwork);#endif mutex_lock (&c->alloc_sem);
fs/ocfs2/localalloc.c +7 -2
@@ -345,13 +345,18 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)if (num_used || alloc->id1.bitmap1.i_used || alloc->id1.bitmap1.i_total - || la->la_bm_off) -mlog (ML_ERROR ,"Local alloc hasn't been recovered!\n" + || la->la_bm_off) { +mlog (ML_ERROR ,"inconsistent detected, clean journal with" +" unrecovered local alloc, please run fsck.ocfs2!\n" "found = %u, set = %u, taken = %u, off = %u\n" , num_used,le32_to_cpu (alloc->id1.bitmap1.i_used),le32_to_cpu (alloc->id1.bitmap1.i_total),OCFS2_LOCAL_ALLOC (alloc)->la_bm_off); + status = -EINVAL ; + goto bail; + } + osb->local_alloc_bh = alloc_bh; osb->local_alloc_state =OCFS2_LA_ENABLED ;
fs/pstore/ram_core.c +5 -0
@@ -488,6 +488,11 @@ static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig, sig ^=PERSISTENT_RAM_SIG ;if (prz->buffer->sig == sig) { +if (buffer_size (prz) ==0 ) { +pr_debug ("found existing empty buffer\n" ); +return 0 ; + } +if (buffer_size (prz) > prz->buffer_size ||buffer_start (prz) >buffer_size (prz)) pr_info("found existing invalid buffer, size %zu, start %zu\n",
include/asm-generic/qspinlock_types.h +2 -0
@@ -18,6 +18,8 @@#ifndef __ASM_GENERIC_QSPINLOCK_TYPES_H#define __ASM_GENERIC_QSPINLOCK_TYPES_H +#include <asm/byteorder.h> +/* * Including atomic.h with PARAVIRT on will cause compilation errors because * of recursive header file incluson via paravirt_types.h. So don't include
include/linux/backing-dev-defs.h +8 -0
@@ -225,6 +225,14 @@ static inline void wb_get(struct bdi_writeback *wb)*/ static inline void wb_put (struct bdi_writeback *wb) { +if (WARN_ON_ONCE (!wb->bdi)) { +/* +* A driver bug might cause a file to be removed before bdi was +* initialized. +*/ +return ; + } +if (wb != &wb->bdi->wb)percpu_ref_put (&wb->refcnt); }
mm/page-writeback.c +21 -14
@@ -2148,6 +2148,7 @@ int write_cache_pages(struct address_space *mapping, {int ret =0 ;int done =0 ; +int error;struct pagevec pvec;int nr_pages;pgoff_t uninitialized_var (writeback_index );
@@ -2244,25 +2245,31 @@ int write_cache_pages(struct address_space *mapping, goto continue_unlock;trace_wbc_writepage (wbc,inode_to_bdi (mapping->host)); - ret = (*writepage)(page, wbc, data); -if (unlikely (ret)) { -if (ret ==AOP_WRITEPAGE_ACTIVATE ) { + error = (*writepage)(page, wbc, data); +if (unlikely (error)) { +/* +* Handle errors according to the type of +* writeback. There's no need to continue for +* background writeback. Just push done_index +* past this page so media errors won't choke +* writeout for the entire file. For integrity +* writeback, we must process the entire dirty +* set regardless of errors because the fs may +* still have state to clear for each page. In +* that case we continue processing and return +* the first error. +*/ +if (error ==AOP_WRITEPAGE_ACTIVATE ) {unlock_page (page); - ret =0 ; - }else { -/* -* done_index is set past this page, -* so media errors will not choke -* background writeout for the entire -* file. This has consequences for -* range_cyclic semantics (ie. it may -* not be suitable for data integrity -* writeout). -*/ + error =0 ; + }else if (wbc->sync_mode !=WB_SYNC_ALL ) { + ret = error; done_index = page->index +1 ; done =1 ;break ; } +if (!ret) + ret = error; }/*
net/core/sock.c +1 -0
@@ -699,6 +699,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,break ;case SO_DONTROUTE :sock_valbool_flag (sk,SOCK_LOCALROUTE , valbool); +sk_dst_reset (sk);break ;case SO_BROADCAST :sock_valbool_flag (sk,SOCK_BROADCAST , valbool);
net/ipv6/af_inet6.c +13 -1
@@ -306,6 +306,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)/* Check if the address belongs to the host. */ if (addr_type ==IPV6_ADDR_MAPPED ) { +struct net_device *dev =NULL ;int chk_addr_ret;/* Binding to v4-mapped address on a v6-only socket
@@ -316,9 +317,20 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) goto out; } +rcu_read_lock (); +if (sk->sk_bound_dev_if) { + dev =dev_get_by_index_rcu (net, sk->sk_bound_dev_if); +if (!dev) { + err = -ENODEV ; + goto out_unlock; + } + } +/* Reproduce AF_INET checks to make the bindings consistent */ v4addr = addr->sin6_addr.s6_addr32[3 ]; - chk_addr_ret =inet_addr_type (net, v4addr); + chk_addr_ret =inet_addr_type_dev_table (net, dev, v4addr); +rcu_read_unlock (); + if (!net->ipv4.sysctl_ip_nonlocal_bind && !(inet->freebind || inet->transparent) && v4addr != htonl(INADDR_ANY) &&
scripts/kconfig/zconf.l +3 -1
@@ -71,7 +71,7 @@ static void warn_ignored_character(char chr) { fprintf(stderr, "%s:%d:warning: ignoring unsupported character '%c'\n", - zconf_curname(), zconf_lineno(), chr); + current_file->name, yylineno, chr); } %}
@@ -191,6 +191,8 @@ n [A-Za-z0-9_-] } <<EOF>> { BEGIN(INITIAL); + yylval.string = text; + return T_WORD_QUOTE; } }
security/selinux/hooks.c +1 -1
@@ -2758,7 +2758,7 @@ static int selinux_sb_kern_mount(struct super_block *sb, int flags, void *data)return rc;/* Allow all mounts performed by the kernel */ -if (flags &MS_KERNMOUNT ) +if (flags & (MS_KERNMOUNT |MS_SUBMOUNT ))return 0 ; ad.type =LSM_AUDIT_DATA_DENTRY ;
sound/firewire/Kconfig +1 -0
@@ -40,6 +40,7 @@ config SND_OXFW * Mackie(Loud) U.420/U.420d * TASCAM FireOne * Stanton Controllers & Systems 1 Deck/Mixer + * APOGEE duet FireWire To compile this driver as a module, choose M here: the module will be called snd-oxfw.
sound/firewire/bebob/bebob.c +1 -1
@@ -434,7 +434,7 @@ static const struct ieee1394_device_id bebob_id_table[] = {/* Apogee Electronics, DA/AD/DD-16X (X-FireWire card) */ SND_BEBOB_DEV_ENTRY (VEN_APOGEE ,0x00010048 , &spec_normal),/* Apogee Electronics, Ensemble */ -SND_BEBOB_DEV_ENTRY (VEN_APOGEE ,0x00001eee , &spec_normal), +SND_BEBOB_DEV_ENTRY (VEN_APOGEE ,0x01eeee , &spec_normal),/* ESI, Quatafire610 */ SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal),/* AcousticReality, eARMasterOne */
sound/firewire/oxfw/oxfw.c +8 -0
@@ -20,6 +20,7 @@#define VENDOR_LACIE 0x00d04b#define VENDOR_TASCAM 0x00022e#define OUI_STANTON 0x001260 +#define OUI_APOGEE 0x0003db#define MODEL_SATELLITE 0x00200f
@@ -441,6 +442,13 @@ static const struct ieee1394_device_id oxfw_id_table[] = { .vendor_id = OUI_STANTON, .model_id = 0x002000, }, +// APOGEE, duet FireWire + { + .match_flags = IEEE1394_MATCH_VENDOR_ID | + IEEE1394_MATCH_MODEL_ID, + .vendor_id = OUI_APOGEE, + .model_id = 0x01dddd, + }, { } };MODULE_DEVICE_TABLE (ieee1394, oxfw_id_table);
tools/lib/subcmd/Makefile +0 -2
@@ -29,8 +29,6 @@ endif CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -I$(srctree)/tools/include/ -CFLAGS += -I$(srctree)/include/uapi -CFLAGS += -I$(srctree)/include SUBCMD_IN := $(OUTPUT)libsubcmd-in.o
tools/perf/arch/x86/util/intel-pt.c +11 -0
@@ -522,10 +522,21 @@ static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu, struct perf_evsel *evsel) {int err; +char c;if (!evsel)return 0 ; +/* +* If supported, force pass-through config term (pt=1) even if user +* sets pt=0, which avoids senseless kernel errors. +*/ +if (perf_pmu__scan_file (intel_pt_pmu,"format/pt" ,"%c" , &c) ==1 && + !(evsel->attr.config &1 )) { +pr_warning ("pt=0 doesn't make sense, forcing pt=1\n" ); + evsel->attr.config |=1 ; + } + err =intel_pt_val_config_term (intel_pt_pmu,"caps/cycle_thresholds" ,"cyc_thresh" ,"caps/psb_cyc" , evsel->attr.config);
tools/perf/util/parse-events.c +1 -1
@@ -2225,7 +2225,7 @@ void print_symbol_events(const char *event_glob, unsigned type,if (!name_only &&strlen (syms->alias))snprintf (name,MAX_NAME_LEN ,"%s OR %s" , syms->symbol, syms->alias);else -strncpy (name, syms->symbol,MAX_NAME_LEN ); +strlcpy (name, syms->symbol,MAX_NAME_LEN ); evt_list[evt_i] =strdup (name);if (evt_list[evt_i] ==NULL )
tools/perf/util/svghelper.c +1 -1
@@ -334,7 +334,7 @@ static char *cpu_model(void)if (file) {while (fgets (buf,255 , file)) {if (strstr (buf,"model name" )) { -strncpy (cpu_m, &buf[13 ],255 ); +strlcpy (cpu_m, &buf[13 ],255 );break ; } }