Linux 4.14.98
Greg KH
maintainerI'm announcing the release of the 4.14.98 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:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-cns3xxx/pcie.c | 2 arch/arm64/kernel/hibernate.c | 4 - arch/arm64/kernel/hyp-stub.S | 2 arch/arm64/kernel/kaslr.c | 1 drivers/base/core.c | 2 drivers/gpio/gpio-altera-a10sr.c | 4 - drivers/gpio/gpio-pcf857x.c | 26 +++---- drivers/infiniband/hw/hfi1/file_ops.c | 2 drivers/iommu/intel-iommu.c | 2 drivers/md/raid5-cache.c | 33 ++++++--- drivers/md/raid5.c | 8 +- drivers/mmc/host/bcm2835.c | 2 drivers/mmc/host/sdhci-iproc.c | 5 + drivers/net/ethernet/freescale/ucc_geth.c | 2 drivers/net/ethernet/mellanox/mlx4/fw.c | 75 ++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 22 ++---- drivers/net/ipvlan/ipvlan_main.c | 6 - drivers/net/virtio_net.c | 55 ++++++++++----- drivers/platform/x86/asus-nb-wmi.c | 3 fs/cifs/connect.c | 53 ++++++++++++++ fs/cifs/smb2pdu.c | 4 - fs/dcache.c | 6 - fs/gfs2/rgrp.c | 2 fs/nfs/write.c | 9 +- fs/notify/fsnotify.c | 8 +- include/linux/kobject.h | 17 ++++ include/linux/netdevice.h | 8 ++ include/linux/sched/coredump.h | 1 include/net/l3mdev.h | 3 kernel/exit.c | 12 ++- mm/memory-failure.c | 3 mm/migrate.c | 7 + mm/oom_kill.c | 12 ++- net/core/dev.c | 3 net/ipv4/ip_fragment.c | 2 net/ipv6/af_inet6.c | 3 net/ipv6/seg6_iptunnel.c | 2 net/l2tp/l2tp_core.c | 43 ++++++------ net/l2tp/l2tp_core.h | 31 ++++++++ net/l2tp/l2tp_ip.c | 3 net/l2tp/l2tp_ip6.c | 3 net/netrom/nr_timer.c | 20 ++--- net/rose/rose_route.c | 5 + net/sctp/stream.c | 62 +++++++---------- sound/pci/hda/patch_realtek.c | 78 ++++++++++++---------- tools/testing/selftests/seccomp/seccomp_bpf.c | 72 ++++++++++++++++---- 47 files changed, 493 insertions(+), 237 deletions(-)
Alexei Naberezhnov (1):
md/raid5: fix 'out of memory' during raid cache recovery
Amir Goldstein (1):
fanotify: fix handling of events on child sub-directory
Andreas Gruenbacher (1):
gfs2: Revert "Fix loop in gfs2_rbm_find"
Andrei Vagin (1):
kernel/exit.c: release ptraced tasks before zap_pid_ns_processes
Ard Biesheuvel (1):
arm64: kaslr: ensure randomized quantities are clean also when kaslr is off
Axel Lin (1):
gpio: altera-a10sr: Set proper output level for direction_output
Aya Levin (2):
net/mlx4_core: Add masking for a few queries on HCA caps net/mlx5e: Allow MAC invalidation while spoofchk is ON
Benjamin Herrenschmidt (1):
drivers: core: Remove glue dirs from sysfs earlier
Bernard Pidoux (1):
net/rose: fix NULL ax25_cb kernel panic
Bodong Wang (1):
Revert "net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager"
Cong Wang (1):
netrom: switch to sock timer API
Daniel Borkmann (1):
ipvlan, l3mdev: fix broken l3s mode wrt local routes
David Ahern (1):
ipv6: Consider sk_bound_dev_if when binding a socket to an address
David Hildenbrand (1):
mm: migrate: don't rely on __PageMovable() of newpage after unlocking it
Gerald Schaefer (1):
iommu/vt-d: Fix memory leak in intel_iommu_put_resv_regions()
Greg Kroah-Hartman (2):
Fix "net: ipv4: do not handle duplicate fragments as overlapping" Linux 4.14.98
Jacob Wen (2):
l2tp: copy 4 more bytes to linear part if necessary
l2tp: fix reading optional fields of L2TPv3
James Morse (2):
arm64: hyp-stub: Forbid kprobing of the hyp-stub
arm64: hibernate: Clean the __hyp_text to PoC after resume
Josh Elsasser (1):
net: set default network namespace in init_dummy_netdev()
João Paulo Rechi Vita (2):
platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK
platform/x86: asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan codesKailang Yang (1):
ALSA: hda/realtek - Fixed hp_pin no value
Kees Cook (1):
selftests/seccomp: Enhance per-arch ptrace syscall skip tests
Koen Vandeputte (1):
ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment
Lorenzo Bianconi (1):
l2tp: remove l2specific_len dependency in l2tp_core
Lukas Wunner (1):
mmc: bcm2835: Fix DMA channel leak on probe error
Mathias Thore (1):
ucc_geth: Reset BQL queue when stopping device
Michael J. Ruhl (1):
IB/hfi1: Remove overly conservative VM_EXEC flag check
Naoya Horiguchi (1):
mm: hwpoison: use do_send_sig_info() instead of force_sig()
Paulo Alcantara (1):
cifs: Always resolve hostname before reconnecting
Pavel Shilovsky (1):
CIFS: Do not count -ENODATA as failure for query directory
Roger Quadros (1):
gpio: pcf857x: Fix interrupts on multiple instances
Shakeel Butt (1):
mm, oom: fix use-after-free in oom_kill_process
Stefan Wahren (1):
mmc: sdhci-iproc: handle mmc_of_parse() errors during probe
Tetsuo Handa (1):
oom, oom_reaper: do not enqueue same task twice
Toshiaki Makita (3):
virtio_net: Don't enable NAPI when interface is down
virtio_net: Don't call free_old_xmit_skbs for xdp_frames
virtio_net: Fix not restoring real_num_rx_queues
Trond Myklebust (1):
NFS: Fix up return value on fatal errors in nfs_page_async_flush()
Waiman Long (1):
fs/dcache: Fix incorrect nr_dentry_unused accounting in shrink_dcache_sb()
Xin Long (2):
sctp: improve the events for sctp stream adding
sctp: improve the events for sctp stream reset
Yohei Kanemaru (1):
ipv6: sr: clear IP6CB(skb) on SRH ip4ip6 encapsulation
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 97 +SUBLEVEL = 98 EXTRAVERSION = NAME = Petit Gorille
arch/arm/mach-cns3xxx/pcie.c +1 -1
@@ -83,7 +83,7 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus, }else /* remote PCI bus */ base = cnspci->cfg1_regs + ((busno &0xf ) <<20 ); -return base + (where &0xffc ) + (devfn <<12 ); +return base + where + (devfn <<12 ); } static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
arch/arm64/kernel/hibernate.c +3 -1
@@ -299,8 +299,10 @@ int swsusp_arch_suspend(void)dcache_clean_range (__idmap_text_start, __idmap_text_end);/* Clean kvm setup code to PoC? */ -if (el2_reset_needed ()) +if (el2_reset_needed ()) {dcache_clean_range (__hyp_idmap_text_start, __hyp_idmap_text_end); +dcache_clean_range (__hyp_text_start, __hyp_text_end); + }/* make the crash dump kernel image protected again */ crash_post_resume ();
arch/arm64/kernel/hyp-stub.S +2 -0
@@ -28,6 +28,8 @@ #include <asm/virt.h> .text + .pushsection .hyp.text, "ax" + .align 11 ENTRY(__hyp_stub_vectors)
arch/arm64/kernel/kaslr.c +1 -0
@@ -88,6 +88,7 @@ u64 __init kaslr_early_init(u64 dt_phys)* we end up running with module randomization disabled. */ module_alloc_base = (u64 )_etext -MODULES_VSIZE ; +__flush_dcache_area (&module_alloc_base,sizeof (module_alloc_base));/* * Try to map the FDT early. If this fails, we simply bail,
drivers/base/core.c +2 -0
@@ -1571,6 +1571,8 @@ static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir)return ;mutex_lock (&gdp_mutex); +if (!kobject_has_children (glue_dir)) +kobject_del (glue_dir);kobject_put (glue_dir);mutex_unlock (&gdp_mutex); }
drivers/gpio/gpio-altera-a10sr.c +3 -1
@@ -66,8 +66,10 @@ static int altr_a10sr_gpio_direction_input(struct gpio_chip *gc,static int altr_a10sr_gpio_direction_output (struct gpio_chip *gc,unsigned int nr,int value) { -if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI -ALTR_A10SR_LED_VALID_SHIFT )) +if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI -ALTR_A10SR_LED_VALID_SHIFT )) { +altr_a10sr_gpio_set (gc, nr, value);return 0 ; + }return -EINVAL ; }
drivers/gpio/gpio-pcf857x.c +12 -14
@@ -84,6 +84,7 @@ MODULE_DEVICE_TABLE(of, pcf857x_of_table);*/ struct pcf857x {struct gpio_chip chip; +struct irq_chip irqchip;struct i2c_client *client;struct mutex lock;/* protect 'out' */ unsigned out;/* software latch */
@@ -252,18 +253,6 @@ static void pcf857x_irq_bus_sync_unlock(struct irq_data *data)mutex_unlock (&gpio->lock); } -static struct irq_chip pcf857x_irq_chip = { - .name ="pcf857x" , - .irq_enable = pcf857x_irq_enable, - .irq_disable = pcf857x_irq_disable, - .irq_ack = noop, - .irq_mask = noop, - .irq_unmask = noop, - .irq_set_wake = pcf857x_irq_set_wake, - .irq_bus_lock = pcf857x_irq_bus_lock, - .irq_bus_sync_unlock = pcf857x_irq_bus_sync_unlock, -}; -/*-------------------------------------------------------------------------*/ static int pcf857x_probe(struct i2c_client *client,
@@ -376,8 +365,17 @@ static int pcf857x_probe(struct i2c_client *client,/* Enable irqchip if we have an interrupt */ if (client->irq) { + gpio->irqchip.name ="pcf857x" , + gpio->irqchip.irq_enable = pcf857x_irq_enable, + gpio->irqchip.irq_disable = pcf857x_irq_disable, + gpio->irqchip.irq_ack = noop, + gpio->irqchip.irq_mask = noop, + gpio->irqchip.irq_unmask = noop, + gpio->irqchip.irq_set_wake = pcf857x_irq_set_wake, + gpio->irqchip.irq_bus_lock = pcf857x_irq_bus_lock, + gpio->irqchip.irq_bus_sync_unlock = pcf857x_irq_bus_sync_unlock, status =gpiochip_irqchip_add_nested (&gpio->chip, - &pcf857x_irq_chip, + &gpio->irqchip,0 , handle_level_irq,IRQ_TYPE_NONE );if (status) {
@@ -392,7 +390,7 @@ static int pcf857x_probe(struct i2c_client *client,if (status) goto fail; -gpiochip_set_nested_irqchip (&gpio->chip, &pcf857x_irq_chip, +gpiochip_set_nested_irqchip (&gpio->chip, &gpio->irqchip, client->irq); gpio->irq_parent = client->irq; }
drivers/infiniband/hw/hfi1/file_ops.c +1 -1
@@ -605,7 +605,7 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma) vmf =1 ;break ;case STATUS : -if (flags & (unsigned long )(VM_WRITE |VM_EXEC )) { +if (flags &VM_WRITE ) { ret = -EPERM ; goto done; }
drivers/iommu/intel-iommu.c +1 -1
@@ -5210,7 +5210,7 @@ static void intel_iommu_put_resv_regions(struct device *dev,struct iommu_resv_region *entry, *next;list_for_each_entry_safe (entry, next, head, list) { -if (entry->type ==IOMMU_RESV_RESERVED ) +if (entry->type ==IOMMU_RESV_MSI )kfree (entry); } }
drivers/md/raid5-cache.c +22 -11
@@ -1942,12 +1942,14 @@ r5l_recovery_replay_one_stripe(struct r5conf *conf, }static struct stripe_head * -r5c_recovery_alloc_stripe (struct r5conf *conf, -sector_t stripe_sect) +r5c_recovery_alloc_stripe ( +struct r5conf *conf, +sector_t stripe_sect, +int noblock) {struct stripe_head *sh; - sh =raid5_get_active_stripe (conf, stripe_sect,0 ,1 ,0 ); + sh =raid5_get_active_stripe (conf, stripe_sect,0 , noblock,0 );if (!sh)return NULL ;/* no more stripe available */
@@ -2157,7 +2159,7 @@ r5c_recovery_analyze_meta_block(struct r5l_log *log, stripe_sect);if (!sh) { - sh =r5c_recovery_alloc_stripe (conf, stripe_sect); + sh =r5c_recovery_alloc_stripe (conf, stripe_sect,1 );/* * cannot get stripe from raid5_get_active_stripe * try replay some stripes
@@ -2166,20 +2168,29 @@ r5c_recovery_analyze_meta_block(struct r5l_log *log,r5c_recovery_replay_stripes ( cached_stripe_list, ctx); sh =r5c_recovery_alloc_stripe ( - conf, stripe_sect); + conf, stripe_sect,1 ); }if (!sh) { +int new_size = conf->min_nr_stripes *2 ;pr_debug ("md/raid:%s: Increasing stripe cache size to %d to recovery data on journal.\n" ,mdname (mddev), - conf->min_nr_stripes *2 ); -raid5_set_cache_size (mddev, - conf->min_nr_stripes *2 ); - sh =r5c_recovery_alloc_stripe (conf, - stripe_sect); + new_size); + ret =raid5_set_cache_size (mddev, new_size); +if (conf->min_nr_stripes <= new_size /2 ) { +pr_err ("md/raid:%s: Cannot increase cache size, ret=%d, new_size=%d, min_nr_stripes=%d, max_nr_stripes=%d\n" , +mdname (mddev), + ret, + new_size, + conf->min_nr_stripes, + conf->max_nr_stripes); +return -ENOMEM ; + } + sh =r5c_recovery_alloc_stripe ( + conf, stripe_sect,0 ); }if (!sh) {pr_err ("md/raid:%s: Cannot get enough stripes due to memory pressure. Recovery failed.\n" , -mdname (mddev)); +mdname (mddev));return -ENOMEM ; }list_add_tail (&sh->lru, cached_stripe_list);
drivers/md/raid5.c +6 -2
@@ -6336,6 +6336,7 @@ raid5_show_stripe_cache_size(struct mddev *mddev, char *page)int raid5_set_cache_size (struct mddev *mddev,int size) { +int result =0 ;struct r5conf *conf = mddev->private;if (size <=16 || size >32768 )
@@ -6352,11 +6353,14 @@ raid5_set_cache_size(struct mddev *mddev, int size)mutex_lock (&conf->cache_size_mutex);while (size > conf->max_nr_stripes) -if (!grow_one_stripe (conf,GFP_KERNEL )) +if (!grow_one_stripe (conf,GFP_KERNEL )) { + conf->min_nr_stripes = conf->max_nr_stripes; + result = -ENOMEM ;break ; + }mutex_unlock (&conf->cache_size_mutex); -return 0 ; +return result; }EXPORT_SYMBOL (raid5_set_cache_size);
drivers/mmc/host/bcm2835.c +2 -0
@@ -1427,6 +1427,8 @@ static int bcm2835_probe(struct platform_device *pdev) err:dev_dbg (dev,"%s -> err %d\n" , __func__, ret); +if (host->dma_chan_rxtx) +dma_release_channel (host->dma_chan_rxtx);mmc_free_host (mmc);return ret;
drivers/mmc/host/sdhci-iproc.c +4 -1
@@ -278,7 +278,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev) iproc_host->data = iproc_data; -mmc_of_parse (host->mmc); + ret =mmc_of_parse (host->mmc); +if (ret) + goto err; +sdhci_get_of_property (pdev); host->mmc->caps |= iproc_host->data->mmc_caps;
drivers/net/ethernet/freescale/ucc_geth.c +2 -0
@@ -1888,6 +1888,8 @@ static void ucc_geth_free_tx(struct ucc_geth_private *ugeth)u16 i, j;u8 __iomem *bd; +netdev_reset_queue (ugeth->ndev); + ug_info = ugeth->ug_info; uf_info = &ug_info->uf_info;
drivers/net/ethernet/mellanox/mlx4/fw.c +46 -29
111 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +8 -14
@@ -1126,13 +1126,6 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw,int err =0 ;u8 *smac_v; -if (vport->info.spoofchk && !is_valid_ether_addr (vport->info.mac)) { -mlx5_core_warn (esw->dev, -"vport[%d] configure ingress rules failed, illegal mac with spoofchk\n" , - vport->vport); -return -EPERM ; - } -esw_vport_cleanup_ingress_rules (esw, vport);if (!vport->info.vlan && !vport->info.qos && !vport->info.spoofchk) {
@@ -1614,7 +1607,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)int vport_num;int err; -if (!MLX5_ESWITCH_MANAGER (dev)) +if (!MLX5_VPORT_MANAGER (dev))return 0 ; esw_info(dev,
@@ -1687,7 +1680,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)void mlx5_eswitch_cleanup (struct mlx5_eswitch *esw) { -if (!esw || !MLX5_ESWITCH_MANAGER (esw->dev)) +if (!esw || !MLX5_VPORT_MANAGER (esw->dev))return ;esw_info (esw->dev,"cleanup\n" );
@@ -1734,13 +1727,10 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw,mutex_lock (&esw->state_lock); evport = &esw->vports[vport]; -if (evport->info.spoofchk && !is_valid_ether_addr (mac)) { +if (evport->info.spoofchk && !is_valid_ether_addr (mac))mlx5_core_warn (esw->dev, -"MAC invalidation is not allowed when spoofchk is on, vport(%d)\n" , +"Set invalid MAC while spoofchk is on, vport(%d)\n" , vport); - err = -EPERM ; - goto unlock; - } err =mlx5_modify_nic_vport_mac_address (esw->dev, vport, mac);if (err) {
@@ -1886,6 +1876,10 @@ int mlx5_eswitch_set_vport_spoofchk(struct mlx5_eswitch *esw, evport = &esw->vports[vport]; pschk = evport->info.spoofchk; evport->info.spoofchk = spoofchk; +if (pschk && !is_valid_ether_addr (evport->info.mac)) +mlx5_core_warn (esw->dev, +"Spoofchk in set while MAC is invalid, vport(%d)\n" , + evport->vport);if (evport->enabled && esw->mode ==SRIOV_LEGACY ) err =esw_vport_ingress_config (esw, evport);if (err)
drivers/net/ipvlan/ipvlan_main.c +3 -3
@@ -95,12 +95,12 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval) err =ipvlan_register_nf_hook (read_pnet (&port->pnet));if (!err) { mdev->l3mdev_ops = &ipvl_l3mdev_ops; - mdev->priv_flags |=IFF_L3MDEV_MASTER ; + mdev->priv_flags |=IFF_L3MDEV_RX_HANDLER ; }else goto fail; }else if (port->mode ==IPVLAN_MODE_L3S ) {/* Old mode was L3S */ - mdev->priv_flags &= ~IFF_L3MDEV_MASTER ; + mdev->priv_flags &= ~IFF_L3MDEV_RX_HANDLER ;ipvlan_unregister_nf_hook (read_pnet (&port->pnet)); mdev->l3mdev_ops =NULL ; }
@@ -172,7 +172,7 @@ static void ipvlan_port_destroy(struct net_device *dev) dev->priv_flags &= ~IFF_IPVLAN_MASTER ;if (port->mode ==IPVLAN_MODE_L3S ) { - dev->priv_flags &= ~IFF_L3MDEV_MASTER ; + dev->priv_flags &= ~IFF_L3MDEV_RX_HANDLER ;ipvlan_unregister_nf_hook (dev_net (dev)); dev->l3mdev_ops =NULL ; }
drivers/net/virtio_net.c +37 -18
103 lines not on this page · raw message
drivers/platform/x86/asus-nb-wmi.c +1 -2
@@ -433,8 +433,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0x30, { KEY_VOLUMEUP } }, { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, { KE_KEY, 0x32, { KEY_MUTE } }, - { KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */ - { KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */ + { KE_KEY, 0x35, { KEY_SCREENLOCK } }, { KE_KEY, 0x40, { KEY_PREVIOUSSONG } }, { KE_KEY, 0x41, { KEY_NEXTSONG } }, { KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
fs/cifs/connect.c +53 -0
71 lines not on this page · raw message
fs/cifs/smb2pdu.c +2 -2
@@ -3071,8 +3071,8 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, rsp->hdr.sync_hdr.Status == STATUS_NO_MORE_FILES) { srch_inf->endOfSearch = true; rc =0 ; - } -cifs_stats_fail_inc (tcon,SMB2_QUERY_DIRECTORY_HE ); + } else +cifs_stats_fail_inc (tcon ,SMB2_QUERY_DIRECTORY_HE ); goto qdir_exit; }
fs/dcache.c +1 -5
@@ -1183,15 +1183,11 @@ static enum lru_status dentry_lru_isolate_shrink(struct list_head *item,*/ void shrink_dcache_sb (struct super_block *sb) { -long freed; -do {LIST_HEAD (dispose); - freed =list_lru_walk (&sb->s_dentry_lru, +list_lru_walk (&sb->s_dentry_lru, dentry_lru_isolate_shrink, &dispose,1024 ); - -this_cpu_sub (nr_dentry_unused, freed);shrink_dentry_list (&dispose);cond_resched (); }while (list_lru_count (&sb->s_dentry_lru) >0 );
fs/gfs2/rgrp.c +1 -1
@@ -1695,9 +1695,9 @@ static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, goto next_iter; }if (ret == -E2BIG ) { - n += rbm->bii - initial_bii; rbm->bii =0 ; rbm->offset =0 ; + n += (rbm->bii - initial_bii); goto res_covered_end_of_rgrp; }return ret;
fs/nfs/write.c +5 -4
@@ -618,11 +618,12 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,nfs_set_page_writeback (page);WARN_ON_ONCE (test_bit (PG_CLEAN , &req->wb_flags)); - ret =0 ; + ret = req->wb_context->error;/* If there is a fatal error that covers this write, just exit */ -if (nfs_error_is_fatal_on_server (req->wb_context->error)) +if (nfs_error_is_fatal_on_server (ret)) goto out_launder; + ret =0 ;if (!nfs_pageio_add_request (pgio, req)) { ret = pgio->pg_error;/*
@@ -632,9 +633,9 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,nfs_context_set_write_error (req->wb_context, ret);if (nfs_error_is_fatal_on_server (ret)) goto out_launder; - } + }else + ret = -EAGAIN ;nfs_redirty_request (req); - ret = -EAGAIN ; }else nfs_add_stats (page_file_mapping (page)->host,NFSIOS_WRITEPAGES ,1 );
fs/notify/fsnotify.c +6 -2
@@ -158,9 +158,9 @@ int __fsnotify_parent(const struct path *path, struct dentry *dentry, __u32 mask parent =dget_parent (dentry); p_inode = parent->d_inode; -if (unlikely (!fsnotify_inode_watches_children (p_inode))) +if (unlikely (!fsnotify_inode_watches_children (p_inode))) {__fsnotify_update_child_dentry_flags (p_inode); -else if (p_inode->i_fsnotify_mask & mask) { + }else if (p_inode->i_fsnotify_mask & mask & ~FS_EVENT_ON_CHILD ) {struct name_snapshot name;/* we are notifying a parent so come up with the new mask which
@@ -264,6 +264,10 @@ int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,else mnt =NULL ; +/* An event "on child" is not intended for a mount mark */ +if (mask &FS_EVENT_ON_CHILD ) + mnt =NULL ; +/* * Optimization: srcu_read_lock() has a memory barrier which can * be expensive. It protects walking the *_fsnotify_marks lists.
include/linux/kobject.h +17 -0
@@ -117,6 +117,23 @@ extern void kobject_put(struct kobject *kobj);extern const void *kobject_namespace (struct kobject *kobj);extern char *kobject_get_path (struct kobject *kobj,gfp_t flag); +/** +* kobject_has_children - Returns whether a kobject has children. +* @kobj: the object to test +* +* This will return whether a kobject has other kobjects as children. +* +* It does NOT account for the presence of attribute files, only sub +* directories. It also assumes there is no concurrent addition or +* removal of such children, and thus relies on external locking. +*/ +static inline bool kobject_has_children (struct kobject *kobj) +{ +WARN_ON_ONCE (kref_read (&kobj->kref) ==0 ); + +return kobj->sd && kobj->sd->dir.subdirs; +} +struct kobj_type {void (*release)(struct kobject *kobj);const struct sysfs_ops *sysfs_ops;
include/linux/netdevice.h +8 -0
@@ -1356,6 +1356,7 @@ struct net_device_ops {* @IFF_PHONY_HEADROOM: the headroom value is controlled by an external * entity (i.e. the master device for bridged veth) * @IFF_MACSEC: device is a MACsec device +* @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device */ enum netdev_priv_flags {IFF_802_1Q_VLAN =1 <<0 ,
@@ -1386,6 +1387,7 @@ enum netdev_priv_flags {IFF_RXFH_CONFIGURED =1 <<25 ,IFF_PHONY_HEADROOM =1 <<26 ,IFF_MACSEC =1 <<27 , + IFF_L3MDEV_RX_HANDLER = 1<<28, };#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1415,6 +1417,7 @@ enum netdev_priv_flags {#define IFF_TEAM IFF_TEAM#define IFF_RXFH_CONFIGURED IFF_RXFH_CONFIGURED#define IFF_MACSEC IFF_MACSEC +#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER/** * struct net_device - The DEVICE structure.
@@ -4206,6 +4209,11 @@ static inline bool netif_supports_nofcs(struct net_device *dev)return dev->priv_flags &IFF_SUPP_NOFCS ; } +static inline bool netif_has_l3_rx_handler (const struct net_device *dev) +{ +return dev->priv_flags &IFF_L3MDEV_RX_HANDLER ; +} +static inline bool netif_is_l3_master (const struct net_device *dev) {return dev->priv_flags &IFF_L3MDEV_MASTER ;
include/linux/sched/coredump.h +1 -0
@@ -71,6 +71,7 @@ static inline int get_dumpable(struct mm_struct *mm)#define MMF_HUGE_ZERO_PAGE 23/* mm has ever used the global huge zero page */ #define MMF_DISABLE_THP 24/* disable THP for all VMAs */ #define MMF_OOM_VICTIM 25/* mm is the oom victim */ +#define MMF_OOM_REAP_QUEUED 26/* mm was queued for oom_reaper */ #define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP)#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\
include/net/l3mdev.h +2 -1
@@ -142,7 +142,8 @@ struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto)if (netif_is_l3_slave (skb->dev)) master =netdev_master_upper_dev_get_rcu (skb->dev); -else if (netif_is_l3_master (skb->dev)) +else if (netif_is_l3_master (skb->dev) || +netif_has_l3_rx_handler (skb->dev)) master = skb->dev;if (master && master->l3mdev_ops->l3mdev_l3_rcv)
kernel/exit.c +10 -2
@@ -557,12 +557,14 @@ static struct task_struct *find_alive_thread(struct task_struct *p)return NULL ; } -static struct task_struct *find_child_reaper (struct task_struct *father) +static struct task_struct *find_child_reaper (struct task_struct *father, +struct list_head *dead) __releases(&tasklist_lock) __acquires(&tasklist_lock) {struct pid_namespace *pid_ns =task_active_pid_ns (father);struct task_struct *reaper = pid_ns->child_reaper; +struct task_struct *p, *n;if (likely (reaper != father))return reaper;
@@ -578,6 +580,12 @@ static struct task_struct *find_child_reaper(struct task_struct *father)panic ("Attempted to kill init! exitcode=0x%08x\n" , father->signal->group_exit_code ?: father->exit_code); } + +list_for_each_entry_safe (p, n, dead, ptrace_entry) { +list_del_init (&p->ptrace_entry); +release_task (p); + } +zap_pid_ns_processes (pid_ns);write_lock_irq (&tasklist_lock);
@@ -667,7 +675,7 @@ static void forget_original_parent(struct task_struct *father,exit_ptrace (father, dead);/* Can drop and reacquire tasklist_lock */ - reaper =find_child_reaper (father); + reaper =find_child_reaper (father, dead);if (list_empty (&father->children))return ;
mm/memory-failure.c +2 -1
@@ -339,7 +339,8 @@ static void kill_procs(struct list_head *to_kill, int forcekill, int trapno,if (fail || tk->addr_valid ==0 ) {pr_err ("Memory failure: %#lx: forcibly killing %s:%d because of failure to unmap corrupted page\n" , pfn, tk->tsk->comm, tk->tsk->pid); -force_sig (SIGKILL , tk->tsk); +do_send_sig_info (SIGKILL ,SEND_SIG_PRIV , + tk->tsk,PIDTYPE_PID ); }/*
mm/migrate.c +5 -2
@@ -1106,10 +1106,13 @@ static int __unmap_and_move(struct page *page, struct page *newpage,* If migration is successful, decrease refcount of the newpage * which will not free the page because new page owner increased * refcounter. As well, if it is LRU page, add the page to LRU -* list in here. +* list in here. Use the old state of the isolated source page to +* determine if we migrated a LRU page. newpage was already unlocked +* and possibly modified by its owner - don't rely on the page +* state. */ if (rc ==MIGRATEPAGE_SUCCESS ) { -if (unlikely (__PageMovable (newpage))) +if (unlikely (!is_lru))put_page (newpage);else putback_lru_page (newpage);
mm/oom_kill.c +10 -2
@@ -628,8 +628,8 @@ static void wake_oom_reaper(struct task_struct *tsk)if (!oom_reaper_th)return ; -/* tsk is already queued? */ -if (tsk == oom_reaper_list || tsk->oom_reaper_list) +/* mm is already queued? */ +if (test_and_set_bit (MMF_OOM_REAP_QUEUED , &tsk->signal->oom_mm->flags))return ;get_task_struct (tsk);
@@ -870,6 +870,13 @@ static void oom_kill_process(struct oom_control *oc, const char *message)* still freeing memory. */ read_lock (&tasklist_lock); + +/* +* The task 'p' might have already exited before reaching here. The +* put_task_struct() will free task_struct 'p' while the loop still try +* to access the field of 'p', so, get an extra reference. +*/ +get_task_struct (p);for_each_thread (p, t) {list_for_each_entry (child, &t->children, sibling) {unsigned int child_points;
@@ -889,6 +896,7 @@ static void oom_kill_process(struct oom_control *oc, const char *message) } } } +put_task_struct (p);read_unlock (&tasklist_lock); p =find_lock_task_mm (victim);
net/core/dev.c +3 -0
@@ -7748,6 +7748,9 @@ int init_dummy_netdev(struct net_device *dev)set_bit (__LINK_STATE_PRESENT, &dev->state);set_bit (__LINK_STATE_START, &dev->state); +/* napi_busy_loop stats accounting wants this */ +dev_net_set (dev, &init_net); +/* Note : We dont allocate pcpu_refcnt for dummy devices, * because users of this 'device' dont need to change * its refcount.
net/ipv4/ip_fragment.c +1 -1
@@ -425,6 +425,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)* fragment. */ + err = -EINVAL ;/* Find out where to put this fragment. */ prev_tail = qp->q.fragments_tail;if (!prev_tail)
@@ -501,7 +502,6 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) discard_qp:inet_frag_kill (&qp->q); - err = -EINVAL ;__IP_INC_STATS (net,IPSTATS_MIB_REASM_OVERLAPS ); err:kfree_skb (skb);
net/ipv6/af_inet6.c +3 -0
@@ -370,6 +370,9 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) err = -EINVAL ; goto out_unlock; } + } + +if (sk->sk_bound_dev_if) { dev =dev_get_by_index_rcu (net, sk->sk_bound_dev_if);if (!dev) { err = -ENODEV ;
net/ipv6/seg6_iptunnel.c +2 -0
@@ -126,6 +126,8 @@ int seg6_do_srh_encap(struct sk_buff *skb, struct ipv6_sr_hdr *osrh, int proto) }else {ip6_flow_hdr (hdr,0 ,0 ); hdr->hop_limit =ip6_dst_hoplimit (skb_dst (skb)); + +memset (IP6CB (skb),0 ,sizeof (*IP6CB (skb))); } hdr->nexthdr =NEXTHDR_ROUTING ;
net/l2tp/l2tp_core.c +22 -21
89 lines not on this page · raw message
net/l2tp/l2tp_core.h +31 -0
@@ -320,6 +320,37 @@ do { \#define l2tp_session_dec_refcount (s) l2tp_session_dec_refcount_1(s)#endif +static inline int l2tp_get_l2specific_len (struct l2tp_session *session) +{ +switch (session->l2specific_type) { +case L2TP_L2SPECTYPE_DEFAULT : +return 4 ; +case L2TP_L2SPECTYPE_NONE : +default : +return 0 ; + } +} + +static inline int l2tp_v3_ensure_opt_in_linear (struct l2tp_session *session,struct sk_buff *skb, +unsigned char **ptr,unsigned char **optr) +{ +int opt_len = session->peer_cookie_len +l2tp_get_l2specific_len (session); + +if (opt_len >0 ) { +int off = *ptr - *optr; + +if (!pskb_may_pull (skb, off + opt_len)) +return -1 ; + +if (skb->data != *optr) { + *optr = skb->data; + *ptr = skb->data + off; + } + } + +return 0 ; +} +#define l2tp_printk (ptr, type, func, fmt, ...) \ do { \ if (((ptr)->debug) & (type)) \
net/l2tp/l2tp_ip.c +3 -0
@@ -165,6 +165,9 @@ static int l2tp_ip_recv(struct sk_buff *skb)print_hex_dump_bytes ("" ,DUMP_PREFIX_OFFSET , ptr, length); } +if (l2tp_v3_ensure_opt_in_linear (session, skb, &ptr, &optr)) + goto discard_sess; +l2tp_recv_common (session, skb, ptr, optr,0 , skb->len, tunnel->recv_payload_hook);l2tp_session_dec_refcount (session);
net/l2tp/l2tp_ip6.c +3 -0
@@ -178,6 +178,9 @@ static int l2tp_ip6_recv(struct sk_buff *skb)print_hex_dump_bytes ("" ,DUMP_PREFIX_OFFSET , ptr, length); } +if (l2tp_v3_ensure_opt_in_linear (session, skb, &ptr, &optr)) + goto discard_sess; +l2tp_recv_common (session, skb, ptr, optr,0 , skb->len, tunnel->recv_payload_hook);l2tp_session_dec_refcount (session);
net/netrom/nr_timer.c +10 -10
@@ -53,21 +53,21 @@ void nr_start_t1timer(struct sock *sk) {struct nr_sock *nr =nr_sk (sk); -mod_timer (&nr->t1timer, jiffies + nr->t1); +sk_reset_timer (sk, &nr->t1timer, jiffies + nr->t1); }void nr_start_t2timer (struct sock *sk) {struct nr_sock *nr =nr_sk (sk); -mod_timer (&nr->t2timer, jiffies + nr->t2); +sk_reset_timer (sk, &nr->t2timer, jiffies + nr->t2); }void nr_start_t4timer (struct sock *sk) {struct nr_sock *nr =nr_sk (sk); -mod_timer (&nr->t4timer, jiffies + nr->t4); +sk_reset_timer (sk, &nr->t4timer, jiffies + nr->t4); }void nr_start_idletimer (struct sock *sk)
@@ -75,37 +75,37 @@ void nr_start_idletimer(struct sock *sk)struct nr_sock *nr =nr_sk (sk);if (nr->idle >0 ) -mod_timer (&nr->idletimer, jiffies + nr->idle); +sk_reset_timer (sk, &nr->idletimer, jiffies + nr->idle); }void nr_start_heartbeat (struct sock *sk) { -mod_timer (&sk->sk_timer, jiffies +5 *HZ ); +sk_reset_timer (sk, &sk->sk_timer, jiffies +5 *HZ ); }void nr_stop_t1timer (struct sock *sk) { -del_timer (&nr_sk (sk)->t1timer); +sk_stop_timer (sk, &nr_sk (sk)->t1timer); }void nr_stop_t2timer (struct sock *sk) { -del_timer (&nr_sk (sk)->t2timer); +sk_stop_timer (sk, &nr_sk (sk)->t2timer); }void nr_stop_t4timer (struct sock *sk) { -del_timer (&nr_sk (sk)->t4timer); +sk_stop_timer (sk, &nr_sk (sk)->t4timer); }void nr_stop_idletimer (struct sock *sk) { -del_timer (&nr_sk (sk)->idletimer); +sk_stop_timer (sk, &nr_sk (sk)->idletimer); }void nr_stop_heartbeat (struct sock *sk) { -del_timer (&sk->sk_timer); +sk_stop_timer (sk, &sk->sk_timer); }int nr_t1timer_running (struct sock *sk)
net/rose/rose_route.c +5 -0
@@ -848,6 +848,7 @@ void rose_link_device_down(struct net_device *dev)/* * Route a frame to an appropriate AX.25 connection. +* A NULL ax25_cb indicates an internally generated frame. */ int rose_route_frame (struct sk_buff *skb,ax25_cb *ax25) {
@@ -865,6 +866,10 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)if (skb->len <ROSE_MIN_LEN )return res; + +if (!ax25) +return rose_loopback_queue (skb,NULL ); + frametype = skb->data[2 ]; lci = ((skb->data[0 ] <<8 ) &0xF00 ) + ((skb->data[1 ] <<0 ) &0x0FF ); if (frametype == ROSE_CALL_REQUEST &&
net/sctp/stream.c +27 -35
130 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +45 -33
108 lines not on this page · raw message
tools/testing/selftests/seccomp/seccomp_bpf.c +57 -15
139 lines not on this page · raw message