Linux 4.14.324
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.324 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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/mips/include/asm/dec/prom.h | 2 arch/x86/kernel/fpu/xstate.c | 8 + drivers/android/binder.c | 1 drivers/android/binder_alloc.c | 6 + drivers/android/binder_alloc.h | 1 drivers/dma-buf/sw_sync.c | 18 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 drivers/gpu/drm/radeon/radeon_cs.c | 3 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 2 drivers/media/platform/mtk-vpu/mtk_vpu.c | 6 - drivers/mmc/host/wbsd.c | 2 drivers/net/ethernet/ibm/ibmveth.c | 2 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 16 +-- drivers/net/ethernet/intel/igb/igb_ptp.c | 24 ++-- drivers/net/phy/broadcom.c | 13 ++ drivers/net/team/team.c | 4 drivers/pcmcia/rsrc_nonstatic.c | 2 drivers/scsi/raid_class.c | 48 --------- drivers/scsi/snic/snic_disc.c | 3 drivers/tty/serial/8250/8250_port.c | 1 drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 4 fs/cifs/file.c | 2 fs/gfs2/super.c | 26 ++-- fs/jfs/jfs_dmap.c | 3 fs/jfs/jfs_txnmgr.c | 5 fs/jfs/namei.c | 5 fs/quota/dquot.c | 5 fs/udf/unicode.c | 2 include/linux/raid_class.h | 4 include/linux/virtio_net.h | 4 include/media/v4l2-mem2mem.h | 18 +++ include/net/sock.h | 11 +- kernel/trace/trace.c | 9 + kernel/trace/trace_irqsoff.c | 3 kernel/trace/trace_sched_wakeup.c | 2 lib/clz_ctz.c | 32 +----- lib/mpi/longlong.h | 36 ------ lib/test_firmware.c | 37 +++++- net/batman-adv/bat_v_elp.c | 3 net/batman-adv/bat_v_ogm.c | 7 - net/batman-adv/hard-interface.c | 2 net/batman-adv/translation-table.c | 1 net/bluetooth/l2cap_core.c | 5 net/core/rtnetlink.c | 5 net/core/sock.c | 2 net/ipv4/ip_vti.c | 4 net/ipv4/tcp_timer.c | 4 net/ipv6/ip6_vti.c | 4 net/key/af_key.c | 4 net/netfilter/ipvs/ip_vs_ctl.c | 74 +++++++------ net/netfilter/nf_conntrack_proto_sctp.c | 6 - net/netfilter/nft_dynset.c | 3 net/sctp/socket.c | 2 net/unix/af_unix.c | 9 - net/xfrm/xfrm_user.c | 13 ++ sound/pci/emu10k1/emufx.c | 112 +-------------------- sound/soc/codecs/rt5665.c | 2 sound/usb/quirks-table.h | 29 +++++ 59 files changed, 320 insertions(+), 346 deletions(-)
Abel Wu (1):
sock: Fix misuse of sk_under_memory_pressure()
Alessio Igor Bogani (1):
igb: Avoid starting unnecessary workqueues
Andrii Staikov (1):
i40e: fix misleading debug logs
Armin Wolf (1):
pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
Eric Dumazet (2):
net: do not allow gso_size to be set to GSO_BY_FRAGS
sock: annotate data-races around prot->memory_pressure
Feng Tang (1):
x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
Greg Kroah-Hartman (1):
Linux 4.14.324
Gustavo A. R. Silva (1):
MIPS: dec: prom: Address -Warray-bounds warning
Hans Verkuil (1):
media: platform: mediatek: vpu: fix NULL ptr dereference
Helge Deller (1):
lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
Ido Schimmel (1):
rtnetlink: Reject negative ifindexes in RTM_NEWLINK
Immad Mir (2):
FS: JFS: Fix null-ptr-deref Read in txBegin
FS: JFS: Check for read-only mounted filesystem in txBegin
Jan Kara (2):
quota: Properly disable quotas when add_dquot_ref() fails
udf: Fix uninitialized array access for some pathnames
Jason Xing (1):
net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
Junwei Hu (1):
ipvs: Improve robustness to the ipvs sysctl
Justin Chen (1):
net: phy: broadcom: stub c45 read/write for 54810
Kuniyuki Iwashima (1):
af_unix: Fix null-ptr-deref in unix_stream_sendpage().
Lin Ma (4):
net: xfrm: Fix xfrm_address_filter OOB read
net: af_key: fix sadb_x_filter validation
xfrm: add NULL check in xfrm_update_ae_params
net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
Michael Ellerman (1):
ibmveth: Use dcbf rather than dcbfl
Mirsad Goran Todorovac (1):
test_firmware: prevent race conditions by a correct implementation of locking
Nathan Chancellor (1):
lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
Oswald Buddenhagen (1):
ALSA: emu10k1: roll up loops in DSP setup code for Audigy
Pablo Neira Ayuso (1):
netfilter: nft_dynset: disallow object maps
Qi Zheng (1):
binder: fix memory leak in binder_init()
Remi Pommarel (3):
batman-adv: Do not get eth header before batadv_check_management_packet
batman-adv: Fix TT global entry leak when client roamed back
batman-adv: Fix batadv_v_ogm_aggr_send memory leak
Rob Clark (1):
dma-buf/sw_sync: Avoid recursive lock during fence signal
Russell Harmon via samba-technical (1):
cifs: Release folio lock on fscache read hit.
Sishuai Gong (1):
ipvs: fix racy memcpy in proc_do_sync_threshold
Sven Eckelmann (1):
batman-adv: Trigger events for auto adjusted MTU
Tony Lindgren (1):
serial: 8250: Fix oops for port->pm on uart_change_pm()
Tuo Li (1):
gfs2: Fix possible data races in gfs2_show_options()
Wei Chen (1):
media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
Xin Long (1):
netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
Yang Yingliang (1):
mmc: wbsd: fix double mmc_free_host() in wbsd_init()
Ye Bin (1):
quota: fix warning in dqgrab()
Yogesh (1):
fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
Yuanjun Gong (1):
fbdev: mmp: fix value check in mmphw_probe()
Yunfei Dong (1):
media: v4l2-mem2mem: add lock to protect parameter num_rdy
Zhang Shurong (1):
ASoC: rt5665: add missed regulator_bulk_disable
Zheng Yejian (1):
tracing: Fix memleak due to race between current_tracer and trace
Zhengchao Shao (2):
ip6_vti: fix slab-use-after-free in decode_session6
ip_vti: fix potential slab-use-after-free in decode_session6
Zhengping Jiang (1):
Bluetooth: L2CAP: Fix use-after-free
Zhu Wang (2):
scsi: snic: Fix double free in snic_tgt_create()
scsi: core: raid_class: Remove raid_component_add()
Ziyang Xuan (1):
team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
dengxiang (1):
ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
hackyzh002 (1):
drm/radeon: Fix integer overflow in radeon_cs_parser_init
shanzhulig (1):
drm/amdgpu: Fix potential fence use-after-free v2
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 323 +SUBLEVEL = 324 EXTRAVERSION = NAME = Petit Gorille
arch/mips/include/asm/dec/prom.h +1 -1
@@ -74,7 +74,7 @@ static inline bool prom_is_rex(u32 magic)*/ typedef struct {int pagesize; -unsigned char bitmap[0 ]; +unsigned char bitmap[]; }memmap ;
arch/x86/kernel/fpu/xstate.c +8 -0
@@ -811,6 +811,14 @@ void __init fpu__init_system_xstate(void)fpu__init_prepare_fx_sw_frame ();setup_init_fpu_buf ();setup_xstate_comp (); + +/* +* CPU capabilities initialization runs before FPU init. So +* X86_FEATURE_OSXSAVE is not set. Now that XSAVE is completely +* functional, set the feature bit so depending code works. +*/ +setup_force_cpu_cap (X86_FEATURE_OSXSAVE ); +print_xstate_offset_size (); pr_info("x86/fpu: Enabled xstate features 0x%llx, context size is %d bytes, using '%s' format.\n",
drivers/android/binder.c +1 -0
@@ -5658,6 +5658,7 @@ static int __init binder_init(void) err_alloc_device_names_failed:debugfs_remove_recursive (binder_debugfs_dir_entry_root); +binder_alloc_shrinker_exit ();return ret; }
drivers/android/binder_alloc.c +6 -0
@@ -1033,3 +1033,9 @@ void binder_alloc_shrinker_init(void)list_lru_init (&binder_alloc_lru);register_shrinker (&binder_shrinker); } + +void binder_alloc_shrinker_exit (void ) +{ +unregister_shrinker (&binder_shrinker); +list_lru_destroy (&binder_alloc_lru); +}
drivers/android/binder_alloc.h +1 -0
@@ -128,6 +128,7 @@ extern struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc, int is_async);extern void binder_alloc_init (struct binder_alloc *alloc);void binder_alloc_shrinker_init (void ); +extern void binder_alloc_shrinker_exit (void );extern void binder_alloc_vma_close (struct binder_alloc *alloc);extern struct binder_buffer * binder_alloc_prepare_to_free(struct binder_alloc *alloc,
drivers/dma-buf/sw_sync.c +9 -9
@@ -201,6 +201,7 @@ static const struct dma_fence_ops timeline_fence_ops = {*/ static void sync_timeline_signal (struct sync_timeline *obj,unsigned int inc) { +LIST_HEAD (signalled);struct sync_pt *pt, *next;trace_sync_timeline (obj);
@@ -213,21 +214,20 @@ static void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc)if (!timeline_fence_signaled (&pt->base))break ; -list_del_init (&pt->link); +dma_fence_get (&pt->base); + +list_move_tail (&pt->link, &signalled);rb_erase (&pt->node, &obj->pt_tree); -/* -* A signal callback may release the last reference to this -* fence, causing it to be freed. That operation has to be -* last to avoid a use after free inside this loop, and must -* be after we remove the fence from the timeline in order to -* prevent deadlocking on timeline->lock inside -* timeline_fence_release(). -*/ dma_fence_signal_locked (&pt->base); }spin_unlock_irq (&obj->lock); + +list_for_each_entry_safe (pt, next, &signalled, link) { +list_del_init (&pt->link); +dma_fence_put (&pt->base); + } }/**
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3 -0
@@ -1343,6 +1343,9 @@ static int amdgpu_cs_wait_all_fences(struct amdgpu_device *adev,continue ; r =dma_fence_wait_timeout (fence, true, timeout); +if (r >0 && fence->error) + r = fence->error; +dma_fence_put (fence);if (r <0 )return r;
drivers/gpu/drm/radeon/radeon_cs.c +2 -1
@@ -265,7 +265,8 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data) {struct drm_radeon_cs *cs = data;uint64_t *chunk_array_ptr; -unsigned size, i; +u64 size; +unsigned i;u32 ring =RADEON_CS_RING_GFX ;s32 priority =0 ;
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c +2 -0
@@ -766,6 +766,8 @@ static int vb2ops_venc_queue_setup(struct vb2_queue *vq,return -EINVAL ;if (*nplanes) { +if (*nplanes != q_data->fmt->num_planes) +return -EINVAL ;for (i =0 ; i < *nplanes; i++)if (sizes[i] < q_data->sizeimage[i])return -EINVAL ;
drivers/media/platform/mtk-vpu/mtk_vpu.c +4 -2
@@ -536,16 +536,18 @@ static int load_requested_vpu(struct mtk_vpu *vpu,int vpu_load_firmware (struct platform_device *pdev) {struct mtk_vpu *vpu; -struct device *dev = &pdev->dev; +struct device *dev;struct vpu_run *run;const struct firmware *vpu_fw =NULL ;int ret;if (!pdev) { -dev_err (dev,"VPU platform device is invalid\n" ); +pr_err ("VPU platform device is invalid\n" );return -EINVAL ; } + dev = &pdev->dev; + vpu =platform_get_drvdata (pdev); run = &vpu->run;
drivers/mmc/host/wbsd.c +0 -2
@@ -1723,8 +1723,6 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,wbsd_release_resources (host);wbsd_free_mmc (dev); - -mmc_free_host (mmc);return ret; }
drivers/net/ethernet/ibm/ibmveth.c +1 -1
@@ -209,7 +209,7 @@ static inline void ibmveth_flush_buffer(void *addr, unsigned long length)unsigned long offset;for (offset =0 ; offset < length; offset +=SMP_CACHE_BYTES ) - asm("dcbfl %0,%1" ::"b" (addr),"r" (offset)); + asm("dcbf %0,%1,1" ::"b" (addr),"r" (offset)); }/* replenish the buffers for a pool. note that we don't need to
drivers/net/ethernet/intel/i40e/i40e_nvm.c +8 -8
@@ -233,11 +233,11 @@ static i40e_status i40e_read_nvm_word_srctl(struct i40e_hw *hw, u16 offset,* @hw: pointer to the HW structure. * @module_pointer: module pointer location in words from the NVM beginning * @offset: offset in words from module start -* @words: number of words to write -* @data: buffer with words to write to the Shadow RAM +* @words: number of words to read +* @data: buffer with words to read to the Shadow RAM * @last_command: tells the AdminQ that this is the last command * -* Writes a 16 bit words buffer to the Shadow RAM using the admin command. +* Reads a 16 bit words buffer to the Shadow RAM using the admin command. **/ static i40e_status i40e_read_nvm_aq(struct i40e_hw *hw, u8 module_pointer, u32 offset, u16 words, void *data,
@@ -256,18 +256,18 @@ static i40e_status i40e_read_nvm_aq(struct i40e_hw *hw, u8 module_pointer,*/ if ((offset + words) > hw->nvm.sr_size)i40e_debug (hw,I40E_DEBUG_NVM , -"NVM write error: offset %d beyond Shadow RAM limit %d\n" , +"NVM read error: offset %d beyond Shadow RAM limit %d\n" , (offset + words), hw->nvm.sr_size);else if (words >I40E_SR_SECTOR_SIZE_IN_WORDS ) -/* We can write only up to 4KB (one sector), in one AQ write */ +/* We can read only up to 4KB (one sector), in one AQ write */ i40e_debug (hw,I40E_DEBUG_NVM , -"NVM write fail error: tried to write %d words, limit is %d.\n" , +"NVM read fail error: tried to read %d words, limit is %d.\n" , words,I40E_SR_SECTOR_SIZE_IN_WORDS );else if (((offset + (words -1 )) /I40E_SR_SECTOR_SIZE_IN_WORDS ) != (offset /I40E_SR_SECTOR_SIZE_IN_WORDS )) -/* A single write cannot spread over two sectors */ +/* A single read cannot spread over two sectors */ i40e_debug (hw,I40E_DEBUG_NVM , -"NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n" , +"NVM read error: cannot spread over two sectors in a single read offset=%d words=%d\n" , offset, words);else ret_code = i40e_aq_read_nvm(hw, module_pointer,
drivers/net/ethernet/intel/igb/igb_ptp.c +12 -12
@@ -1195,18 +1195,6 @@ void igb_ptp_init(struct igb_adapter *adapter)return ; } -spin_lock_init (&adapter->tmreg_lock); -INIT_WORK (&adapter->ptp_tx_work, igb_ptp_tx_work); - -if (adapter->ptp_flags &IGB_PTP_OVERFLOW_CHECK ) -INIT_DELAYED_WORK (&adapter->ptp_overflow_work, - igb_ptp_overflow_check); - - adapter->tstamp_config.rx_filter =HWTSTAMP_FILTER_NONE ; - adapter->tstamp_config.tx_type =HWTSTAMP_TX_OFF ; - -igb_ptp_reset (adapter); - adapter->ptp_clock =ptp_clock_register (&adapter->ptp_caps, &adapter->pdev->dev);if (IS_ERR (adapter->ptp_clock)) {
@@ -1216,6 +1204,18 @@ void igb_ptp_init(struct igb_adapter *adapter)dev_info (&adapter->pdev->dev,"added PHC on %s\n" , adapter->netdev->name); adapter->ptp_flags |=IGB_PTP_ENABLED ; + +spin_lock_init (&adapter->tmreg_lock); +INIT_WORK (&adapter->ptp_tx_work, igb_ptp_tx_work); + +if (adapter->ptp_flags &IGB_PTP_OVERFLOW_CHECK ) +INIT_DELAYED_WORK (&adapter->ptp_overflow_work, + igb_ptp_overflow_check); + + adapter->tstamp_config.rx_filter =HWTSTAMP_FILTER_NONE ; + adapter->tstamp_config.tx_type =HWTSTAMP_TX_OFF ; + +igb_ptp_reset (adapter); } }
drivers/net/phy/broadcom.c +13 -0
@@ -403,6 +403,17 @@ static int bcm5482_read_status(struct phy_device *phydev)return err; } +static int bcm54810_read_mmd (struct phy_device *phydev,int devnum,u16 regnum) +{ +return -EOPNOTSUPP ; +} + +static int bcm54810_write_mmd (struct phy_device *phydev,int devnum,u16 regnum, +u16 val) +{ +return -EOPNOTSUPP ; +} +static int bcm5481_config_aneg (struct phy_device *phydev) {struct device_node *np = phydev->mdio.dev.of_node;
@@ -650,6 +661,8 @@ static struct phy_driver broadcom_drivers[] = { .name = "Broadcom BCM54810", .features = PHY_GBIT_FEATURES, .flags = PHY_HAS_INTERRUPT, + .read_mmd = bcm54810_read_mmd, + .write_mmd = bcm54810_write_mmd, .config_init = bcm54xx_config_init, .config_aneg = bcm5481_config_aneg, .read_status = genphy_read_status,
drivers/net/team/team.c +3 -1
@@ -2160,7 +2160,9 @@ static void team_setup(struct net_device *dev) dev->hw_features =TEAM_VLAN_FEATURES |NETIF_F_HW_VLAN_CTAG_RX | -NETIF_F_HW_VLAN_CTAG_FILTER ; +NETIF_F_HW_VLAN_CTAG_FILTER | +NETIF_F_HW_VLAN_STAG_RX | +NETIF_F_HW_VLAN_STAG_FILTER ; dev->hw_features |=NETIF_F_GSO_ENCAP_ALL ; dev->features |= dev->hw_features;
drivers/pcmcia/rsrc_nonstatic.c +2 -0
@@ -1056,6 +1056,8 @@ static void nonstatic_release_resource_db(struct pcmcia_socket *s) q = p->next;kfree (p); } + +kfree (data); }
drivers/scsi/raid_class.c +0 -48
54 lines not on this page · raw message
drivers/scsi/snic/snic_disc.c +1 -2
@@ -316,12 +316,11 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)"Snic Tgt: device_add, with err = %d\n" , ret); -put_device (&tgt->dev);put_device (&snic->shost->shost_gendev);spin_lock_irqsave (snic->shost->host_lock, flags);list_del (&tgt->list);spin_unlock_irqrestore (snic->shost->host_lock, flags); -kfree (tgt); +put_device (&tgt->dev); tgt =NULL ;return tgt;
drivers/tty/serial/8250/8250_port.c +1 -0
@@ -3191,6 +3191,7 @@ void serial8250_init_port(struct uart_8250_port *up)struct uart_port *port = &up->port;spin_lock_init (&port->lock); + port->pm =NULL ; port->ops = &serial8250_pops; up->cur_iotype =0xFF ;
drivers/video/fbdev/mmp/hw/mmp_ctrl.c +3 -1
@@ -525,7 +525,9 @@ static int mmphw_probe(struct platform_device *pdev) ret = -ENOENT ; goto failed; } -clk_prepare_enable (ctrl->clk); + ret =clk_prepare_enable (ctrl->clk); +if (ret) + goto failed;/* init global regs */ ctrl_set_default (ctrl);
fs/cifs/file.c +1 -1
@@ -3939,9 +3939,9 @@ static int cifs_readpage_worker(struct file *file, struct page *page, io_error:kunmap (page); -unlock_page (page); read_complete: +unlock_page (page);return rc; }
fs/gfs2/super.c +15 -11
@@ -1363,7 +1363,14 @@ static int gfs2_show_options(struct seq_file *s, struct dentry *root) {struct gfs2_sbd *sdp = root->d_sb->s_fs_info;struct gfs2_args *args = &sdp->sd_args; -int val; +unsigned int logd_secs, statfs_slow, statfs_quantum, quota_quantum; + +spin_lock (&sdp->sd_tune.gt_spin); + logd_secs = sdp->sd_tune.gt_logd_secs; + quota_quantum = sdp->sd_tune.gt_quota_quantum; + statfs_quantum = sdp->sd_tune.gt_statfs_quantum; + statfs_slow = sdp->sd_tune.gt_statfs_slow; +spin_unlock (&sdp->sd_tune.gt_spin);if (is_ancestor (root, sdp->sd_master_dir))seq_puts (s,",meta" );
@@ -1418,17 +1425,14 @@ static int gfs2_show_options(struct seq_file *s, struct dentry *root) }if (args->ar_discard)seq_puts (s,",discard" ); - val = sdp->sd_tune.gt_logd_secs; -if (val !=30 ) -seq_printf (s,",commit=%d" , val); - val = sdp->sd_tune.gt_statfs_quantum; -if (val !=30 ) -seq_printf (s,",statfs_quantum=%d" , val); -else if (sdp->sd_tune.gt_statfs_slow) +if (logd_secs !=30 ) +seq_printf (s,",commit=%d" , logd_secs); +if (statfs_quantum !=30 ) +seq_printf (s,",statfs_quantum=%d" , statfs_quantum); +else if (statfs_slow)seq_puts (s,",statfs_quantum=0" ); - val = sdp->sd_tune.gt_quota_quantum; -if (val !=60 ) -seq_printf (s,",quota_quantum=%d" , val); +if (quota_quantum !=60 ) +seq_printf (s,",quota_quantum=%d" , quota_quantum);if (args->ar_statfs_percent)seq_printf (s,",statfs_percent=%d" , args->ar_statfs_percent);if (args->ar_errors !=GFS2_ERRORS_DEFAULT ) {
fs/jfs/jfs_dmap.c +3 -0
@@ -2040,6 +2040,9 @@ dbAllocDmapLev(struct bmap * bmp,if (dbFindLeaf ((dmtree_t *) & dp->tree, l2nb, &leafidx))return -ENOSPC ; +if (leafidx <0 ) +return -EIO ; +/* determine the block number within the file system corresponding * to the leaf at which free space was found. */
fs/jfs/jfs_txnmgr.c +5 -0
@@ -367,6 +367,11 @@ tid_t txBegin(struct super_block *sb, int flag)jfs_info ("txBegin: flag = 0x%x" , flag); log =JFS_SBI (sb)->log; +if (!log) { +jfs_error (sb,"read-only filesystem\n" ); +return 0 ; + } +TXN_LOCK ();INCREMENT (TxStat.txBegin);
fs/jfs/namei.c +5 -0
@@ -813,6 +813,11 @@ static int jfs_link(struct dentry *old_dentry,if (rc) goto out; +if (isReadOnly (ip)) { +jfs_error (ip->i_sb,"read-only filesystem\n" ); +return -EROFS ; + } + tid =txBegin (ip->i_sb,0 );mutex_lock_nested (&JFS_IP (dir)->commit_mutex,COMMIT_MUTEX_PARENT );
fs/quota/dquot.c +3 -2
@@ -540,7 +540,7 @@ static void invalidate_dquots(struct super_block *sb, int type)continue ;/* Wait for dquot users */ if (atomic_read (&dquot->dq_count)) { -dqgrab (dquot); +atomic_inc (&dquot->dq_count);spin_unlock (&dq_list_lock);/* * Once dqput() wakes us up, we know it's time to free
@@ -2387,7 +2387,8 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, error =add_dquot_ref (sb, type);if (error) -dquot_disable (sb, type, flags); +dquot_disable (sb, type, +DQUOT_USAGE_ENABLED |DQUOT_LIMITS_ENABLED );return error; out_file_init:
fs/udf/unicode.c +1 -1
@@ -268,7 +268,7 @@ static int udf_name_from_CS0(uint8_t *str_o, int str_max_len, }if (translate) { -if (str_o_len <=2 && str_o[0 ] =='.' && +if (str_o_len >0 && str_o_len <=2 && str_o[0 ] =='.' && (str_o_len ==1 || str_o[1 ] =='.' )) needsCRC =1 ;if (needsCRC) {
include/linux/raid_class.h +0 -4
@@ -77,7 +77,3 @@ DEFINE_RAID_ATTRIBUTE(enum raid_state, state)struct raid_template *raid_class_attach (struct raid_function_template *);void raid_class_release (struct raid_template *); - -int __must_check raid_component_add (struct raid_template *,struct device *, -struct device *); -
include/linux/virtio_net.h +4 -0
@@ -146,6 +146,10 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,if (gso_type &SKB_GSO_UDP ) nh_off -= thlen; +/* Kernel has a special handling for GSO_BY_FRAGS. */ +if (gso_size ==GSO_BY_FRAGS ) +return -EINVAL ; +/* Too small packets are not really GSO ones. */ if (skb->len - nh_off > gso_size) { shinfo->gso_size = gso_size;
include/media/v4l2-mem2mem.h +16 -2
@@ -392,7 +392,14 @@ void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx,static inline unsigned int v4l2_m2m_num_src_bufs_ready (struct v4l2_m2m_ctx *m2m_ctx) { -return m2m_ctx->out_q_ctx.num_rdy; +unsigned int num_buf_rdy; +unsigned long flags; + +spin_lock_irqsave (&m2m_ctx->out_q_ctx.rdy_spinlock, flags); + num_buf_rdy = m2m_ctx->out_q_ctx.num_rdy; +spin_unlock_irqrestore (&m2m_ctx->out_q_ctx.rdy_spinlock, flags); + +return num_buf_rdy; }/**
@@ -404,7 +411,14 @@ unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)static inline unsigned int v4l2_m2m_num_dst_bufs_ready (struct v4l2_m2m_ctx *m2m_ctx) { -return m2m_ctx->cap_q_ctx.num_rdy; +unsigned int num_buf_rdy; +unsigned long flags; + +spin_lock_irqsave (&m2m_ctx->cap_q_ctx.rdy_spinlock, flags); + num_buf_rdy = m2m_ctx->cap_q_ctx.num_rdy; +spin_unlock_irqrestore (&m2m_ctx->cap_q_ctx.rdy_spinlock, flags); + +return num_buf_rdy; }/**
include/net/sock.h +9 -2
@@ -1115,6 +1115,7 @@ struct proto {/* * Pressure flag: try to collapse. * Technical note: it is used by multiple contexts non atomically. +* Make sure to use READ_ONCE()/WRITE_ONCE() for all reads/writes. * All the __sk_mem_schedule() is of this nature: accounting * is strict, actions are advisory and have some latency. */
@@ -1211,6 +1212,12 @@ static inline bool sk_has_memory_pressure(const struct sock *sk)return sk->sk_prot->memory_pressure !=NULL ; } +static inline bool sk_under_global_memory_pressure (const struct sock *sk) +{ +return sk->sk_prot->memory_pressure && + !!READ_ONCE (*sk->sk_prot->memory_pressure); +} +static inline bool sk_under_memory_pressure (const struct sock *sk) {if (!sk->sk_prot->memory_pressure)
@@ -1220,7 +1227,7 @@ static inline bool sk_under_memory_pressure(const struct sock *sk) mem_cgroup_under_socket_pressure(sk->sk_memcg))return true; -return !!*sk->sk_prot->memory_pressure; +return !!READ_ONCE (*sk->sk_prot->memory_pressure); } static inline long
@@ -1274,7 +1281,7 @@ proto_memory_pressure(struct proto *prot) {if (!prot->memory_pressure)return false; -return !!*prot->memory_pressure; +return !!READ_ONCE (*prot->memory_pressure); }
kernel/trace/trace.c +8 -1
@@ -3275,8 +3275,15 @@ static void *s_start(struct seq_file *m, loff_t *pos)* will point to the same string as current_trace->name. */ mutex_lock (&trace_types_lock); -if (unlikely (tr->current_trace && iter->trace->name != tr->current_trace->name)) +if (unlikely (tr->current_trace && iter->trace->name != tr->current_trace->name)) { +/* Close iter->trace before switching to the new current tracer */ +if (iter->trace->close) + iter->trace->close (iter); *iter->trace = *tr->current_trace; +/* Reopen the new current tracer */ +if (iter->trace->open) + iter->trace->open (iter); + }mutex_unlock (&trace_types_lock);#ifdef CONFIG_TRACER_MAX_TRACE
kernel/trace/trace_irqsoff.c +2 -1
@@ -218,7 +218,8 @@ static void irqsoff_trace_open(struct trace_iterator *iter) {if (is_graph (iter->tr))graph_trace_open (iter); - +else + iter->private =NULL ; }static void irqsoff_trace_close (struct trace_iterator *iter)
kernel/trace/trace_sched_wakeup.c +2 -0
@@ -287,6 +287,8 @@ static void wakeup_trace_open(struct trace_iterator *iter) {if (is_graph (iter->tr))graph_trace_open (iter); +else + iter->private =NULL ; }static void wakeup_trace_close (struct trace_iterator *iter)
lib/clz_ctz.c +6 -26
@@ -30,36 +30,16 @@ int __weak __clzsi2(int val) }EXPORT_SYMBOL (__clzsi2); -int __weak __clzdi2 (long val); -int __weak __ctzdi2 (long val); -#if BITS_PER_LONG ==32 - -int __weak __clzdi2 (long val) +int __weak __clzdi2 (u64 val); +int __weak __clzdi2 (u64 val) { -return 32 -fls ((int )val); +return 64 -fls64 (val); }EXPORT_SYMBOL (__clzdi2); -int __weak __ctzdi2 (long val) +int __weak __ctzdi2 (u64 val); +int __weak __ctzdi2 (u64 val) { -return __ffs ((u32 )val); +return __ffs64 (val); }EXPORT_SYMBOL (__ctzdi2); - -#elif BITS_PER_LONG ==64 - -int __weak __clzdi2 (long val) -{ -return 64 -fls64 ((u64 )val); -} -EXPORT_SYMBOL (__clzdi2); - -int __weak __ctzdi2 (long val) -{ -return __ffs64 ((u64 )val); -} -EXPORT_SYMBOL (__ctzdi2); - -#else -#error BITS_PER_LONG not 32 or 64 -#endif
lib/mpi/longlong.h +1 -35
@@ -639,30 +639,12 @@ do { \************** MIPS ***************** ***************************************/ #if defined(__mips__) &&W_TYPE_SIZE ==32 -#if (__GNUC__ >=5 ) || (__GNUC__ >=4 && __GNUC_MINOR__ >=4 )#define umul_ppmm (w1, w0, u, v) \ do { \ UDItype __ll = (UDItype)(u) * (v); \ w1 = __ll >> 32; \ w0 = __ll; \ } while (0) -#elif __GNUC__ >2 || __GNUC_MINOR__ >=7 -#define umul_ppmm (w1, w0, u, v) \ - __asm__ ("multu %2,%3" \ - : "=l" ((USItype)(w0)), \ - "=h" ((USItype)(w1)) \ - : "d" ((USItype)(u)), \ - "d" ((USItype)(v))) -#else -#define umul_ppmm (w1, w0, u, v) \ - __asm__ ("multu %2,%3\n" \ - "mflo %0\n" \ - "mfhi %1" \ - : "=d" ((USItype)(w0)), \ - "=d" ((USItype)(w1)) \ - : "d" ((USItype)(u)), \ - "d" ((USItype)(v))) -#endif #define UMUL_TIME 10#define UDIV_TIME 100#endif /* __mips__ */
@@ -687,7 +669,7 @@ do { \ : "d" ((UDItype)(u)), \ "d" ((UDItype)(v))); \ } while (0) -#elif (__GNUC__ >=5 ) || (__GNUC__ >=4 && __GNUC_MINOR__ >=4 ) +#else#define umul_ppmm (w1, w0, u, v) \ do { \ typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
@@ -695,22 +677,6 @@ do { \ w1 = __ll >>64 ; \ w0 = __ll; \ } while (0) -#elif __GNUC__ >2 || __GNUC_MINOR__ >=7 -#define umul_ppmm (w1, w0, u, v) \ - __asm__ ("dmultu %2,%3" \ - : "=l" ((UDItype)(w0)), \ - "=h" ((UDItype)(w1)) \ - : "d" ((UDItype)(u)), \ - "d" ((UDItype)(v))) -#else -#define umul_ppmm (w1, w0, u, v) \ - __asm__ ("dmultu %2,%3\n" \ - "mflo %0\n" \ - "mfhi %1" \ - : "=d" ((UDItype)(w0)), \ - "=d" ((UDItype)(w1)) \ - : "d" ((UDItype)(u)), \ - "d" ((UDItype)(v))) #endif#define UMUL_TIME 20#define UDIV_TIME 140
lib/test_firmware.c +28 -9
@@ -283,16 +283,26 @@ static ssize_t config_test_show_str(char *dst,return len; } -static int test_dev_config_update_bool (const char *buf,size_t size, -bool *cfg) +static inline int __test_dev_config_update_bool (const char *buf,size_t size, +bool *cfg) {int ret; -mutex_lock (&test_fw_mutex);if (strtobool (buf, cfg) <0 ) ret = -EINVAL ;else ret = size; + +return ret; +} + +static int test_dev_config_update_bool (const char *buf,size_t size, +bool *cfg) +{ +int ret; + +mutex_lock (&test_fw_mutex); + ret =__test_dev_config_update_bool (buf, size, cfg);mutex_unlock (&test_fw_mutex);return ret;
@@ -322,7 +332,7 @@ static ssize_t test_dev_config_show_int(char *buf, int cfg)return snprintf (buf,PAGE_SIZE ,"%d\n" , val); } -static int test_dev_config_update_u8 (const char *buf,size_t size,u8 *cfg) +static inline int __test_dev_config_update_u8 (const char *buf,size_t size,u8 *cfg) {int ret;long new;
@@ -334,14 +344,23 @@ static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)if (new >U8_MAX )return -EINVAL ; -mutex_lock (&test_fw_mutex); *(u8 *)cfg = new; -mutex_unlock (&test_fw_mutex);/* Always return full write size even if we didn't consume all */ return size; } +static int test_dev_config_update_u8 (const char *buf,size_t size,u8 *cfg) +{ +int ret; + +mutex_lock (&test_fw_mutex); + ret =__test_dev_config_update_u8 (buf, size, cfg); +mutex_unlock (&test_fw_mutex); + +return ret; +} +static ssize_t test_dev_config_show_u8 (char *buf,u8 cfg) {u8 val;
@@ -374,10 +393,10 @@ static ssize_t config_num_requests_store(struct device *dev,mutex_unlock (&test_fw_mutex); goto out; } -mutex_unlock (&test_fw_mutex); - rc =test_dev_config_update_u8 (buf, count, - &test_fw_config->num_requests); + rc =__test_dev_config_update_u8 (buf, count, + &test_fw_config->num_requests); +mutex_unlock (&test_fw_mutex); out:return rc;
net/batman-adv/bat_v_elp.c +2 -1
@@ -507,7 +507,7 @@ int batadv_v_elp_packet_recv(struct sk_buff *skb,struct batadv_priv *bat_priv =netdev_priv (if_incoming->soft_iface);struct batadv_elp_packet *elp_packet;struct batadv_hard_iface *primary_if; -struct ethhdr *ethhdr = (struct ethhdr *)skb_mac_header (skb); +struct ethhdr *ethhdr;bool res;int ret =NET_RX_DROP ;
@@ -515,6 +515,7 @@ int batadv_v_elp_packet_recv(struct sk_buff *skb,if (!res) goto free_skb; + ethhdr =eth_hdr (skb);if (batadv_is_my_mac (bat_priv, ethhdr->h_source)) goto free_skb;
net/batman-adv/bat_v_ogm.c +5 -2
@@ -118,8 +118,10 @@ static void batadv_v_ogm_send_to_if(struct sk_buff *skb, {struct batadv_priv *bat_priv =netdev_priv (hard_iface->soft_iface); -if (hard_iface->if_status !=BATADV_IF_ACTIVE ) +if (hard_iface->if_status !=BATADV_IF_ACTIVE ) { +kfree_skb (skb);return ; + }batadv_inc_counter (bat_priv,BATADV_CNT_MGMT_TX ); batadv_add_counter(bat_priv, BATADV_CNT_MGMT_TX_BYTES,
@@ -831,7 +833,7 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb, {struct batadv_priv *bat_priv =netdev_priv (if_incoming->soft_iface);struct batadv_ogm2_packet *ogm_packet; -struct ethhdr *ethhdr =eth_hdr (skb); +struct ethhdr *ethhdr;int ogm_offset;u8 *packet_pos;int ret =NET_RX_DROP ;
@@ -845,6 +847,7 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb,if (!batadv_check_management_packet (skb, if_incoming,BATADV_OGM2_HLEN )) goto free_skb; + ethhdr =eth_hdr (skb);if (batadv_is_my_mac (bat_priv, ethhdr->h_source)) goto free_skb;
net/batman-adv/hard-interface.c +1 -1
@@ -625,7 +625,7 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface)/* adjusts the MTU if a new interface with a smaller MTU appeared. */ void batadv_update_min_mtu (struct net_device *soft_iface) { - soft_iface->mtu =batadv_hardif_min_mtu (soft_iface); +dev_set_mtu (soft_iface,batadv_hardif_min_mtu (soft_iface));/* Check if the local translate table should be cleaned up to match a * new (and smaller) MTU.
net/batman-adv/translation-table.c +0 -1
@@ -791,7 +791,6 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,if (roamed_back) {batadv_tt_global_free (bat_priv, tt_global,"Roaming canceled" ); - tt_global =NULL ; }else {/* The global entry has to be marked as ROAMING and * has to be kept for consistency purpose
net/bluetooth/l2cap_core.c +5 -0
@@ -5705,9 +5705,14 @@ static inline int l2cap_le_command_rej(struct l2cap_conn *conn,if (!chan) goto done; + chan =l2cap_chan_hold_unless_zero (chan); +if (!chan) + goto done; +l2cap_chan_lock (chan);l2cap_chan_del (chan,ECONNREFUSED );l2cap_chan_unlock (chan); +l2cap_chan_put (chan); done:mutex_unlock (&conn->chan_lock);
net/core/rtnetlink.c +4 -1
@@ -2311,7 +2311,10 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, ifm =nlmsg_data (nlh);if (ifm->ifi_index >0 ) dev =__dev_get_by_index (net, ifm->ifi_index); -else if (tb[IFLA_IFNAME ]) +else if (ifm->ifi_index <0 ) { +NL_SET_ERR_MSG (extack,"ifindex can't be negative" ); +return -EINVAL ; + }else if (tb[IFLA_IFNAME ]) dev =__dev_get_by_name (net, ifname);else goto errout;
net/core/sock.c +1 -1
@@ -2459,7 +2459,7 @@ void __sk_mem_reduce_allocated(struct sock *sk, int amount)if (mem_cgroup_sockets_enabled && sk->sk_memcg)mem_cgroup_uncharge_skmem (sk->sk_memcg, amount); -if (sk_under_memory_pressure (sk) && +if (sk_under_global_memory_pressure (sk) && (sk_memory_allocated (sk) <sk_prot_mem_limits (sk,0 )))sk_leave_memory_pressure (sk); }
net/ipv4/ip_vti.c +2 -2
@@ -325,12 +325,12 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)switch (skb->protocol) {case htons (ETH_P_IP ): -xfrm_decode_session (skb, &fl,AF_INET );memset (IPCB (skb),0 ,sizeof (*IPCB (skb))); +xfrm_decode_session (skb, &fl,AF_INET );break ;case htons (ETH_P_IPV6 ): -xfrm_decode_session (skb, &fl,AF_INET6 );memset (IP6CB (skb),0 ,sizeof (*IP6CB (skb))); +xfrm_decode_session (skb, &fl,AF_INET6 );break ;default : dev->stats.tx_errors++;
net/ipv4/tcp_timer.c +3 -1
@@ -540,7 +540,9 @@ void tcp_retransmit_timer(struct sock *sk) tcp_stream_is_thin(tp) && icsk->icsk_retransmits <= TCP_THIN_LINEAR_RETRIES) { icsk->icsk_backoff = 0; - icsk->icsk_rto = min(__tcp_set_rto(tp), TCP_RTO_MAX); + icsk->icsk_rto = clamp(__tcp_set_rto(tp), + tcp_rto_min(sk), + TCP_RTO_MAX); } else {/* Use normal (exponential) backoff */ icsk->icsk_rto =min (icsk->icsk_rto <<1 ,TCP_RTO_MAX );
net/ipv6/ip6_vti.c +2 -2
@@ -570,12 +570,12 @@ vti6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) vti6_addr_conflict(t, ipv6h)) goto tx_err; -xfrm_decode_session (skb, &fl,AF_INET6 );memset (IP6CB (skb),0 ,sizeof (*IP6CB (skb))); +xfrm_decode_session (skb, &fl,AF_INET6 );break ;case htons (ETH_P_IP ): -xfrm_decode_session (skb, &fl,AF_INET );memset (IPCB (skb),0 ,sizeof (*IPCB (skb))); +xfrm_decode_session (skb, &fl,AF_INET );break ;default : goto tx_err;
net/key/af_key.c +2 -2
@@ -1858,9 +1858,9 @@ static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msif (ext_hdrs[SADB_X_EXT_FILTER -1 ]) {struct sadb_x_filter *xfilter = ext_hdrs[SADB_X_EXT_FILTER -1 ]; -if ((xfilter->sadb_x_filter_splen >= +if ((xfilter->sadb_x_filter_splen > (sizeof (xfrm_address_t) <<3 )) || - (xfilter->sadb_x_filter_dplen >= + (xfilter->sadb_x_filter_dplen > (sizeof (xfrm_address_t) <<3 ))) {mutex_unlock (&pfk->dump_lock);return -EINVAL ;
net/netfilter/ipvs/ip_vs_ctl.c +40 -34
120 lines not on this page · raw message
net/netfilter/nf_conntrack_proto_sctp.c +3 -3
@@ -57,8 +57,8 @@ static unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] __read_mostly = { [SCTP_CONNTRACK_COOKIE_WAIT] = 3 SECS, [SCTP_CONNTRACK_COOKIE_ECHOED] = 3 SECS, [SCTP_CONNTRACK_ESTABLISHED] = 5 DAYS, - [SCTP_CONNTRACK_SHUTDOWN_SENT] = 300 SECS / 1000, - [SCTP_CONNTRACK_SHUTDOWN_RECD] = 300 SECS / 1000, + [SCTP_CONNTRACK_SHUTDOWN_SENT] = 3 SECS, + [SCTP_CONNTRACK_SHUTDOWN_RECD] = 3 SECS, [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = 3 SECS, [SCTP_CONNTRACK_HEARTBEAT_SENT] = 30 SECS, [SCTP_CONNTRACK_HEARTBEAT_ACKED] = 210 SECS,
@@ -116,7 +116,7 @@ static const u8 sctp_conntracks[2][11][SCTP_CONNTRACK_MAX] = { {/* ORIGINAL */ /* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA, sHS, sHA */ -/* init */ {sCW, sCW, sCW, sCE, sES, sSS, sSR, sSA, sCW, sHA}, +/* init */ {sCW, sCW, sCW, sCE, sES, sCL, sCL, sSA, sCW, sHA}, /* init_ack */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA, sCL, sHA}, /* abort */ {sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL}, /* shutdown */ {sCL, sCL, sCW, sCE, sSS, sSS, sSR, sSA, sCL, sSS},
net/netfilter/nft_dynset.c +3 -0
@@ -137,6 +137,9 @@ static int nft_dynset_init(const struct nft_ctx *ctx,if (IS_ERR (set))return PTR_ERR (set); +if (set->flags &NFT_SET_OBJECT ) +return -EOPNOTSUPP ; +if (set->ops->update ==NULL )return -EOPNOTSUPP ;
net/sctp/socket.c +1 -1
@@ -110,7 +110,7 @@ struct percpu_counter sctp_sockets_allocated;static void sctp_enter_memory_pressure (struct sock *sk) { - sctp_memory_pressure =1 ; +WRITE_ONCE (sctp_memory_pressure,1 ); }
net/unix/af_unix.c +4 -5
@@ -1988,6 +1988,7 @@ static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page,if (false) { alloc_skb: +spin_unlock (&other->sk_receive_queue.lock);unix_state_unlock (other);mutex_unlock (&unix_sk (other)->iolock); newskb = sock_alloc_send_pskb(sk, 0, 0, flags & MSG_DONTWAIT,
@@ -2027,6 +2028,7 @@ static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page, init_scm = false; } +spin_lock (&other->sk_receive_queue.lock); skb =skb_peek_tail (&other->sk_receive_queue);if (tail && tail == skb) { skb = newskb;
@@ -2057,14 +2059,11 @@ static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page,refcount_add (size, &sk->sk_wmem_alloc);if (newskb) { - err =unix_scm_to_skb (&scm, skb, false); -if (err) - goto err_state_unlock; -spin_lock (&other->sk_receive_queue.lock); +unix_scm_to_skb (&scm, skb, false);__skb_queue_tail (&other->sk_receive_queue, newskb); -spin_unlock (&other->sk_receive_queue.lock); } +spin_unlock (&other->sk_receive_queue.lock);unix_state_unlock (other);mutex_unlock (&unix_sk (other)->iolock);
net/xfrm/xfrm_user.c +11 -2
@@ -521,7 +521,7 @@ static void xfrm_update_ae_params(struct xfrm_state *x, struct nlattr **attrs,struct nlattr *et = attrs[XFRMA_ETIMER_THRESH ];struct nlattr *rt = attrs[XFRMA_REPLAY_THRESH ]; -if (re) { +if (re && x->replay_esn && x->preplay_esn) {struct xfrm_replay_state_esn *replay_esn; replay_esn =nla_data (re); memcpy(x->replay_esn, replay_esn,
@@ -1000,6 +1000,15 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) sizeof(*filter), GFP_KERNEL);if (filter ==NULL )return -ENOMEM ; + +/* see addr_match(), (prefix length >> 5) << 2 +* will be used to compare xfrm_address_t +*/ +if (filter->splen > (sizeof (xfrm_address_t) <<3 ) || + filter->dplen > (sizeof (xfrm_address_t) <<3 )) { +kfree (filter); +return -EINVAL ; + } }if (attrs[XFRMA_PROTO ])
@@ -2505,7 +2514,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { [XFRMA_ALG_COMP] = { .len = sizeof(struct xfrm_algo) }, [XFRMA_ENCAP] = { .len = sizeof(struct xfrm_encap_tmpl) }, [XFRMA_TMPL] = { .len = sizeof(struct xfrm_user_tmpl) }, - [XFRMA_SEC_CTX] = { .len = sizeof(struct xfrm_sec_ctx) }, + [XFRMA_SEC_CTX] = { .len = sizeof(struct xfrm_user_sec_ctx) }, [XFRMA_LTIME_VAL] = { .len = sizeof(struct xfrm_lifetime_cur) }, [XFRMA_REPLAY_VAL] = { .len = sizeof(struct xfrm_replay_state) }, [XFRMA_REPLAY_THRESH] = { .type = NLA_U32 },
sound/pci/emu10k1/emufx.c +9 -103
125 lines not on this page · raw message
sound/soc/codecs/rt5665.c +2 -0
@@ -4957,6 +4957,8 @@ static void rt5665_i2c_shutdown(struct i2c_client *client)struct rt5665_priv *rt5665 =i2c_get_clientdata (client);regmap_write (rt5665->regmap,RT5665_RESET ,0 ); + +regulator_bulk_disable (ARRAY_SIZE (rt5665->supplies), rt5665->supplies); }#ifdef CONFIG_OF
sound/usb/quirks-table.h +29 -0
@@ -3540,5 +3540,34 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), } } }, +{ +/* Advanced modes of the Mythware XA001AU. +* For the standard mode, Mythware XA001AU has ID ffad:a001 +*/ + USB_DEVICE_VENDOR_SPEC(0xffad, 0xa001), + .driver_info = (unsigned long ) &(const struct snd_usb_audio_quirk ) { + .vendor_name ="Mythware" , + .product_name ="XA001AU" , + .ifnum =QUIRK_ANY_INTERFACE , + .type =QUIRK_COMPOSITE , + .data = (const struct snd_usb_audio_quirk []) { + { + .ifnum =0 , + .type =QUIRK_IGNORE_INTERFACE , + }, + { + .ifnum =1 , + .type =QUIRK_AUDIO_STANDARD_INTERFACE , + }, + { + .ifnum =2 , + .type =QUIRK_AUDIO_STANDARD_INTERFACE , + }, + { + .ifnum =-1 + } + } + } +}, #undef USB_DEVICE_VENDOR_SPEC
Quoted 9 lines · Greg Kroah-Hartman
I'm announcing the release of the 4.14.324 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-4.14.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
...
Quoted 3 lines
Ido Schimmel (1):
rtnetlink: Reject negative ifindexes inRTM_NEWLINK
The above commit (69197b2 rtnetlink: Reject negative ifindexes in RTM_NEWLINK) appears to has been applied icorrectly, causing some regressions (like attaching a VF to a running guest). The change needs to be made in rtnl_newlink(), not rtnl_setlink().
I didn't check all other branches but at least 5.4 looks OK.
I believe 69197b2 needs to be reverted and instead this applied:
net/core/rtnetlink.c +5 -2
@@ -2547,9 +2547,12 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, ifname[0 ] ='\0' ; ifm =nlmsg_data (nlh); -if (ifm->ifi_index >0 ) +if (ifm->ifi_index >0 ) { dev =__dev_get_by_index (net, ifm->ifi_index); -else { + }else if (ifm->ifi_index <0 ) { +NL_SET_ERR_MSG (extack,"ifindex can't be negative" ); +return -EINVAL ; + }else {if (ifname[0 ]) dev =__dev_get_by_name (net, ifname);else
Greg Kroah-Hartman
maintainerQuoted 36 lines · Boris Ostrovsky
Quoted 9 lines · Greg Kroah-Hartman
I'm announcing the release of the 4.14.324 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-4.14.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...
Quoted 3 lines
Ido Schimmel (1):
rtnetlink: Reject negative ifindexes inRTM_NEWLINKThe above commit (69197b2 rtnetlink: Reject negative ifindexes in
RTM_NEWLINK) appears to has been applied icorrectly, causing some regressions (like attaching a VF to a running guest). The change needs to be made inrtnl_newlink(), notrtnl_setlink().I didn't check all other branches but at least 5.4 looks OK.
I believe 69197b2 needs to be reverted and instead this applied:
net/core/rtnetlink.c +0
-1@@ -2547,9 +2547,12 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, ifname[0 ] ='\0' ; ifm =nlmsg_data (nlh); -if (ifm->ifi_index >0 )
net/core/rtnetlink.c static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, · line 2558
Quoted 10 lines
net/core/rtnetlink.c +5
-1+if (ifm->ifi_index >0 ) { dev =__dev_get_by_index (net, ifm->ifi_index); - else { + }else if (ifm->ifi_index <0 ) { +NL_SET_ERR_MSG (extack,"ifindex can't be negative" ); +return -EINVAL ; + }else {if (ifname[0 ]) dev =__dev_get_by_name (net, ifname);else
Ick, good catch! 4.19 also looks wrong, let me go revert the original and then use this version again instead, many thanks for this!
greg k-h