Linux 4.9.146
Greg KH
maintainerI'm announcing the release of the 4.9.146 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
------------
Makefile | 2 arch/arm/boot/dts/logicpd-som-lv.dtsi | 2 arch/arm/mach-omap1/board-ams-delta.c | 3 arch/arm/mach-omap2/prm44xx.c | 2 arch/s390/kernel/perf_cpum_cf.c | 2 arch/x86/kvm/lapic.c | 2 arch/x86/kvm/vmx.c | 8 - drivers/gpu/drm/ast/ast_mode.c | 36 ++++++- drivers/hwmon/ina2xx.c | 2 drivers/hwmon/w83795.c | 2 drivers/infiniband/hw/mlx5/qp.c | 19 ++- drivers/net/ethernet/cavium/thunder/nic_main.c | 3 drivers/net/ethernet/hisilicon/hip04_eth.c | 4 drivers/net/ethernet/intel/igb/e1000_i210.c | 1 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 drivers/net/ethernet/realtek/8139cp.c | 5 + drivers/net/phy/phy_device.c | 19 +-- drivers/net/tun.c | 6 - drivers/staging/speakup/kobjects.c | 4 drivers/usb/gadget/udc/omap_udc.c | 87 ++++++------------ drivers/xen/xlate_mmu.c | 1 fs/btrfs/send.c | 11 +- fs/cachefiles/rdwr.c | 9 + fs/exportfs/expfs.c | 2 fs/fscache/object.c | 3 fs/hfs/btree.c | 3 fs/hfsplus/btree.c | 3 fs/ocfs2/export.c | 2 fs/ocfs2/move_extents.c | 47 +++++---- fs/pstore/platform.c | 4 fs/sysv/inode.c | 2 include/net/neighbour.h | 28 ++++- kernel/trace/bpf_trace.c | 8 + lib/debugobjects.c | 3 net/core/rtnetlink.c | 3 net/ipv4/tcp_output.c | 12 +- net/ipv6/ip6_output.c | 42 ++++---- net/netfilter/ipvs/ip_vs_ctl.c | 3 net/sched/sch_netem.c | 3 sound/soc/omap/omap-abe-twl6040.c | 67 ++++++------- sound/soc/omap/omap-dmic.c | 9 + sound/soc/omap/omap-mcpdm.c | 43 ++++++++ sound/soc/soc-core.c | 1 tools/objtool/elf.c | 19 +++ tools/testing/selftests/Makefile | 1 tools/testing/selftests/netfilter/Makefile | 6 + tools/testing/selftests/netfilter/config | 2 tools/testing/selftests/netfilter/nft_trans_stress.sh | 78 ++++++++++++++++ 49 files changed, 417 insertions(+), 215 deletions(-)
Aaro Koskinen (4):
USB: omap_udc: use devm_request_irq()
USB: omap_udc: fix crashes on probe error and module removal
USB: omap_udc: fix omap_udc_start() on 15xx machines
USB: omap_udc: fix USB gadget functionality on Palm Tungsten E
Adam Ford (1):
ARM: dts: logicpd-somlv: Fix interrupt on mmc3_dat1
Artem Savkov (2):
objtool: Fix double-free in .cold detection error path
objtool: Fix segfault in .cold detection with -ffunction-sections
Christoph Paasch (1):
net: Prevent invalid access to skb->prev in __qdisc_drop_all
Colin Ian King (1):
fscache, cachefiles: remove redundant variable 'cache'
Eric Dumazet (1):
rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices
Florian Westphal (1):
selftests: add script to stress-test nft packet path vs. control plane
Greg Kroah-Hartman (1):
Linux 4.9.146
Guenter Roeck (1):
staging: speakup: Replace strncpy with memcpy
Heiner Kallweit (1):
net: phy: don't allow __set_phy_supported to add unsupported modes
Huacai Chen (1):
hwmon: (w83795) temp4_type has writable permission
Janusz Krzysztofik (1):
ARM: OMAP1: ams-delta: Fix possible use of uninitialized field
Josh Elsasser (1):
ixgbe: recognize 1000BaseLX SFP modules as 1Gbps
Kiran Kumar Modukuri (1):
cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan is active
Larry Chen (1):
ocfs2: fix deadlock caused by ocfs2_defrag_extent()
Lorenzo Bianconi (1):
net: thunderx: fix NULL pointer dereference in nic_remove
Majd Dibbiny (1):
RDMA/mlx5: Fix fence type for IB_WR_LOCAL_INV WR
Martynas Pumputis (1):
bpf: fix check of allowed specifiers in bpf_trace_printk
Namhyung Kim (1):
pstore: Convert console write to use ->write_buf
Nathan Chancellor (1):
ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup
NeilBrown (1):
fscache: fix race between enablement and dropping of object
Nicolas Dichtel (1):
tun: forbid iface creation with rtnl ops
Nicolin Chen (1):
hwmon: (ina2xx) Fix current value calculation
Pan Bian (5):
exportfs: do not read dentry after free
net: hisilicon: remove unexpected free_netdev
hfs: do not free node before using
hfsplus: do not free node before using
ocfs2: fix potential use after free
Peter Ujfalusi (3):
ASoC: omap-abe-twl6040: Fix missing audio card caused by deferred probing
ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE
ASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE
Qian Cai (1):
debugobjects: avoid recursive calls with kmemleak
Robbie Ko (1):
Btrfs: send, fix infinite loop due to directory rename dependencies
Srikanth Boddepalli (1):
xen: xlate_mmu: add missing header to fix 'W=1' warning
Stefano Brivio (2):
ipv6: Check available headroom in ip6_xmit() even without options
neighbour: Avoid writing before skb->head in neigh_hh_output()
Su Yanjun (1):
net: 8139cp: fix a BUG triggered by changing mtu with network traffic
Tarick Bedeir (1):
net/mlx4_core: Correctly set PFC param if global pause is turned off.
Thomas Richter (1):
s390/cpum_cf: Reject request for sampling in event initialization
Tzung-Bi Shih (1):
ASoC: dapm: Recalculate audio map forcely when card instantiated
Xin Long (1):
ipvs: call ip_vs_dst_notifier earlier than ipv6_dev_notf
Y.C. Chen (1):
drm/ast: fixed reading monitor EDID not stable issue
Yi Wang (2):
KVM: x86: fix empty-body warnings x86/kvm/vmx: fix old-style function declaration
Yuchung Cheng (1):
tcp: fix NULL ref in tail loss probe
YueHaibing (1):
sysv: return 'err' instead of 0 in __sysv_write_inode
Yunjian Wang (1):
igb: fix uninitialized variables
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 145 +SUBLEVEL = 146 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/dts/logicpd-som-lv.dtsi +1 -1
@@ -122,7 +122,7 @@ }; &mmc3 { - interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>; + interrupts-extended = <&intc 94 &omap3_pmx_core 0x136>; pinctrl-0 = <&mmc3_pins &wl127x_gpio>; pinctrl-names = "default"; vmmc-supply = <&wl12xx_vmmc>;
arch/arm/mach-omap1/board-ams-delta.c +3 -0
@@ -511,6 +511,9 @@ static void modem_pm(struct uart_port *port, unsigned int state, unsigned old) {struct modem_private_data *priv = port->private_data; +if (!priv) +return ; +if (IS_ERR (priv->regulator))return ;
arch/arm/mach-omap2/prm44xx.c +1 -1
@@ -344,7 +344,7 @@ static void omap44xx_prm_reconfigure_io_chain(void)* to occur, WAKEUPENABLE bits must be set in the pad mux registers, and * omap44xx_prm_reconfigure_io_chain() must be called. No return value. */ -static void __init omap44xx_prm_enable_io_wakeup (void ) +static void omap44xx_prm_enable_io_wakeup (void ) {s32 inst =omap4_prmst_get_prm_dev_inst ();
arch/s390/kernel/perf_cpum_cf.c +2 -0
@@ -344,6 +344,8 @@ static int __hw_perf_event_init(struct perf_event *event)break ;case PERF_TYPE_HARDWARE : +if (is_sampling_event (event))/* No sampling support */ +return -ENOENT ; ev = attr->config;/* Count user space (problem-state) only */ if (!attr->exclude_user && attr->exclude_kernel) {
arch/x86/kvm/lapic.c +1 -1
@@ -57,7 +57,7 @@#define APIC_BUS_CYCLE_NS 1/* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */ -#define apic_debug(fmt, arg...) +#define apic_debug(fmt, arg...) do {} while (0)/* 14 is the version for Xeon and Pentium 8.4.8*/ #define APIC_VERSION (0x14UL | ((KVM_APIC_LVT_NUM - 1) << 16))
arch/x86/kvm/vmx.c +4 -4
@@ -1077,7 +1077,7 @@ static void copy_vmcs12_to_shadow(struct vcpu_vmx *vmx);static void copy_shadow_to_vmcs12 (struct vcpu_vmx *vmx);static int alloc_identity_pagetable (struct kvm *kvm);static void vmx_update_msr_bitmap (struct kvm_vcpu *vcpu); -static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bitmap, +static __always_inline void vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,u32 msr,int type); static DEFINE_PER_CPU(struct vmcs *, vmxarea);
@@ -4872,7 +4872,7 @@ static void free_vpid(int vpid)spin_unlock (&vmx_vpid_lock); } -static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bitmap, +static __always_inline void vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,u32 msr,int type) {int f =sizeof (unsigned long );
@@ -4907,7 +4907,7 @@ static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bit } } -static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitmap, +static __always_inline void vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,u32 msr,int type) {int f =sizeof (unsigned long );
@@ -4942,7 +4942,7 @@ static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitm } } -static void __always_inline vmx_set_intercept_for_msr(unsigned long *msr_bitmap, +static __always_inline void vmx_set_intercept_for_msr(unsigned long *msr_bitmap,u32 msr,int type,bool value) {if (value)
drivers/gpu/drm/ast/ast_mode.c +30 -6
@@ -954,9 +954,21 @@ static int get_clock(void *i2c_priv) {struct ast_i2c_chan *i2c = i2c_priv;struct ast_private *ast = i2c->dev->dev_private; -uint32_t val; +uint32_t val, val2, count, pass; + + count =0 ; + pass =0 ; + val = (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x10 ) >>4 ) &0x01 ; +do { + val2 = (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x10 ) >>4 ) &0x01 ; +if (val == val2) { + pass++; + }else { + pass =0 ; + val = (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x10 ) >>4 ) &0x01 ; + } + }while ((pass <5 ) && (count++ <0x10000 )); - val =ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x10 ) >>4 ;return val &1 ?1 :0 ; }
@@ -964,9 +976,21 @@ static int get_data(void *i2c_priv) {struct ast_i2c_chan *i2c = i2c_priv;struct ast_private *ast = i2c->dev->dev_private; -uint32_t val; +uint32_t val, val2, count, pass; + + count =0 ; + pass =0 ; + val = (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x20 ) >>5 ) &0x01 ; +do { + val2 = (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x20 ) >>5 ) &0x01 ; +if (val == val2) { + pass++; + }else { + pass =0 ; + val = (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x20 ) >>5 ) &0x01 ; + } + }while ((pass <5 ) && (count++ <0x10000 )); - val =ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x20 ) >>5 ;return val &1 ?1 :0 ; }
@@ -979,7 +1003,7 @@ static void set_clock(void *i2c_priv, int clock)for (i =0 ; i <0x10000 ; i++) { ujcrb7 = ((clock &0x01 ) ?0 :1 ); -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0xfe , ujcrb7); +ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0xf4 , ujcrb7); jtemp =ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x01 );if (ujcrb7 == jtemp)break ;
@@ -995,7 +1019,7 @@ static void set_data(void *i2c_priv, int data)for (i =0 ; i <0x10000 ; i++) { ujcrb7 = ((data &0x01 ) ?0 :1 ) <<2 ; -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0xfb , ujcrb7); +ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0xf1 , ujcrb7); jtemp =ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xb7 ,0x04 );if (ujcrb7 == jtemp)break ;
drivers/hwmon/ina2xx.c +1 -1
@@ -273,7 +273,7 @@ static int ina2xx_get_value(struct ina2xx_data *data, u8 reg,break ;case INA2XX_CURRENT :/* signed register, result in mA */ - val = regval * data->current_lsb_uA; + val = (s16 )regval * data->current_lsb_uA; val =DIV_ROUND_CLOSEST (val,1000 );break ;case INA2XX_CALIBRATION :
drivers/hwmon/w83795.c +1 -1
@@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,* somewhere else in the code */ #define SENSOR_ATTR_TEMP (index) { \ - SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \ + SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \ show_temp_mode, store_temp_mode, NOT_USED, index - 1), \ SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \ NULL, TEMP_READ, index - 1), \
drivers/infiniband/hw/mlx5/qp.c +10 -9
@@ -3888,17 +3888,18 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, goto out; } -if (wr->opcode ==IB_WR_LOCAL_INV || - wr->opcode ==IB_WR_REG_MR ) { +if (wr->opcode ==IB_WR_REG_MR ) { fence = dev->umr_fence; next_fence =MLX5_FENCE_MODE_INITIATOR_SMALL ; - }else if (wr->send_flags &IB_SEND_FENCE ) { -if (qp->next_fence) - fence =MLX5_FENCE_MODE_SMALL_AND_FENCE ; -else - fence =MLX5_FENCE_MODE_FENCE ; - }else { - fence = qp->next_fence; + }else { +if (wr->send_flags &IB_SEND_FENCE ) { +if (qp->next_fence) + fence =MLX5_FENCE_MODE_SMALL_AND_FENCE ; +else + fence =MLX5_FENCE_MODE_FENCE ; + }else { + fence = qp->next_fence; + } }switch (ibqp->qp_type) {
drivers/net/ethernet/cavium/thunder/nic_main.c +3 -0
@@ -1371,6 +1371,9 @@ static void nic_remove(struct pci_dev *pdev) {struct nicpf *nic =pci_get_drvdata (pdev); +if (!nic) +return ; +if (nic->flags &NIC_SRIOV_ENABLED )pci_disable_sriov (pdev);
drivers/net/ethernet/hisilicon/hip04_eth.c +1 -3
@@ -922,10 +922,8 @@ static int hip04_mac_probe(struct platform_device *pdev) } ret =register_netdev (ndev); -if (ret) { -free_netdev (ndev); +if (ret) goto alloc_fail; - }return 0 ;
drivers/net/ethernet/intel/igb/e1000_i210.c +1 -0
@@ -862,6 +862,7 @@ s32 igb_pll_workaround_i210(struct e1000_hw *hw) nvm_word =E1000_INVM_DEFAULT_AL ; tmp_nvm = nvm_word |E1000_INVM_PLL_WO_VAL ;igb_write_phy_reg_82580 (hw,I347AT4_PAGE_SELECT ,E1000_PHY_PLL_FREQ_PAGE ); + phy_word =E1000_PHY_PLL_UNCONF ;for (i =0 ; i <E1000_MAX_PLL_TRIES ; i++) {/* check current state directly from internal PHY */ igb_read_phy_reg_82580 (hw,E1000_PHY_PLL_FREQ_REG , &phy_word);
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +3 -1
@@ -1702,7 +1702,9 @@ static s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, *autoneg = false;if (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || - hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1) { + hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 || + hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1) { *speed =IXGBE_LINK_SPEED_1GB_FULL ;return 0 ; }
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +2 -2
@@ -1027,8 +1027,8 @@ static int mlx4_en_set_pauseparam(struct net_device *dev, tx_pause = !!(pause->tx_pause); rx_pause = !!(pause->rx_pause); - rx_ppp = priv->prof->rx_ppp && !(tx_pause || rx_pause); - tx_ppp = priv->prof->tx_ppp && !(tx_pause || rx_pause); + rx_ppp = (tx_pause || rx_pause) ?0 : priv->prof->rx_ppp; + tx_ppp = (tx_pause || rx_pause) ?0 : priv->prof->tx_ppp; err = mlx4_SET_PORT_general(mdev->dev, priv->port, priv->rx_skb_size + ETH_FCS_LEN,
drivers/net/ethernet/realtek/8139cp.c +5 -0
@@ -578,6 +578,7 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)struct cp_private *cp;int handled =0 ;u16 status; +u16 mask;if (unlikely (dev ==NULL ))return IRQ_NONE ;
@@ -585,6 +586,10 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)spin_lock (&cp->lock); + mask =cpr16 (IntrMask); +if (!mask) + goto out_unlock; + status =cpr16 (IntrStatus);if (!status || (status ==0xFFFF )) goto out_unlock;
drivers/net/phy/phy_device.c +8 -11
@@ -1579,20 +1579,17 @@ static int gen10g_resume(struct phy_device *phydev)static int __set_phy_supported (struct phy_device *phydev,u32 max_speed) { - phydev->supported &= ~(PHY_1000BT_FEATURES |PHY_100BT_FEATURES | -PHY_10BT_FEATURES ); -switch (max_speed) { -default : -return -ENOTSUPP ; -case SPEED_1000 : - phydev->supported |=PHY_1000BT_FEATURES ; +case SPEED_10 : + phydev->supported &= ~PHY_100BT_FEATURES ;/* fall through */ case SPEED_100 : - phydev->supported |=PHY_100BT_FEATURES ; -/* fall through */ -case SPEED_10 : - phydev->supported |=PHY_10BT_FEATURES ; + phydev->supported &= ~PHY_1000BT_FEATURES ; +break ; +case SPEED_1000 : +break ; +default : +return -ENOTSUPP ; }return 0 ;
drivers/net/tun.c +3 -3
@@ -1570,9 +1570,9 @@ static void tun_setup(struct net_device *dev)*/ static int tun_validate (struct nlattr *tb[],struct nlattr *data[]) { -if (!data) -return 0 ; -return -EINVAL ; +/* NL_SET_ERR_MSG(extack, +"tun/tap creation via rtnetlink is not supported."); */ +return -EOPNOTSUPP ; }static struct rtnl_link_ops tun_link_ops__read_mostly = {
drivers/staging/speakup/kobjects.c +2 -2
@@ -387,7 +387,7 @@ static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr, len =strlen (buf);if (len <2 || len >9 )return -EINVAL ; -strncpy (new_synth_name, buf, len); +memcpy (new_synth_name, buf, len);if (new_synth_name[len -1 ] =='\n' ) len--; new_synth_name[len] ='\0' ;
@@ -517,7 +517,7 @@ static ssize_t punc_store(struct kobject *kobj, struct kobj_attribute *attr,return -EINVAL ; } -strncpy (punc_buf, buf, x); +memcpy (punc_buf, buf, x);while (x && punc_buf[x -1 ] =='\n' ) x--;
drivers/usb/gadget/udc/omap_udc.c +30 -57
151 lines not on this page · raw message
drivers/xen/xlate_mmu.c +1 -0
@@ -36,6 +36,7 @@#include <asm/xen/hypervisor.h> #include <xen/xen.h> +#include <xen/xen-ops.h> #include <xen/page.h> #include <xen/interface/xen.h> #include <xen/interface/memory.h>
fs/btrfs/send.c +8 -3
@@ -3349,7 +3349,8 @@ static void free_pending_move(struct send_ctx *sctx, struct pending_dir_move *m)kfree (m); } -static void tail_append_pending_moves (struct pending_dir_move *moves, +static void tail_append_pending_moves (struct send_ctx *sctx, +struct pending_dir_move *moves,struct list_head *stack) {if (list_empty (&moves->list)) {
@@ -3360,6 +3361,10 @@ static void tail_append_pending_moves(struct pending_dir_move *moves,list_add_tail (&moves->list, stack);list_splice_tail (&list, stack); } +if (!RB_EMPTY_NODE (&moves->node)) { +rb_erase (&moves->node, &sctx->pending_dir_moves); +RB_CLEAR_NODE (&moves->node); + } }static int apply_children_dir_moves (struct send_ctx *sctx)
@@ -3374,7 +3379,7 @@ static int apply_children_dir_moves(struct send_ctx *sctx)return 0 ;INIT_LIST_HEAD (&stack); -tail_append_pending_moves (pm, &stack); +tail_append_pending_moves (sctx, pm, &stack);while (!list_empty (&stack)) { pm = list_first_entry(&stack, struct pending_dir_move, list);
@@ -3385,7 +3390,7 @@ static int apply_children_dir_moves(struct send_ctx *sctx) goto out; pm =get_pending_dir_moves (sctx, parent_ino);if (pm) -tail_append_pending_moves (pm, &stack); +tail_append_pending_moves (sctx, pm, &stack); }return 0 ;
fs/cachefiles/rdwr.c +6 -3
@@ -537,7 +537,10 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, netpage->index, cachefiles_gfp);if (ret <0 ) {if (ret == -EEXIST ) { +put_page (backpage); + backpage =NULL ;put_page (netpage); + netpage =NULL ;fscache_retrieval_complete (op,1 );continue ; }
@@ -610,7 +613,10 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, netpage->index, cachefiles_gfp);if (ret <0 ) {if (ret == -EEXIST ) { +put_page (backpage); + backpage =NULL ;put_page (netpage); + netpage =NULL ;fscache_retrieval_complete (op,1 );continue ; }
@@ -963,11 +969,8 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)void cachefiles_uncache_page (struct fscache_object *_object,struct page *page) {struct cachefiles_object *object; -struct cachefiles_cache *cache; object = container_of(_object, struct cachefiles_object, fscache); - cache =container_of (object->fscache.cache, - struct cachefiles_cache, cache);_enter ("%p,{%lu}" , object, page->index);
fs/exportfs/expfs.c +1 -1
@@ -76,7 +76,7 @@ static bool dentry_connected(struct dentry *dentry)struct dentry *parent =dget_parent (dentry);dput (dentry); -if (IS_ROOT (dentry)) { +if (dentry == parent) {dput (parent);return false; }
fs/fscache/object.c +3 -0
@@ -715,6 +715,9 @@ static const struct fscache_state *fscache_drop_object(struct fscache_object *obif (awaken)wake_up_bit (&cookie->flags,FSCACHE_COOKIE_INVALIDATING ); +if (test_and_clear_bit (FSCACHE_COOKIE_LOOKING_UP , &cookie->flags)) +wake_up_bit (&cookie->flags,FSCACHE_COOKIE_LOOKING_UP ); +/* Prevent a race with our last child, which has to signal EV_CLEARED * before dropping our spinlock.
fs/hfs/btree.c +2 -1
@@ -328,13 +328,14 @@ void hfs_bmap_free(struct hfs_bnode *node) nidx -= len *8 ; i = node->next; -hfs_bnode_put (node);if (!i) {/* panic */ ;pr_crit ("unable to free bnode %u. bmap not found!\n" , node->this); +hfs_bnode_put (node);return ; } +hfs_bnode_put (node); node =hfs_bnode_find (tree, i);if (IS_ERR (node))return ;
fs/hfsplus/btree.c +2 -1
@@ -453,14 +453,15 @@ void hfs_bmap_free(struct hfs_bnode *node) nidx -= len *8 ; i = node->next; -hfs_bnode_put (node);if (!i) {/* panic */ ;pr_crit ("unable to free bnode %u. " "bmap not found!\n" , node->this); +hfs_bnode_put (node);return ; } +hfs_bnode_put (node); node =hfs_bnode_find (tree, i);if (IS_ERR (node))return ;
fs/ocfs2/export.c +1 -1
@@ -125,10 +125,10 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb, check_gen:if (handle->ih_generation != inode->i_generation) { -iput (inode);trace_ocfs2_get_dentry_generation ((unsigned long long )blkno, handle->ih_generation, inode->i_generation); +iput (inode); result =ERR_PTR (-ESTALE ); goto bail; }
fs/ocfs2/move_extents.c +26 -21
82 lines not on this page · raw message
fs/pstore/platform.c +2 -2
@@ -584,8 +584,8 @@ static void pstore_console_write(struct console *con, const char *s, unsigned c) }else {spin_lock_irqsave (&psinfo->buf_lock, flags); } -memcpy (psinfo->buf, s, c); - psinfo->write (PSTORE_TYPE_CONSOLE ,0 , &id,0 ,0 ,0 , c, psinfo); + psinfo->write_buf (PSTORE_TYPE_CONSOLE ,0 , &id,0 , + s,0 , c, psinfo);spin_unlock_irqrestore (&psinfo->buf_lock, flags); s += c; c = e - s;
fs/sysv/inode.c +1 -1
@@ -275,7 +275,7 @@ static int __sysv_write_inode(struct inode *inode, int wait) } }brelse (bh); -return 0 ; +return err; }int sysv_write_inode (struct inode *inode,struct writeback_control *wbc)
include/net/neighbour.h +23 -5
@@ -448,6 +448,7 @@ static inline int neigh_hh_bridge(struct hh_cache *hh, struct sk_buff *skb)static inline int neigh_hh_output (const struct hh_cache *hh,struct sk_buff *skb) { +unsigned int hh_alen =0 ;unsigned int seq;int hh_len;
@@ -455,16 +456,33 @@ static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb seq =read_seqbegin (&hh->hh_lock); hh_len = hh->hh_len;if (likely (hh_len <=HH_DATA_MOD )) { -/* this is inlined by gcc */ -memcpy (skb->data -HH_DATA_MOD , hh->hh_data,HH_DATA_MOD ); + hh_alen =HH_DATA_MOD ; + +/* skb_push() would proceed silently if we have room for +* the unaligned size but not for the aligned size: +* check headroom explicitly. +*/ +if (likely (skb_headroom (skb) >=HH_DATA_MOD )) { +/* this is inlined by gcc */ +memcpy (skb->data -HH_DATA_MOD , hh->hh_data, +HH_DATA_MOD ); + } }else { -int hh_alen =HH_DATA_ALIGN (hh_len); + hh_alen =HH_DATA_ALIGN (hh_len); -memcpy (skb->data - hh_alen, hh->hh_data, hh_alen); +if (likely (skb_headroom (skb) >= hh_alen)) { +memcpy (skb->data - hh_alen, hh->hh_data, + hh_alen); + } } }while (read_seqretry (&hh->hh_lock, seq)); -skb_push (skb, hh_len); +if (WARN_ON_ONCE (skb_headroom (skb) < hh_alen)) { +kfree_skb (skb); +return NET_XMIT_DROP ; + } + +__skb_push (skb, hh_len);return dev_queue_xmit (skb); }
kernel/trace/bpf_trace.c +5 -3
@@ -161,11 +161,13 @@ BPF_CALL_5(bpf_trace_printk, char *, fmt, u32, fmt_size, u64, arg1, i++; }else if (fmt[i] =='p' || fmt[i] =='s' ) { mod[fmt_cnt]++; - i++; -if (!isspace (fmt[i]) && !ispunct (fmt[i]) && fmt[i] !=0 ) +/* disallow any further format extensions */ +if (fmt[i +1 ] !=0 && + !isspace (fmt[i +1 ]) && + !ispunct (fmt[i +1 ]))return -EINVAL ; fmt_cnt++; -if (fmt[i -1 ] =='s' ) { +if (fmt[i] =='s' ) {if (str_seen)/* allow only one '%s' per fmt string */ return -EINVAL ;
lib/debugobjects.c +2 -1
@@ -1110,7 +1110,8 @@ void __init debug_objects_mem_init(void) obj_cache =kmem_cache_create ("debug_objects_cache" ,sizeof (struct debug_obj ),0 , -SLAB_DEBUG_OBJECTS ,NULL ); +SLAB_DEBUG_OBJECTS |SLAB_NOLEAKTRACE , +NULL );if (!obj_cache ||debug_objects_replace_static_objects ()) { debug_objects_enabled =0 ;
net/core/rtnetlink.c +3 -0
@@ -3186,6 +3186,9 @@ int ndo_dflt_fdb_dump(struct sk_buff *skb, {int err; +if (dev->type !=ARPHRD_ETHER ) +return -EINVAL ; +netif_addr_lock_bh (dev); err =nlmsg_populate_fdb (skb, cb, dev, idx, &dev->uc);if (err)
net/ipv4/tcp_output.c +8 -4
@@ -2346,14 +2346,18 @@ void tcp_send_loss_probe(struct sock *sk) skb =tcp_write_queue_tail (sk); } +if (unlikely (!skb)) { +WARN_ONCE (tp->packets_out, +"invalid inflight: %u state %u cwnd %u mss %d\n" , + tp->packets_out, sk->sk_state, tp->snd_cwnd, mss); +inet_csk (sk)->icsk_pending =0 ; +return ; + } +/* At most one outstanding TLP retransmission. */ if (tp->tlp_high_seq) goto rearm_timer; -/* Retransmit last segment. */ -if (WARN_ON (!skb)) - goto rearm_timer; -if (skb_still_in_host_queue (sk, skb)) goto rearm_timer;
net/ipv6/ip6_output.c +21 -21
58 lines not on this page · raw message
net/netfilter/ipvs/ip_vs_ctl.c +3 -0
@@ -4013,6 +4013,9 @@ static void __net_exit ip_vs_control_net_cleanup_sysctl(struct netns_ipvs *ipvs)static struct notifier_block ip_vs_dst_notifier = { .notifier_call = ip_vs_dst_event, +#ifdef CONFIG_IP_VS_IPV6 + .priority =ADDRCONF_NOTIFY_PRIORITY +5 , +#endif };int __net_init ip_vs_control_net_init (struct netns_ipvs *ipvs)
net/sched/sch_netem.c +3 -0
@@ -442,6 +442,9 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,int count =1 ;int rc =NET_XMIT_SUCCESS ; +/* Do not fool qdisc_drop_all() */ + skb->prev =NULL ; +/* Random duplication */ if (q->duplicate && q->duplicate >=get_crandom (&q->dup_cor)) ++count;
sound/soc/omap/omap-abe-twl6040.c +29 -38
108 lines not on this page · raw message
sound/soc/omap/omap-dmic.c +9 -0
@@ -48,6 +48,8 @@ struct omap_dmic {struct device *dev;void __iomem *io_base;struct clk *fclk; +struct pm_qos_request pm_qos_req; +int latency;int fclk_freq;int out_freq;int clk_div;
@@ -124,6 +126,8 @@ static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream,mutex_lock (&dmic->mutex); +pm_qos_remove_request (&dmic->pm_qos_req); +if (!dai->active) dmic->active =0 ;
@@ -226,6 +230,8 @@ static int omap_dmic_dai_hw_params(struct snd_pcm_substream *substream,/* packet size is threshold * channels */ dma_data =snd_soc_dai_get_dma_data (dai, substream); dma_data->maxburst = dmic->threshold * channels; + dmic->latency = (OMAP_DMIC_THRES_MAX - dmic->threshold) *USEC_PER_SEC / +params_rate (params);return 0 ; }
@@ -236,6 +242,9 @@ static int omap_dmic_dai_prepare(struct snd_pcm_substream *substream,struct omap_dmic *dmic =snd_soc_dai_get_drvdata (dai);u32 ctrl; +if (pm_qos_request_active (&dmic->pm_qos_req)) +pm_qos_update_request (&dmic->pm_qos_req, dmic->latency); +/* Configure uplink threshold */ omap_dmic_write (dmic,OMAP_DMIC_FIFO_CTRL_REG , dmic->threshold);
sound/soc/omap/omap-mcpdm.c +42 -1
93 lines not on this page · raw message
sound/soc/soc-core.c +1 -0
@@ -2018,6 +2018,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) } card->instantiated =1 ; +dapm_mark_endpoints_dirty (card);snd_soc_dapm_sync (&card->dapm);mutex_unlock (&card->mutex);mutex_unlock (&client_mutex);
tools/objtool/elf.c +15 -4
@@ -31,6 +31,8 @@#include "elf.h" #include "warn.h" +#define MAX_NAME_LEN 128 +struct section *find_section_by_name (struct elf *elf,const char *name) {struct section *sec;
@@ -298,6 +300,8 @@ static int read_symbols(struct elf *elf)/* Create parent/child links for any cold subfunctions */ list_for_each_entry (sec, &elf->sections, list) {list_for_each_entry (sym, &sec->symbol_list, list) { +char pname[MAX_NAME_LEN +1 ]; +size_t pnamelen;if (sym->type !=STT_FUNC )continue ; sym->pfunc = sym->cfunc = sym;
@@ -305,14 +309,21 @@ static int read_symbols(struct elf *elf)if (!coldstr)continue ; - coldstr[0 ] ='\0' ; - pfunc =find_symbol_by_name (elf, sym->name); - coldstr[0 ] ='.' ; + pnamelen = coldstr - sym->name; +if (pnamelen >MAX_NAME_LEN ) { +WARN ("%s(): parent function name exceeds maximum length of %d characters" , + sym->name,MAX_NAME_LEN ); +return -1 ; + } + +strncpy (pname, sym->name, pnamelen); + pname[pnamelen] ='\0' ; + pfunc =find_symbol_by_name (elf, pname);if (!pfunc) {WARN ("%s(): can't find parent function" , sym->name); - goto err; +return -1 ; } sym->pfunc = pfunc;
tools/testing/selftests/Makefile +1 -0
@@ -15,6 +15,7 @@ TARGETS += memory-hotplug TARGETS += mount TARGETS += mqueue TARGETS += net +TARGETS += netfilter TARGETS += nsfs TARGETS += powerpc TARGETS += pstore
tools/testing/selftests/netfilter/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 +# Makefile for netfilter selftests + +TEST_PROGS := nft_trans_stress.sh + +include ../lib.mk
tools/testing/selftests/netfilter/config new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_NET_NS=y +NF_TABLES_INET=y
tools/testing/selftests/netfilter/nft_trans_stress.sh new file +78 -0
78 lines not on this page · raw message