Linux 4.4.209
Greg KH
maintainer[resend with correct people listed...]
I'm announcing the release of the 4.4.209 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/am437x-gp-evm.dts | 2 arch/arm/boot/dts/am43x-epos-evm.dts | 2 arch/arm/mach-vexpress/spc.c | 12 +++ arch/mips/include/asm/thread_info.h | 20 +++++ arch/parisc/include/asm/cmpxchg.h | 10 ++ arch/powerpc/mm/mem.c | 8 ++ arch/powerpc/platforms/pseries/hvconsole.c | 2 arch/s390/kernel/perf_cpum_sf.c | 22 ++++-- arch/s390/kernel/smp.c | 80 ++++++++++++++-------- arch/tile/lib/atomic_asm_32.S | 3 arch/x86/include/asm/atomic.h | 13 --- block/compat_ioctl.c | 9 ++ drivers/bluetooth/btusb.c | 3 drivers/devfreq/devfreq.c | 6 - drivers/firewire/net.c | 6 + drivers/gpio/gpiolib.c | 8 ++ drivers/gpu/drm/drm_dp_mst_topology.c | 6 + drivers/infiniband/core/cma.c | 1 drivers/md/raid1.c | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 12 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 12 +++ drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 drivers/net/macvlan.c | 2 drivers/net/usb/lan78xx.c | 11 +-- drivers/net/vxlan.c | 2 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 23 +++++- drivers/regulator/rn5t618-regulator.c | 1 drivers/scsi/libsas/sas_discover.c | 11 ++- drivers/scsi/lpfc/lpfc_bsg.c | 15 ++-- drivers/scsi/qla2xxx/qla_isr.c | 4 - drivers/scsi/qla4xxx/ql4_os.c | 1 drivers/tty/hvc/hvc_vio.c | 16 ++++ drivers/tty/serial/msm_serial.c | 13 +++ drivers/usb/core/config.c | 70 +++++++++++++++---- drivers/usb/gadget/function/f_ecm.c | 6 + drivers/usb/gadget/function/f_rndis.c | 1 drivers/usb/serial/option.c | 2 drivers/xen/balloon.c | 3 fs/locks.c | 2 fs/pstore/ram.c | 11 +++ fs/xfs/xfs_log.c | 2 include/linux/dmaengine.h | 5 + include/linux/if_ether.h | 8 ++ include/net/neighbour.h | 2 include/uapi/linux/netfilter/xt_sctp.h | 6 - kernel/locking/spinlock_debug.c | 32 ++++---- kernel/taskstats.c | 30 +++++--- kernel/trace/ftrace.c | 6 - net/8021q/vlan.h | 1 net/8021q/vlan_dev.c | 3 net/8021q/vlan_netlink.c | 19 +++-- net/bluetooth/l2cap_core.c | 4 - net/core/neighbour.c | 4 - net/ethernet/eth.c | 7 + net/ipv4/tcp_input.c | 5 + net/llc/llc_station.c | 4 - net/netfilter/nf_conntrack_netlink.c | 3 net/rfkill/core.c | 7 + net/sched/sch_fq.c | 2 net/sctp/sm_sideeffect.c | 28 ++++--- scripts/kconfig/expr.c | 7 + sound/isa/cs423x/cs4236.c | 3 sound/pci/ice1712/ice1724.c | 9 +- sound/soc/codecs/wm8962.c | 4 - tools/perf/builtin-report.c | 7 - 68 files changed, 459 insertions(+), 189 deletions(-)
Aditya Pakki (1):
rfkill: Fix incorrect check to avoid NULL pointer dereference
Aleksandr Yashkin (1):
pstore/ram: Write new dumps to start of recycled zones
Amir Goldstein (1):
locks: print unsigned ino in /proc/locks
Andreas Kemnade (1):
regulator: rn5t618: fix module aliases
Arnd Bergmann (1):
compat_ioctl: block: handle Persistent Reservations
Bo Wu (1):
scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func
Brian Foster (1):
xfs: fix mount failure crash on invalid iclog memory access
Chan Shu Tak, Alex (1):
llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c)
Chen-Yu Tsai (1):
net: stmmac: dwmac-sunxi: Allow all RGMII modes
Christian Brauner (1):
taskstats: fix data-race
Chuhong Yuan (1):
RDMA/cma: add missed unregister_pernet_subsys in init failure
Colin Ian King (1):
ALSA: cs4236: fix error return comparison of an unsigned integer
Cristian Birsan (1):
net: usb: lan78xx: Fix error message format specifier
Dan Carpenter (2):
scsi: iscsi: qla4xxx: fix double free in probe
Bluetooth: delete a stray unlock
Daniel Axtens (1):
powerpc/pseries/hvconsole: Fix stack overread via udbg
Daniele Palmas (1):
USB: serial: option: add Telit ME910G1 0x110a composition
Dmitry Vyukov (1):
locking/x86: Remove the unused atomic_inc_short() methd
EJ Hsu (1):
usb: gadget: fix wrong endpoint desc
Eric Dumazet (6):
net: add annotations on hh->hh_len lockless accesses
net: usb: lan78xx: fix possible skb leak
pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM
vlan: vlan_changelink() should propagate errors
vlan: fix memory leak in vlan_dev_set_egress_priority
macvlan: do not assume mac_header is set in macvlan_broadcast()
Florian Westphal (1):
netfilter: ctnetlink: netns exit must wait for callbacks
Greg Kroah-Hartman (1):
Linux 4.4.209
Hangbin Liu (1):
vxlan: fix tos value before xmit
Heiko Carstens (1):
s390/smp: fix physical to logical CPU map for SMT
Helge Deller (1):
parisc: Fix compiler warnings in debug_core.c
Imre Deak (1):
drm/mst: Fix MST sideband up-reply failure handling
Jason Yan (1):
scsi: libsas: stop discovering if oob mode is disconnected
Johan Hovold (1):
USB: core: fix check for duplicate endpoints
Juergen Gross (1):
xen/balloon: fix ballooned page accounting without hotplug enabled
Leo Yan (1):
tty: serial: msm_serial: Fix lockup for sysrq and oops
Leonard Crestez (1):
PM / devfreq: Don't fail devfreq_dev_release if not in list
Lukas Wunner (1):
dmaengine: Fix access to uninitialized dma_slave_caps
Manish Chopra (2):
bnx2x: Do not handle requests from VFs after parity
bnx2x: Fix logic to get total no. of PFs per engine
Marco Elver (1):
locking/spinlock/debug: Fix various data races
Masashi Honma (2):
ath9k_htc: Modify byte order for an error message
ath9k_htc: Discard undersized packets
Mike Rapoport (1):
powerpc: Ensure that swiotlb buffer is allocated from low memory
Oliver Neukum (1):
Bluetooth: btusb: fix PM leak in error case of setup
Paul Burton (1):
MIPS: Avoid VDSO ABI breakage due to global register variable
Pengcheng Yang (1):
tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK
Phil Sutter (1):
netfilter: uapi: Avoid undefined left-shift in xt_sctp.h
Roman Bolshakov (1):
scsi: qla2xxx: Don't call qlt_async_event twice
Russell King (1):
gpiolib: fix up emulated open drain outputs
Sasha Levin (1):
Revert "perf report: Add warning when libunwind not compiled in"
Shengjiu Wang (1):
ASoC: wm8962: fix lambda value
Sudeep Holla (1):
ARM: vexpress: Set-up shared OPP table instead of individual for each CPU
Takashi Iwai (1):
ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code
Thomas Hebb (1):
kconfig: don't crash on NULL expressions in expr_eq()
Thomas Richter (2):
s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits s390/cpum_sf: Avoid SBD overflow condition in irq handler
Tomi Valkeinen (1):
ARM: dts: am437x-gp/epos-evm: fix panel compatible
Wen Yang (1):
ftrace: Avoid potential division by zero in function profiler
Xin Long (1):
sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY
Zhiqiang Liu (1):
md: raid1: check rdev before reference in raid1_sync_request func
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 208 +SUBLEVEL = 209 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/am437x-gp-evm.dts +1 -1
@@ -79,7 +79,7 @@ }; lcd0: display { - compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; + compatible = "osddisplays,osd070t1718-19ts", "panel-dpi"; label = "lcd"; panel-timing {
arch/arm/boot/dts/am43x-epos-evm.dts +1 -1
@@ -41,7 +41,7 @@ }; lcd0: display { - compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; + compatible = "osddisplays,osd070t1718-19ts", "panel-dpi"; label = "lcd"; panel-timing {
arch/arm/mach-vexpress/spc.c +11 -1
@@ -555,8 +555,9 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev)static int __init ve_spc_clk_init (void ) { -int cpu; +int cpu, cluster;struct clk *clk; +bool init_opp_table[MAX_CLUSTERS ] = { false };if (!info)return 0 ;/* Continue only if SPC is initialised */
@@ -582,8 +583,17 @@ static int __init ve_spc_clk_init(void)continue ; } + cluster =topology_physical_package_id (cpu_dev->id); +if (init_opp_table[cluster]) +continue ; +if (ve_init_opp_table (cpu_dev))pr_warn ("failed to initialise cpu%d opp table\n" , cpu); +else if (dev_pm_opp_set_sharing_cpus (cpu_dev, +topology_core_cpumask (cpu_dev->id))) +pr_warn ("failed to mark OPPs shared for cpu%d\n" , cpu); +else + init_opp_table[cluster] = true; }platform_device_register_simple ("vexpress-spc-cpufreq" ,-1 ,NULL ,0 );
arch/mips/include/asm/thread_info.h +19 -1
@@ -52,8 +52,26 @@ struct thread_info {#define init_thread_info (init_thread_union.thread_info)#define init_stack (init_thread_union.stack) -/* How to get the thread information struct from C. */ +/* +* A pointer to the struct thread_info for the currently executing thread is +* held in register $28/$gp. +* +* We declare __current_thread_info as a global register variable rather than a +* local register variable within current_thread_info() because clang doesn't +* support explicit local register variables. +* +* When building the VDSO we take care not to declare the global register +* variable because this causes GCC to not preserve the value of $28/$gp in +* functions that change its value (which is common in the PIC VDSO when +* accessing the GOT). Since the VDSO shouldn't be accessing +* __current_thread_info anyway we declare it extern in order to cause a link +* failure if it's referenced. +*/ +#ifdef __VDSO__ +extern struct thread_info *__current_thread_info; +#else registerstruct thread_info *__current_thread_info __asm__("$28" ); +#endif static inline struct thread_info *current_thread_info (void ) {
arch/parisc/include/asm/cmpxchg.h +8 -2
@@ -43,8 +43,14 @@ __xchg(unsigned long x, __volatile__ void *ptr, int size)** if (((unsigned long)p & 0xf) == 0) ** return __ldcw(p); */ -#define xchg (ptr, x) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) +#define xchg (ptr, x) \ +({ \ + __typeof__(*(ptr)) __ret; \ + __typeof__(*(ptr)) _x_ = (x); \ + __ret = (__typeof__(*(ptr))) \ + __xchg((unsigned long)_x_, (ptr), sizeof(*(ptr))); \ + __ret; \ +})/* bug catcher for when unsupported size is used - won't link */ extern void __cmpxchg_called_with_bad_pointer (void );
arch/powerpc/mm/mem.c +8 -0
@@ -330,6 +330,14 @@ void __init mem_init(void)BUILD_BUG_ON (MMU_PAGE_COUNT >16 );#ifdef CONFIG_SWIOTLB +/* +* Some platforms (e.g. 85xx) limit DMA-able memory way below +* 4G. We force memblock to bottom-up mode to ensure that the +* memory allocated in swiotlb_init() is DMA-able. +* As it's the last memblock allocation, no need to reset it +* back to to-down. +*/ +memblock_set_bottom_up (true);swiotlb_init (0 );#endif
arch/powerpc/platforms/pseries/hvconsole.c +1 -1
@@ -62,7 +62,7 @@ EXPORT_SYMBOL(hvc_get_chars);* @vtermno: The vtermno or unit_address of the adapter from which the data * originated. * @buf: The character buffer that contains the character data to send to -* firmware. +* firmware. Must be at least 16 bytes, even if count is less than 16. * @count: Send this number of characters. */ int hvc_put_chars (uint32_t vtermno,const char *buf,int count)
arch/s390/kernel/perf_cpum_sf.c +16 -6
@@ -1294,18 +1294,28 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all)*/ if (flush_all && done)break ; - -/* If an event overflow happened, discard samples by -* processing any remaining sample-data-blocks. -*/ -if (event_overflow) - flush_all =1 ; }/* Account sample overflows in the event hardware structure */ if (sampl_overflow)OVERFLOW_REG (hwc) =DIV_ROUND_UP (OVERFLOW_REG (hwc) + sampl_overflow,1 + num_sdb); + +/* Perf_event_overflow() and perf_event_account_interrupt() limit +* the interrupt rate to an upper limit. Roughly 1000 samples per +* task tick. +* Hitting this limit results in a large number +* of throttled REF_REPORT_THROTTLE entries and the samples +* are dropped. +* Slightly increase the interval to avoid hitting this limit. +*/ +if (event_overflow) { +SAMPL_RATE (hwc) +=DIV_ROUND_UP (SAMPL_RATE (hwc),10 ); +debug_sprintf_event (sfdbg,1 ,"%s: rate adjustment %ld\n" , + __func__, +DIV_ROUND_UP (SAMPL_RATE (hwc),10 )); + } +if (sampl_overflow || event_overflow) debug_sprintf_event(sfdbg, 4, "hw_perf_event_update: " "overflow stats: sample=%llu event=%llu\n",
arch/s390/kernel/smp.c +54 -26
107 lines not on this page · raw message
arch/tile/lib/atomic_asm_32.S +1 -2
@@ -24,8 +24,7 @@ * has an opportunity to return -EFAULT to the user if needed. * The 64-bit routines just return a "long long" with the value, * since they are only used from kernel space and don't expect to fault. - * Support for 16-bit ops is included in the framework but we don't provide - * any (x86_64 has an atomic_inc_short(), so we might want to some day). + * Support for 16-bit ops is included in the framework but we don't provide any. * * Note that the caller is advised to issue a suitable L1 or L2 * prefetch on the address being manipulated to avoid extra stalls.
arch/x86/include/asm/atomic.h +0 -13
@@ -220,19 +220,6 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)return c; } -/** -* atomic_inc_short - increment of a short integer -* @v: pointer to type int -* -* Atomically adds 1 to @v -* Returns the new value of @u -*/ -static __always_inline short int atomic_inc_short(short int *v) -{ - asm(LOCK_PREFIX "addw $1, %0" :"+m" (*v)); -return *v; -} -#ifdef CONFIG_X86_32 # include <asm/atomic64_32.h> #else
block/compat_ioctl.c +9 -0
@@ -5,6 +5,7 @@#include <linux/compat.h> #include <linux/elevator.h> #include <linux/hdreg.h> +#include <linux/pr.h> #include <linux/slab.h> #include <linux/syscalls.h> #include <linux/types.h>
@@ -406,6 +407,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)case BLKTRACETEARDOWN :/* compatible */ ret =blk_trace_ioctl (bdev, cmd,compat_ptr (arg));return ret; +case IOC_PR_REGISTER : +case IOC_PR_RESERVE : +case IOC_PR_RELEASE : +case IOC_PR_PREEMPT : +case IOC_PR_PREEMPT_ABORT : +case IOC_PR_CLEAR : +return blkdev_ioctl (bdev, mode, cmd, + (unsigned long )compat_ptr (arg));default :if (disk->fops->compat_ioctl) ret = disk->fops->compat_ioctl (bdev, mode, cmd, arg);
drivers/bluetooth/btusb.c +2 -1
@@ -1056,7 +1056,7 @@ static int btusb_open(struct hci_dev *hdev)if (data->setup_on_usb) { err = data->setup_on_usb (hdev);if (err <0 ) -return err; + goto setup_fail; } err =usb_autopm_get_interface (data->intf);
@@ -1092,6 +1092,7 @@ done: failed:clear_bit (BTUSB_INTR_RUNNING , &data->flags); +setup_fail:usb_autopm_put_interface (data->intf);return err; }
drivers/devfreq/devfreq.c +1 -5
@@ -396,11 +396,6 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,static void _remove_devfreq (struct devfreq *devfreq) {mutex_lock (&devfreq_list_lock); -if (IS_ERR (find_device_devfreq (devfreq->dev.parent))) { -mutex_unlock (&devfreq_list_lock); -dev_warn (&devfreq->dev,"releasing devfreq which doesn't exist\n" ); -return ; - }list_del (&devfreq->node);mutex_unlock (&devfreq_list_lock);
@@ -472,6 +467,7 @@ struct devfreq *devfreq_add_device(struct device *dev, devfreq->dev.parent = dev; devfreq->dev.class = devfreq_class; devfreq->dev.release = devfreq_dev_release; +INIT_LIST_HEAD (&devfreq->node); devfreq->profile = profile;strncpy (devfreq->governor_name, governor_name,DEVFREQ_NAME_LEN ); devfreq->previous_freq = profile->initial_freq;
drivers/firewire/net.c +5 -1
@@ -249,7 +249,11 @@ static int fwnet_header_cache(const struct neighbour *neigh, h = (struct fwnet_header *)((u8 *)hh->hh_data +HH_DATA_OFF (sizeof (*h))); h->h_proto = type;memcpy (h->h_dest, neigh->ha, net->addr_len); - hh->hh_len =FWNET_HLEN ; + +/* Pairs with the READ_ONCE() in neigh_resolve_output(), +* neigh_hh_output() and neigh_update_hhs(). +*/ +smp_store_release (&hh->hh_len,FWNET_HLEN );return 0 ; }
drivers/gpio/gpiolib.c +8 -0
@@ -163,6 +163,14 @@ int gpiod_get_direction(struct gpio_desc *desc) chip =gpiod_to_chip (desc); offset =gpio_chip_hwgpio (desc); +/* +* Open drain emulation using input mode may incorrectly report +* input here, fix that up. +*/ +if (test_bit (FLAG_OPEN_DRAIN , &desc->flags) && +test_bit (FLAG_IS_OUT , &desc->flags)) +return 0 ; +if (!chip->get_direction)return status;
drivers/gpu/drm/drm_dp_mst_topology.c +5 -1
@@ -1538,7 +1538,11 @@ static void process_single_up_tx_qlock(struct drm_dp_mst_topology_mgr *mgr,if (ret !=1 )DRM_DEBUG_KMS ("failed to send msg in q %d\n" , ret); - txmsg->dst->tx_slots[txmsg->seqno] =NULL ; +if (txmsg->seqno !=-1 ) { +WARN_ON ((unsigned int )txmsg->seqno > +ARRAY_SIZE (txmsg->dst->tx_slots)); + txmsg->dst->tx_slots[txmsg->seqno] =NULL ; + } } static void drm_dp_queue_down_tx(struct drm_dp_mst_topology_mgr *mgr,
drivers/infiniband/core/cma.c +1 -0
@@ -4109,6 +4109,7 @@ err:unregister_netdevice_notifier (&cma_nb);rdma_addr_unregister_client (&addr_client);ib_sa_unregister_client (&sa_client); +unregister_pernet_subsys (&cma_pernet_operations); err_wq:destroy_workqueue (cma_wq);return ret;
drivers/md/raid1.c +1 -1
@@ -2630,7 +2630,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp write_targets++; } } -if (bio->bi_end_io) { +if (rdev && bio->bi_end_io) {atomic_inc (&rdev->nr_pending); bio->bi_iter.bi_sector = sector_nr + rdev->data_offset; bio->bi_bdev = rdev->bdev;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +1 -1
@@ -1107,7 +1107,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)for (i =0 ; i <E1H_FUNC_MAX /2 ; i++) {u32 func_config =MF_CFG_RD (bp, - func_mf_config[BP_PORT (bp) +2 * i]. + func_mf_config[BP_PATH (bp) +2 * i]. config); func_num += ((func_config &FUNC_MF_CFG_FUNC_HIDE ) ?0 :1 );
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +10 -2
@@ -9942,10 +9942,18 @@ static void bnx2x_recovery_failed(struct bnx2x *bp)*/ static void bnx2x_parity_recover (struct bnx2x *bp) { -bool global = false;u32 error_recovered, error_unrecovered; -bool is_parity; +bool is_parity, global = false; +#ifdef CONFIG_BNX2X_SRIOV +int vf_idx; + +for (vf_idx =0 ; vf_idx < bp->requested_nr_virtfn; vf_idx++) { +struct bnx2x_virtf *vf =BP_VF (bp, vf_idx); +if (vf) + vf->state =VF_LOST ; + } +#endif DP (NETIF_MSG_HW ,"Handling parity\n" );while (1 ) {switch (bp->recovery_state) {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h +1 -0
@@ -139,6 +139,7 @@ struct bnx2x_virtf {#define VF_ACQUIRED 1/* VF acquired, but not initialized */ #define VF_ENABLED 2/* VF Enabled */ #define VF_RESET 3/* VF FLR'd, pending cleanup */ +#define VF_LOST 4/* Recovery while VFs are loaded */ bool flr_clnup_stage;/* true during flr cleanup */
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c +12 -0
@@ -2095,6 +2095,18 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, {int i; +if (vf->state ==VF_LOST ) { +/* Just ack the FW and return if VFs are lost +* in case of parity error. VFs are supposed to be timedout +* on waiting for PF response. +*/ +DP (BNX2X_MSG_IOV , +"VF 0x%x lost, not handling the request\n" , vf->abs_vfid); + +storm_memset_vf_mbx_ack (bp, vf->abs_vfid); +return ; + } +/* check if tlv type is known */ if (bnx2x_tlv_supported (mbx->first_tlv.tl.type)) {/* Lock the per vf op mutex and note the locker's identity.
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +1 -1
@@ -53,7 +53,7 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv)* rate, which then uses the auto-reparenting feature of the * clock driver, and enabling/disabling the clock. */ -if (gmac->interface ==PHY_INTERFACE_MODE_RGMII ) { +if (phy_interface_mode_is_rgmii (gmac->interface)) {clk_set_rate (gmac->tx_clk,SUN7I_GMAC_GMII_RGMII_RATE );clk_prepare_enable (gmac->tx_clk); gmac->clk_enabled =1 ;
drivers/net/macvlan.c +1 -1
@@ -233,7 +233,7 @@ static void macvlan_broadcast(struct sk_buff *skb, struct net_device *src, enum macvlan_mode mode) { -const struct ethhdr *eth =eth_hdr (skb); +const struct ethhdr *eth =skb_eth_hdr (skb);const struct macvlan_dev *vlan;struct sk_buff *nskb;unsigned int i;
drivers/net/usb/lan78xx.c +4 -7
@@ -370,7 +370,7 @@ static int lan78xx_read_stats(struct lan78xx_net *dev, } }else {netdev_warn (dev->net, -"Failed to read stat ret = 0x%x" , ret); +"Failed to read stat ret = %d" , ret); }kfree (stats);
@@ -2036,11 +2036,6 @@ int lan78xx_stop(struct net_device *net)return 0 ; } -static int lan78xx_linearize (struct sk_buff *skb) -{ -return skb_linearize (skb); -} -static struct sk_buff *lan78xx_tx_prep (struct lan78xx_net *dev,struct sk_buff *skb,gfp_t flags) {
@@ -2051,8 +2046,10 @@ static struct sk_buff *lan78xx_tx_prep(struct lan78xx_net *dev,return NULL ; } -if (lan78xx_linearize (skb) <0 ) +if (skb_linearize (skb)) { +dev_kfree_skb_any (skb);return NULL ; + } tx_cmd_a = (u32)(skb->len &TX_CMD_A_LEN_MASK_ ) |TX_CMD_A_FCS_ ;
drivers/net/vxlan.c +1 -1
@@ -2068,7 +2068,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,return ; } - tos =ip_tunnel_ecn_encap (tos, old_iph, skb); + tos =ip_tunnel_ecn_encap (RT_TOS (tos), old_iph, skb); ttl = ttl ? :ip4_dst_hoplimit (&rt->dst); err = vxlan_xmit_skb(rt, sk, skb, fl4.saddr, dst->sin.sin_addr.s_addr, tos, ttl, df,
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +19 -4
@@ -972,6 +972,8 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,struct ath_htc_rx_status *rxstatus;struct ath_rx_status rx_stats;bool decrypt_error = false; +__be16 rs_datalen; +bool is_phyerr;if (skb->len <HTC_RX_FRAME_HEADER_SIZE ) { ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
@@ -981,11 +983,24 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, rxstatus = (struct ath_htc_rx_status *)skb->data; -if (be16_to_cpu (rxstatus->rs_datalen) - - (skb->len -HTC_RX_FRAME_HEADER_SIZE ) !=0 ) { + rs_datalen =be16_to_cpu (rxstatus->rs_datalen); +if (unlikely (rs_datalen - + (skb->len -HTC_RX_FRAME_HEADER_SIZE ) !=0 )) {ath_err (common,"Corrupted RX data len, dropping (dlen: %d, skblen: %d)\n" , - rxstatus->rs_datalen, skb->len); + rs_datalen, skb->len); + goto rx_next; + } + + is_phyerr = rxstatus->rs_status &ATH9K_RXERR_PHY ; +/* +* Discard zero-length packets and packets smaller than an ACK +* which are not PHY_ERROR (short radar pulses have a length of 3) +*/ +if (unlikely (!rs_datalen || (rs_datalen <10 && !is_phyerr))) { +ath_warn (common, +"Short RX data len, dropping (dlen: %d)\n" , + rs_datalen); goto rx_next; }
@@ -1010,7 +1025,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,* Process PHY errors and return so that the packet * can be dropped. */ -if (rx_stats.rs_status &ATH9K_RXERR_PHY ) { +if (unlikely (is_phyerr)) {/* TODO: Not using DFS processing now. */ if (ath_cmn_process_fft (&priv->spec_priv, hdr, &rx_stats, rx_status->mactime)) {
drivers/regulator/rn5t618-regulator.c +1 -0
@@ -95,6 +95,7 @@ static struct platform_driver rn5t618_regulator_driver = {module_platform_driver (rn5t618_regulator_driver); +MODULE_ALIAS ("platform:rn5t618-regulator" );MODULE_AUTHOR ("Beniamino Galvani <[email protected]>" );MODULE_DESCRIPTION ("RN5T618 regulator driver" );MODULE_LICENSE ("GPL v2" );
drivers/scsi/libsas/sas_discover.c +10 -1
@@ -97,12 +97,21 @@ static int sas_get_port_device(struct asd_sas_port *port)else dev->dev_type =SAS_SATA_DEV ; dev->tproto =SAS_PROTOCOL_SATA ; - }else { + }else if (port->oob_mode ==SAS_OOB_MODE ) {struct sas_identify_frame *id = (struct sas_identify_frame *) dev->frame_rcvd; dev->dev_type = id->dev_type; dev->iproto = id->initiator_bits; dev->tproto = id->target_bits; + }else { +/* If the oob mode is OOB_NOT_CONNECTED, the port is +* disconnected due to race with PHY down. We cannot +* continue to discover this port +*/ +sas_put_device (dev); +pr_warn ("Port %016llx is disconnected when discovering\n" , +SAS_ADDR (port->attached_sas_addr)); +return -ENODEV ; }sas_init_dev (dev);
drivers/scsi/lpfc/lpfc_bsg.c +9 -6
@@ -4352,12 +4352,6 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct fc_bsg_job *job, phba->mbox_ext_buf_ctx.seqNum++; nemb_tp = phba->mbox_ext_buf_ctx.nembType; - dd_data =kmalloc (sizeof (struct bsg_job_data ),GFP_KERNEL ); -if (!dd_data) { - rc = -ENOMEM ; - goto job_error; - } - pbuf = (uint8_t *)dmabuf->virt; size = job->request_payload.payload_len; sg_copy_to_buffer(job->request_payload.sg_list,
@@ -4394,6 +4388,13 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct fc_bsg_job *job,"2968 SLI_CONFIG ext-buffer wr all %d " "ebuffers received\n" , phba->mbox_ext_buf_ctx.numBuf); + + dd_data =kmalloc (sizeof (struct bsg_job_data ),GFP_KERNEL ); +if (!dd_data) { + rc = -ENOMEM ; + goto job_error; + } +/* mailbox command structure for base driver */ pmboxq =mempool_alloc (phba->mbox_mem_pool,GFP_KERNEL );if (!pmboxq) {
@@ -4441,6 +4442,8 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct fc_bsg_job *job,return SLI_CONFIG_HANDLED ; job_error: +if (pmboxq) +mempool_free (pmboxq, phba->mbox_mem_pool);lpfc_bsg_dma_page_free (phba, dmabuf);kfree (dd_data);
drivers/scsi/qla2xxx/qla_isr.c +0 -4
@@ -966,8 +966,6 @@ global_port_update:ql_dbg (ql_dbg_async, vha,0x5011 ,"Asynchronous PORT UPDATE ignored %04x/%04x/%04x.\n" , mb[1 ], mb[2 ], mb[3 ]); - -qlt_async_event (mb[0 ], vha, mb);break ; }
@@ -988,8 +986,6 @@ global_port_update:set_bit (LOOP_RESYNC_NEEDED , &vha->dpc_flags);set_bit (LOCAL_LOOP_UPDATE , &vha->dpc_flags);set_bit (VP_CONFIG_OK , &vha->vp_flags); - -qlt_async_event (mb[0 ], vha, mb);break ;case MBA_RSCN_UPDATE :/* State Change Registration */
drivers/scsi/qla4xxx/ql4_os.c +0 -1
@@ -4285,7 +4285,6 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)return QLA_SUCCESS ; mem_alloc_error_exit: -qla4xxx_mem_free (ha);return QLA_ERROR ; }
drivers/tty/hvc/hvc_vio.c +15 -1
@@ -122,6 +122,14 @@ static int hvterm_raw_get_chars(uint32_t vtermno, char *buf, int count)return got; } +/** +* hvterm_raw_put_chars: send characters to firmware for given vterm adapter +* @vtermno: The virtual terminal number. +* @buf: The characters to send. Because of the underlying hypercall in +* hvc_put_chars(), this buffer must be at least 16 bytes long, even if +* you are sending fewer chars. +* @count: number of chars to send. +*/ static int hvterm_raw_put_chars (uint32_t vtermno,const char *buf,int count) {struct hvterm_priv *pv = hvterm_privs[vtermno];
@@ -234,6 +242,7 @@ static const struct hv_ops hvterm_hvsi_ops = {static void udbg_hvc_putc (char c) {int count =-1 ; +unsigned char bounce_buffer[16 ];if (!hvterm_privs[0 ])return ;
@@ -244,7 +253,12 @@ static void udbg_hvc_putc(char c) do { switch(hvterm_privs[0]->proto) { case HV_PROTOCOL_RAW: - count = hvterm_raw_put_chars(0, &c, 1); + /* + * hvterm_raw_put_chars requires at least a 16-byte + * buffer, so go via the bounce buffer + */ + bounce_buffer[0] = c; + count = hvterm_raw_put_chars(0, bounce_buffer, 1); break; case HV_PROTOCOL_HVSI: count = hvterm_hvsi_put_chars(0, &c, 1);
drivers/tty/serial/msm_serial.c +11 -2
@@ -1381,6 +1381,7 @@ static void __msm_console_write(struct uart_port *port, const char *s,int num_newlines =0 ;bool replaced = false;void __iomem *tf; +int locked =1 ;if (is_uartdm) tf = port->membase +UARTDM_TF ;
@@ -1393,7 +1394,13 @@ static void __msm_console_write(struct uart_port *port, const char *s, num_newlines++; count += num_newlines; -spin_lock (&port->lock); +if (port->sysrq) + locked =0 ; +else if (oops_in_progress) + locked =spin_trylock (&port->lock); +else +spin_lock (&port->lock); +if (is_uartdm)msm_reset_dm_count (port, count);
@@ -1429,7 +1436,9 @@ static void __msm_console_write(struct uart_port *port, const char *s,iowrite32_rep (tf, buf,1 ); i += num_chars; } -spin_unlock (&port->lock); + +if (locked) +spin_unlock (&port->lock); } static void msm_console_write(struct console *co, const char *s,
drivers/usb/core/config.c +58 -12
88 lines not on this page · raw message
drivers/usb/gadget/function/f_ecm.c +5 -1
@@ -625,8 +625,12 @@ static void ecm_disable(struct usb_function *f)DBG (cdev,"ecm deactivated\n" ); -if (ecm->port.in_ep->enabled) +if (ecm->port.in_ep->enabled) {gether_disconnect (&ecm->port); + }else { + ecm->port.in_ep->desc =NULL ; + ecm->port.out_ep->desc =NULL ; + }usb_ep_disable (ecm->notify); ecm->notify->desc =NULL ;
drivers/usb/gadget/function/f_rndis.c +1 -0
@@ -619,6 +619,7 @@ static void rndis_disable(struct usb_function *f)gether_disconnect (&rndis->port);usb_ep_disable (rndis->notify); + rndis->notify->desc =NULL ; }/*-------------------------------------------------------------------------*/
drivers/usb/serial/option.c +2 -0
@@ -1167,6 +1167,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1102, 0xff), /* Telit ME910 (ECM) */ .driver_info = NCTRL(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110a, 0xff), /* Telit ME910G1 */ + .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
drivers/xen/balloon.c +2 -1
@@ -392,7 +392,8 @@ static struct notifier_block xen_memory_nb = {#else static enum bp_state reserve_additional_memory (void ) { - balloon_stats.target_pages = balloon_stats.current_pages; + balloon_stats.target_pages = balloon_stats.current_pages + + balloon_stats.target_unpopulated;return BP_ECANCELED ; }#endif /* CONFIG_XEN_BALLOON_MEMORY_HOTPLUG */
fs/locks.c +1 -1
@@ -2599,7 +2599,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl, }if (inode) {/* userspace relies on this representation of dev_t */ -seq_printf (f,"%d %02x:%02x:%ld " , fl_pid, +seq_printf (f,"%d %02x:%02x:%lu " , fl_pid,MAJOR (inode->i_sb->s_dev),MINOR (inode->i_sb->s_dev), inode->i_ino); }else {
fs/pstore/ram.c +11 -0
@@ -319,6 +319,17 @@ static int notrace ramoops_pstore_write_buf(enum pstore_type_id type, prz = cxt->przs[cxt->dump_write_cnt]; +/* +* Since this is a new crash dump, we need to reset the buffer in +* case it still has an old dump present. Without this, the new dump +* will get appended, which would seriously confuse anything trying +* to check dump file contents. Specifically, ramoops_read_kmsg_hdr() +* expects to find a dump header in the beginning of buffer data, so +* we must to reset the buffer values, in order to ensure that the +* header will be written to the beginning of the buffer. +*/ +persistent_ram_zap (prz); + hlen =ramoops_write_kmsg_hdr (prz, compressed);if (size + hlen > prz->buffer_size) size = prz->buffer_size - hlen;
fs/xfs/xfs_log.c +2 -0
@@ -1503,6 +1503,8 @@ out_free_iclog:if (iclog->ic_bp)xfs_buf_free (iclog->ic_bp);kmem_free (iclog); +if (prev_iclog == log->l_iclog) +break ; }spinlock_destroy (&log->l_icloglock);xfs_buf_free (log->l_xbuf);
include/linux/dmaengine.h +4 -1
@@ -1207,8 +1207,11 @@ static inline int dma_get_slave_caps(struct dma_chan *chan,static inline int dmaengine_desc_set_reuse (struct dma_async_tx_descriptor *tx) {struct dma_slave_caps caps; +int ret; -dma_get_slave_caps (tx->chan, &caps); + ret =dma_get_slave_caps (tx->chan, &caps); +if (ret) +return ret;if (caps.descriptor_reuse) { tx->flags |=DMA_CTRL_REUSE ;
include/linux/if_ether.h +8 -0
@@ -28,6 +28,14 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)return (struct ethhdr *)skb_mac_header (skb); } +/* Prefer this version in TX path, instead of +* skb_reset_mac_header() + eth_hdr() +*/ +static inline struct ethhdr *skb_eth_hdr (const struct sk_buff *skb) +{ +return (struct ethhdr *)skb->data; +} +int eth_header_parse (const struct sk_buff *skb,unsigned char *haddr);extern ssize_t sysfs_format_mac (char *buf,const unsigned char *addr,int len);
include/net/neighbour.h +1 -1
@@ -454,7 +454,7 @@ static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb do { seq = read_seqbegin(&hh->hh_lock); - hh_len = hh->hh_len; + hh_len = READ_ONCE(hh->hh_len); if (likely(hh_len <= HH_DATA_MOD)) { hh_alen = HH_DATA_MOD;
include/uapi/linux/netfilter/xt_sctp.h +3 -3
@@ -40,19 +40,19 @@ struct xt_sctp_info {#define SCTP_CHUNKMAP_SET (chunkmap, type) \ do { \ (chunkmap)[type / bytes(__u32)] |= \ - 1 << (type % bytes(__u32)); \ + 1u << (type % bytes(__u32)); \ } while (0)#define SCTP_CHUNKMAP_CLEAR (chunkmap, type) \ do { \ (chunkmap)[type / bytes(__u32)] &= \ - ~(1 << (type % bytes(__u32))); \ + ~(1u << (type % bytes(__u32))); \ } while (0)#define SCTP_CHUNKMAP_IS_SET (chunkmap, type) \ ({ \ ((chunkmap)[type / bytes (__u32)] & \ - (1 << (type % bytes (__u32)))) ? 1: 0; \ + (1u << (type % bytes (__u32)))) ? 1: 0; \ })#define SCTP_CHUNKMAP_RESET (chunkmap) \
kernel/locking/spinlock_debug.c +16 -16
@@ -51,19 +51,19 @@ EXPORT_SYMBOL(__rwlock_init);static void spin_dump (raw_spinlock_t *lock,const char *msg) { -struct task_struct *owner =NULL ; +struct task_struct *owner =READ_ONCE (lock->owner); -if (lock->owner && lock->owner !=SPINLOCK_OWNER_INIT ) - owner = lock->owner; +if (owner ==SPINLOCK_OWNER_INIT ) + owner =NULL ;printk (KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n" , msg,raw_smp_processor_id (), current->comm,task_pid_nr (current));printk (KERN_EMERG " lock: %pS, .magic: %08x, .owner: %s/%d, " ".owner_cpu: %d\n" , - lock, lock->magic, + lock,READ_ONCE (lock->magic), owner ? owner->comm :"<none>" , owner ?task_pid_nr (owner) :-1 , - lock->owner_cpu); +READ_ONCE (lock->owner_cpu));dump_stack (); }
@@ -80,16 +80,16 @@ static void spin_bug(raw_spinlock_t *lock, const char *msg)static inline void debug_spin_lock_before (raw_spinlock_t *lock) { -SPIN_BUG_ON (lock->magic !=SPINLOCK_MAGIC , lock,"bad magic" ); -SPIN_BUG_ON (lock->owner == current, lock,"recursion" ); -SPIN_BUG_ON (lock->owner_cpu ==raw_smp_processor_id (), +SPIN_BUG_ON (READ_ONCE (lock->magic) !=SPINLOCK_MAGIC , lock,"bad magic" ); +SPIN_BUG_ON (READ_ONCE (lock->owner) == current, lock,"recursion" ); +SPIN_BUG_ON (READ_ONCE (lock->owner_cpu) ==raw_smp_processor_id (), lock,"cpu recursion" ); }static inline void debug_spin_lock_after (raw_spinlock_t *lock) { - lock->owner_cpu =raw_smp_processor_id (); - lock->owner = current; +WRITE_ONCE (lock->owner_cpu,raw_smp_processor_id ()); +WRITE_ONCE (lock->owner, current); }static inline void debug_spin_unlock (raw_spinlock_t *lock)
@@ -99,8 +99,8 @@ static inline void debug_spin_unlock(raw_spinlock_t *lock)SPIN_BUG_ON (lock->owner != current, lock,"wrong owner" );SPIN_BUG_ON (lock->owner_cpu !=raw_smp_processor_id (), lock,"wrong CPU" ); - lock->owner =SPINLOCK_OWNER_INIT ; - lock->owner_cpu =-1 ; +WRITE_ONCE (lock->owner,SPINLOCK_OWNER_INIT ); +WRITE_ONCE (lock->owner_cpu,-1 ); }static void __spin_lock_debug (raw_spinlock_t *lock)
@@ -233,8 +233,8 @@ static inline void debug_write_lock_before(rwlock_t *lock)static inline void debug_write_lock_after (rwlock_t *lock) { - lock->owner_cpu =raw_smp_processor_id (); - lock->owner = current; +WRITE_ONCE (lock->owner_cpu,raw_smp_processor_id ()); +WRITE_ONCE (lock->owner, current); }static inline void debug_write_unlock (rwlock_t *lock)
@@ -243,8 +243,8 @@ static inline void debug_write_unlock(rwlock_t *lock)RWLOCK_BUG_ON (lock->owner != current, lock,"wrong owner" );RWLOCK_BUG_ON (lock->owner_cpu !=raw_smp_processor_id (), lock,"wrong CPU" ); - lock->owner =SPINLOCK_OWNER_INIT ; - lock->owner_cpu =-1 ; +WRITE_ONCE (lock->owner,SPINLOCK_OWNER_INIT ); +WRITE_ONCE (lock->owner_cpu,-1 ); }#if 0 /* This can cause lockups */
kernel/taskstats.c +19 -11
@@ -582,25 +582,33 @@ static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info)static struct taskstats *taskstats_tgid_alloc (struct task_struct *tsk) {struct signal_struct *sig = tsk->signal; -struct taskstats *stats; +struct taskstats *stats_new, *stats; -if (sig->stats ||thread_group_empty (tsk)) - goto ret; +/* Pairs with smp_store_release() below. */ + stats =smp_load_acquire (&sig->stats); +if (stats ||thread_group_empty (tsk)) +return stats;/* No problem if kmem_cache_zalloc() fails */ - stats =kmem_cache_zalloc (taskstats_cache,GFP_KERNEL ); + stats_new =kmem_cache_zalloc (taskstats_cache,GFP_KERNEL );spin_lock_irq (&tsk->sighand->siglock); -if (!sig->stats) { - sig->stats = stats; - stats =NULL ; + stats = sig->stats; +if (!stats) { +/* +* Pairs with smp_store_release() above and order the +* kmem_cache_zalloc(). +*/ +smp_store_release (&sig->stats, stats_new); + stats = stats_new; + stats_new =NULL ; }spin_unlock_irq (&tsk->sighand->siglock); -if (stats) -kmem_cache_free (taskstats_cache, stats); -ret: -return sig->stats; +if (stats_new) +kmem_cache_free (taskstats_cache, stats_new); + +return stats; }/* Send pid data out on exit */
kernel/trace/ftrace.c +3 -3
@@ -637,8 +637,7 @@ static int function_stat_show(struct seq_file *m, void *v) }#ifdef CONFIG_FUNCTION_GRAPH_TRACER - avg = rec->time; -do_div (avg, rec->counter); + avg =div64_ul (rec->time, rec->counter);if (tracing_thresh && (avg < tracing_thresh)) goto out;#endif
@@ -664,7 +663,8 @@ static int function_stat_show(struct seq_file *m, void *v)* Divide only 1000 for ns^2 -> us^2 conversion. * trace_print_graph_duration will divide 1000 again. */ -do_div (stddev, rec->counter * (rec->counter -1 ) *1000 ); + stddev =div64_ul (stddev, + rec->counter * (rec->counter -1 ) *1000 ); }trace_seq_init (&s);
net/8021q/vlan.h +1 -0
@@ -109,6 +109,7 @@ int vlan_check_real_dev(struct net_device *real_dev,void vlan_setup (struct net_device *dev);int register_vlan_dev (struct net_device *dev);void unregister_vlan_dev (struct net_device *dev,struct list_head *head); +void vlan_dev_uninit (struct net_device *dev);bool vlan_dev_inherit_address (struct net_device *dev,struct net_device *real_dev);
net/8021q/vlan_dev.c +2 -1
@@ -606,7 +606,8 @@ static int vlan_dev_init(struct net_device *dev)return 0 ; } -static void vlan_dev_uninit (struct net_device *dev) +/* Note: this function might be called multiple times for the same device. */ +void vlan_dev_uninit (struct net_device *dev) {struct vlan_priority_tci_mapping *pm;struct vlan_dev_priv *vlan =vlan_dev_priv (dev);
net/8021q/vlan_netlink.c +12 -7
@@ -92,11 +92,13 @@ static int vlan_changelink(struct net_device *dev,struct ifla_vlan_flags *flags;struct ifla_vlan_qos_mapping *m;struct nlattr *attr; -int rem; +int rem, err;if (data[IFLA_VLAN_FLAGS ]) { flags =nla_data (data[IFLA_VLAN_FLAGS ]); -vlan_dev_change_flags (dev, flags->flags, flags->mask); + err =vlan_dev_change_flags (dev, flags->flags, flags->mask); +if (err) +return err; }if (data[IFLA_VLAN_INGRESS_QOS ]) {nla_for_each_nested (attr, data[IFLA_VLAN_INGRESS_QOS ], rem) {
@@ -107,7 +109,9 @@ static int vlan_changelink(struct net_device *dev,if (data[IFLA_VLAN_EGRESS_QOS ]) {nla_for_each_nested (attr, data[IFLA_VLAN_EGRESS_QOS ], rem) { m =nla_data (attr); -vlan_dev_set_egress_priority (dev, m->from, m->to); + err =vlan_dev_set_egress_priority (dev, m->from, m->to); +if (err) +return err; } }return 0 ;
@@ -150,10 +154,11 @@ static int vlan_newlink(struct net *src_net, struct net_device *dev,return -EINVAL ; err =vlan_changelink (dev, tb, data); -if (err <0 ) -return err; - -return register_vlan_dev (dev); +if (!err) + err =register_vlan_dev (dev); +if (err) +vlan_dev_uninit (dev); +return err; }static inline size_t vlan_qos_map_size (unsigned int n)
net/bluetooth/l2cap_core.c +1 -3
@@ -4897,10 +4897,8 @@ void __l2cap_physical_cfm(struct l2cap_chan *chan, int result)BT_DBG ("chan %p, result %d, local_amp_id %d, remote_amp_id %d" , chan, result, local_amp_id, remote_amp_id); -if (chan->state ==BT_DISCONN || chan->state ==BT_CLOSED ) { -l2cap_chan_unlock (chan); +if (chan->state ==BT_DISCONN || chan->state ==BT_CLOSED )return ; - }if (chan->state !=BT_CONNECTED ) {l2cap_do_create (chan, result, local_amp_id, remote_amp_id);
net/core/neighbour.c +2 -2
@@ -1058,7 +1058,7 @@ static void neigh_update_hhs(struct neighbour *neigh)if (update) { hh = &neigh->hh; -if (hh->hh_len) { +if (READ_ONCE (hh->hh_len)) {write_seqlock_bh (&hh->hh_lock);update (hh, neigh->dev, neigh->ha);write_sequnlock_bh (&hh->hh_lock);
@@ -1323,7 +1323,7 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)struct net_device *dev = neigh->dev;unsigned int seq; -if (dev->header_ops->cache && !neigh->hh.hh_len) +if (dev->header_ops->cache && !READ_ONCE (neigh->hh.hh_len))neigh_hh_init (neigh); do {
net/ethernet/eth.c +6 -1
@@ -235,7 +235,12 @@ int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 eth->h_proto = type;memcpy (eth->h_source, dev->dev_addr,ETH_ALEN );memcpy (eth->h_dest, neigh->ha,ETH_ALEN ); - hh->hh_len =ETH_HLEN ; + +/* Pairs with READ_ONCE() in neigh_resolve_output(), +* neigh_hh_output() and neigh_update_hhs(). +*/ +smp_store_release (&hh->hh_len,ETH_HLEN ); +return 0 ; }EXPORT_SYMBOL (eth_header_cache);
net/ipv4/tcp_input.c +4 -1
@@ -1685,8 +1685,11 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb, }/* Ignore very old stuff early */ -if (!after (sp[used_sacks].end_seq, prior_snd_una)) +if (!after (sp[used_sacks].end_seq, prior_snd_una)) { +if (i ==0 ) + first_sack_index =-1 ;continue ; + } used_sacks++; }
net/llc/llc_station.c +2 -2
@@ -32,7 +32,7 @@ static int llc_stat_ev_rx_null_dsap_xid_c(struct sk_buff *skb)return LLC_PDU_IS_CMD (pdu) &&/* command PDU */ LLC_PDU_TYPE_IS_U (pdu) &&/* U type PDU */ LLC_U_PDU_CMD (pdu) ==LLC_1_PDU_CMD_XID && - !pdu->dsap ?0 :1 ;/* NULL DSAP value */ + !pdu->dsap;/* NULL DSAP value */ }static int llc_stat_ev_rx_null_dsap_test_c (struct sk_buff *skb)
@@ -42,7 +42,7 @@ static int llc_stat_ev_rx_null_dsap_test_c(struct sk_buff *skb)return LLC_PDU_IS_CMD (pdu) &&/* command PDU */ LLC_PDU_TYPE_IS_U (pdu) &&/* U type PDU */ LLC_U_PDU_CMD (pdu) ==LLC_1_PDU_CMD_TEST && - !pdu->dsap ?0 :1 ;/* NULL DSAP */ + !pdu->dsap;/* NULL DSAP */ }static int llc_station_ac_send_xid_r (struct sk_buff *skb)
net/netfilter/nf_conntrack_netlink.c +3 -0
@@ -3390,6 +3390,9 @@ static void __net_exit ctnetlink_net_exit_batch(struct list_head *net_exit_list)list_for_each_entry (net, net_exit_list, exit_list)ctnetlink_net_exit (net); + +/* wait for other cpus until they are done with ctnl_notifiers */ +synchronize_rcu (); }static struct pernet_operations ctnetlink_net_ops = {
net/rfkill/core.c +5 -2
@@ -941,10 +941,13 @@ static void rfkill_sync_work(struct work_struct *work)int __must_check rfkill_register (struct rfkill *rfkill) {static unsigned long rfkill_no; -struct device *dev = &rfkill->dev; +struct device *dev;int error; -BUG_ON (!rfkill); +if (!rfkill) +return -EINVAL ; + + dev = &rfkill->dev;mutex_lock (&rfkill_global_mutex);
net/sched/sch_fq.c +1 -1
@@ -706,7 +706,7 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt)if (tb[TCA_FQ_QUANTUM ]) {u32 quantum =nla_get_u32 (tb[TCA_FQ_QUANTUM ]); -if (quantum >0 ) +if (quantum >0 && quantum <= (1 <<20 )) q->quantum = quantum;else err = -EINVAL ;
net/sctp/sm_sideeffect.c +18 -10
@@ -1333,8 +1333,10 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,/* Generate an INIT ACK chunk. */ new_obj =sctp_make_init_ack (asoc, chunk,GFP_ATOMIC ,0 ); -if (!new_obj) - goto nomem; +if (!new_obj) { + error = -ENOMEM ; +break ; + }sctp_add_cmd_sf (commands,SCTP_CMD_REPLY ,SCTP_CHUNK (new_obj));
@@ -1356,7 +1358,8 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,if (!new_obj) {if (cmd->obj.chunk)sctp_chunk_free (cmd->obj.chunk); - goto nomem; + error = -ENOMEM ; +break ; }sctp_add_cmd_sf (commands,SCTP_CMD_REPLY ,SCTP_CHUNK (new_obj));
@@ -1403,8 +1406,10 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,/* Generate a SHUTDOWN chunk. */ new_obj =sctp_make_shutdown (asoc, chunk); -if (!new_obj) - goto nomem; +if (!new_obj) { + error = -ENOMEM ; +break ; + }sctp_add_cmd_sf (commands,SCTP_CMD_REPLY ,SCTP_CHUNK (new_obj));break ;
@@ -1733,11 +1738,17 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,break ; } -if (error) +if (error) { + cmd =sctp_next_cmd (commands); +while (cmd) { +if (cmd->verb ==SCTP_CMD_REPLY ) +sctp_chunk_free (cmd->obj.chunk); + cmd =sctp_next_cmd (commands); + }break ; + } } -out:/* If this is in response to a received chunk, wait until * we are done with the packet to open the queue so that we don't * send multiple packets in response to a single request.
@@ -1748,8 +1759,5 @@ out: }else if (local_cork) error =sctp_outq_uncork (&asoc->outqueue);return error; -nomem: - error = -ENOMEM ; - goto out; }
scripts/kconfig/expr.c +7 -0
@@ -201,6 +201,13 @@ static int expr_eq(struct expr *e1, struct expr *e2) {int res, old_count; +/* +* A NULL expr is taken to be yes, but there's also a different way to +* represent yes. expr_is_yes() checks for either representation. +*/ +if (!e1 || !e2) +return expr_is_yes (e1) &&expr_is_yes (e2); +if (e1->type != e2->type)return 0 ;switch (e1->type) {
sound/isa/cs423x/cs4236.c +2 -1
@@ -293,7 +293,8 @@ static int snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev) }else { mpu_port[dev] =pnp_port_start (pdev,0 );if (mpu_irq[dev] >=0 && -pnp_irq_valid (pdev,0 ) &&pnp_irq (pdev,0 ) >=0 ) { +pnp_irq_valid (pdev,0 ) && +pnp_irq (pdev,0 ) != (resource_size_t)-1 ) { mpu_irq[dev] =pnp_irq (pdev,0 ); }else { mpu_irq[dev] =-1 ;/* disable interrupt */
sound/pci/ice1712/ice1724.c +6 -3
@@ -663,6 +663,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,unsigned long flags;unsigned char mclk_change;unsigned int i, old_rate; +bool call_set_rate = false;if (rate > ice->hw_rates->list[ice->hw_rates->count -1 ])return -EINVAL ;
@@ -686,7 +687,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,* setting clock rate for internal clock mode */ old_rate = ice->get_rate (ice);if (force || (old_rate != rate)) - ice->set_rate (ice, rate); + call_set_rate = true;else if (rate == ice->cur_rate) {spin_unlock_irqrestore (&ice->reg_lock, flags);return 0 ;
@@ -694,12 +695,14 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate, } ice->cur_rate = rate; +spin_unlock_irqrestore (&ice->reg_lock, flags); + +if (call_set_rate) + ice->set_rate (ice, rate);/* setting master clock */ mclk_change = ice->set_mclk (ice, rate); -spin_unlock_irqrestore (&ice->reg_lock, flags); -if (mclk_change && ice->gpio.i2s_mclk_changed) ice->gpio.i2s_mclk_changed (ice);if (ice->gpio.set_pro_rate)
sound/soc/codecs/wm8962.c +2 -2
@@ -2792,7 +2792,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,if (target % Fref ==0 ) { fll_div->theta =0 ; - fll_div->lambda =0 ; + fll_div->lambda =1 ; }else { gcd_fll =gcd (target, fratio * Fref);
@@ -2862,7 +2862,7 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,return -EINVAL ; } -if (fll_div.theta || fll_div.lambda) +if (fll_div.theta) fll1 |=WM8962_FLL_FRAC ;/* Stop the FLL while we reconfigure */
tools/perf/builtin-report.c +0 -7
@@ -285,13 +285,6 @@ static int report__setup_sample_type(struct report *rep) PERF_SAMPLE_BRANCH_ANY)) rep->nonany_branch_mode = true; -#ifndef HAVE_LIBUNWIND_SUPPORT -if (dwarf_callchain_users) { -ui__warning ("Please install libunwind development packages " -"during the perf build.\n" ); - } -#endif -return 0 ; }