Linux 4.19.251
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.251 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/xen/p2m.c | 6 - arch/s390/crypto/arch_random.c | 111 --------------------- arch/s390/include/asm/archrandom.h | 21 ++-- arch/s390/kernel/setup.c | 5 drivers/block/xen-blkfront.c | 56 +++++++--- drivers/hwmon/ibmaem.c | 12 +- drivers/infiniband/hw/qedr/qedr.h | 1 drivers/infiniband/hw/qedr/verbs.c | 4 drivers/md/dm-raid.c | 34 +++--- drivers/md/raid5.c | 1 drivers/net/bonding/bond_3ad.c | 3 drivers/net/bonding/bond_alb.c | 2 drivers/net/caif/caif_virtio.c | 10 + drivers/net/dsa/bcm_sf2.c | 5 drivers/net/tun.c | 15 ++ drivers/net/usb/ax88179_178a.c | 101 ++++++++++++++----- drivers/net/usb/qmi_wwan.c | 2 drivers/net/usb/usbnet.c | 4 drivers/net/virtio_net.c | 8 + drivers/net/xen-netfront.c | 52 +++++++++ drivers/nfc/nfcmrvl/i2c.c | 6 - drivers/nfc/nfcmrvl/spi.c | 6 - drivers/nfc/nxp-nci/i2c.c | 3 drivers/nvdimm/bus.c | 4 drivers/xen/gntdev-common.h | 8 + drivers/xen/gntdev.c | 146 +++++++++++++++++++--------- net/ipv6/seg6_hmac.c | 1 net/ipv6/sit.c | 10 - net/netfilter/nft_set_hash.c | 2 net/rose/rose_timer.c | 34 +++--- net/sunrpc/xdr.c | 2 tools/testing/selftests/net/udpgso_bench.sh | 2 33 files changed, 405 insertions(+), 274 deletions(-)
Carlo Lobrano (1):
net: usb: qmi_wwan: add Telit 0x1060 composition
Chris Ye (1):
nvdimm: Fix badblocks clear off-by-one error
Chuck Lever (1):
SUNRPC: Fix READ_PLUS crasher
Daniele Palmas (1):
net: usb: qmi_wwan: add Telit 0x1070 composition
Demi Marie Obenour (1):
xen/gntdev: Avoid blocking in unmap_grant_pages()
Dimitris Michailidis (1):
selftests/net: pass ipv6_args to udpgso_bench's IPv6 TCP test
Doug Berger (1):
net: dsa: bcm_sf2: force pause link settings
Duoming Zhou (1):
net: rose: fix UAF bugs caused by timer handler
Eric Dumazet (1):
net: bonding: fix possible NULL deref in rlb code
Greg Kroah-Hartman (1):
Linux 4.19.251
Heinz Mauelshagen (1):
dm raid: fix accesses beyond end of raid member array
Jakub Kicinski (3):
net: tun: unlink NAPI from device on destruction
net: tun: stop NAPI when detaching queues
net: tun: avoid disabling NAPI twice
Jason A. Donenfeld (1):
s390/archrandom: simplify back to earlier design and initialize earlier
Jason Wang (2):
virtio-net: fix race between ndo_open() and virtio_device_ready()
caif_virtio: fix race between virtio_device_ready() and ndo_open()
Jose Alonso (1):
net: usb: ax88179_178a: Fix packet receiving
Kamal Heib (1):
RDMA/qedr: Fix reporting QP timeout attribute
Krzysztof Kozlowski (1):
nfc: nfcmrvl: Fix irq_of_parse_and_map() return value
Michael Walle (1):
NFC: nxp-nci: Don't issue a zero length i2c_master_read()
Mikulas Patocka (1):
dm raid: fix KASAN warning in raid5_add_disks
Oleksandr Tyshchenko (1):
xen/arm: Fix race in RB-tree based P2M accounting
Oliver Neukum (1):
usbnet: fix memory allocation in helpers
Pablo Neira Ayuso (1):
netfilter: nft_dynset: restore set element counter when failing to update
Roger Pau Monne (4):
xen/blkfront: fix leaking data in shared pages xen/netfront: fix leaking data in shared pages xen/netfront: force data bouncing when backend is untrusted xen/blkfront: force data bouncing when backend is untrusted
Yang Yingliang (1):
hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails
Yevhen Orlov (1):
net: bonding: fix use-after-free after 802.3ad slave unbind
YueHaibing (1):
net: ipv6: unexport __init-annotated seg6_hmac_net_init()
katrinzhou (1):
ipv6/sit: fix ipip6_tunnel_get_prl return value
kernel test robot (1):
sit: use min
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 250 +SUBLEVEL = 251 EXTRAVERSION = NAME = "People's Front"
arch/arm/xen/p2m.c +4 -2
@@ -61,11 +61,12 @@ static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new)unsigned long __pfn_to_mfn (unsigned long pfn) { -struct rb_node *n = phys_to_mach.rb_node; +struct rb_node *n;struct xen_p2m_entry *entry;unsigned long irqflags;read_lock_irqsave (&p2m_lock, irqflags); + n = phys_to_mach.rb_node;while (n) { entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); if (entry->pfn <= pfn &&
@@ -151,10 +152,11 @@ bool __set_phys_to_machine_multi(unsigned long pfn,int rc;unsigned long irqflags;struct xen_p2m_entry *p2m_entry; -struct rb_node *n = phys_to_mach.rb_node; +struct rb_node *n;if (mfn ==INVALID_P2M_ENTRY ) {write_lock_irqsave (&p2m_lock, irqflags); + n = phys_to_mach.rb_node;while (n) { p2m_entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); if (p2m_entry->pfn <= pfn &&
arch/s390/crypto/arch_random.c +1 -110
127 lines not on this page · raw message
arch/s390/include/asm/archrandom.h +12 -9
@@ -2,7 +2,7 @@/* * Kernel interface for the s390 arch_random_* functions * -* Copyright IBM Corp. 2017 +* Copyright IBM Corp. 2017, 2020 * * Author: Harald Freudenberger <[email protected]> *
@@ -15,34 +15,37 @@#include <linux/static_key.h> #include <linux/atomic.h> +#include <asm/cpacf.h> DECLARE_STATIC_KEY_FALSE (s390_arch_random_available);extern atomic64_t s390_arch_random_counter; -bool s390_arch_random_generate (u8 *buf,unsigned int nbytes); - -static inline bool arch_get_random_long (unsigned long *v) +static inline bool __must_check arch_get_random_long (unsigned long *v) {return false; } -static inline bool arch_get_random_int (unsigned int *v) +static inline bool __must_check arch_get_random_int (unsigned int *v) {return false; } -static inline bool arch_get_random_seed_long (unsigned long *v) +static inline bool __must_check arch_get_random_seed_long (unsigned long *v) {if (static_branch_likely (&s390_arch_random_available)) { -return s390_arch_random_generate ((u8 *)v,sizeof (*v)); +cpacf_trng (NULL ,0 , (u8 *)v,sizeof (*v)); +atomic64_add (sizeof (*v), &s390_arch_random_counter); +return true; }return false; } -static inline bool arch_get_random_seed_int (unsigned int *v) +static inline bool __must_check arch_get_random_seed_int (unsigned int *v) {if (static_branch_likely (&s390_arch_random_available)) { -return s390_arch_random_generate ((u8 *)v,sizeof (*v)); +cpacf_trng (NULL ,0 , (u8 *)v,sizeof (*v)); +atomic64_add (sizeof (*v), &s390_arch_random_counter); +return true; }return false; }
arch/s390/kernel/setup.c +5 -0
@@ -851,6 +851,11 @@ static void __init setup_randomness(void)if (stsi (vmms,3 ,2 ,2 ) ==0 && vmms->count)add_device_randomness (&vmms->vm,sizeof (vmms->vm[0 ]) * vmms->count);memblock_free ((unsigned long ) vmms,PAGE_SIZE ); + +#ifdef CONFIG_ARCH_RANDOM +if (cpacf_query_func (CPACF_PRNO ,CPACF_PRNO_TRNG )) +static_branch_enable (&s390_arch_random_available); +#endif }/*
drivers/block/xen-blkfront.c +38 -18
174 lines not on this page · raw message
drivers/hwmon/ibmaem.c +8 -4
@@ -563,7 +563,7 @@ static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle) res =platform_device_add (data->pdev);if (res) - goto ipmi_err; + goto dev_add_err;platform_set_drvdata (data->pdev, data);
@@ -611,7 +611,9 @@ static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle)ipmi_destroy_user (data->ipmi.user); ipmi_err:platform_set_drvdata (data->pdev,NULL ); -platform_device_unregister (data->pdev); +platform_device_del (data->pdev); +dev_add_err: +platform_device_put (data->pdev); dev_err:ida_simple_remove (&aem_ida, data->id); id_err:
@@ -703,7 +705,7 @@ static int aem_init_aem2_inst(struct aem_ipmi_data *probe, res =platform_device_add (data->pdev);if (res) - goto ipmi_err; + goto dev_add_err;platform_set_drvdata (data->pdev, data);
@@ -751,7 +753,9 @@ static int aem_init_aem2_inst(struct aem_ipmi_data *probe,ipmi_destroy_user (data->ipmi.user); ipmi_err:platform_set_drvdata (data->pdev,NULL ); -platform_device_unregister (data->pdev); +platform_device_del (data->pdev); +dev_add_err: +platform_device_put (data->pdev); dev_err:ida_simple_remove (&aem_ida, data->id); id_err:
drivers/infiniband/hw/qedr/qedr.h +1 -0
@@ -407,6 +407,7 @@ struct qedr_qp {u32 sq_psn;u32 qkey;u32 dest_qp_num; +u8 timeout;/* Relevant to qps created from kernel space only (ULPs) */ u8 prev_wqe_size;
drivers/infiniband/hw/qedr/verbs.c +3 -1
@@ -2376,6 +2376,8 @@ int qedr_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,1 <<max_t (int, attr->timeout -8 ,0 ); else qp_params.ack_timeout = 0; + + qp->timeout = attr->timeout; }if (attr_mask &IB_QP_RETRY_CNT ) {
@@ -2535,7 +2537,7 @@ int qedr_query_qp(struct ib_qp *ibqp,rdma_ah_set_dgid_raw (&qp_attr->ah_attr, ¶ms.dgid.bytes[0 ]);rdma_ah_set_port_num (&qp_attr->ah_attr,1 );rdma_ah_set_sl (&qp_attr->ah_attr,0 ); - qp_attr->timeout = params.timeout; + qp_attr->timeout = qp->timeout; qp_attr->rnr_retry = params.rnr_retry; qp_attr->retry_cnt = params.retry_cnt; qp_attr->min_rnr_timer = params.min_rnr_nak_timer;
drivers/md/dm-raid.c +18 -16
@@ -998,12 +998,13 @@ static int validate_region_size(struct raid_set *rs, unsigned long region_size)static int validate_raid_redundancy (struct raid_set *rs) {unsigned int i, rebuild_cnt =0 ; -unsigned int rebuilds_per_group =0 , copies; +unsigned int rebuilds_per_group =0 , copies, raid_disks;unsigned int group_size, last_group_start; -for (i =0 ; i < rs->md.raid_disks; i++) -if (!test_bit (In_sync, &rs->dev[i].rdev.flags) || - !rs->dev[i].rdev.sb_page) +for (i =0 ; i < rs->raid_disks; i++) +if (!test_bit (FirstUse, &rs->dev[i].rdev.flags) && + ((!test_bit (In_sync, &rs->dev[i].rdev.flags) || + !rs->dev[i].rdev.sb_page))) rebuild_cnt++;switch (rs->md.level) {
@@ -1043,8 +1044,9 @@ static int validate_raid_redundancy(struct raid_set *rs)* A A B B C * C D D E E */ + raid_disks =min (rs->raid_disks, rs->md.raid_disks);if (__is_raid10_near (rs->md.new_layout)) { -for (i =0 ; i < rs->md.raid_disks; i++) { +for (i =0 ; i < raid_disks; i++) {if (!(i % copies)) rebuilds_per_group =0 ; if ((!rs->dev[i].rdev.sb_page ||
@@ -1067,10 +1069,10 @@ static int validate_raid_redundancy(struct raid_set *rs)* results in the need to treat the last (potentially larger) * set differently. */ - group_size = (rs->md.raid_disks / copies); - last_group_start = (rs->md.raid_disks / group_size) -1 ; + group_size = (raid_disks / copies); + last_group_start = (raid_disks / group_size) -1 ; last_group_start *= group_size; -for (i =0 ; i < rs->md.raid_disks; i++) { +for (i =0 ; i < raid_disks; i++) {if (!(i % copies) && !(i > last_group_start)) rebuilds_per_group =0 ; if ((!rs->dev[i].rdev.sb_page ||
@@ -1585,7 +1587,7 @@ static sector_t __rdev_sectors(struct raid_set *rs) {int i; -for (i =0 ; i < rs->md.raid_disks; i++) { +for (i =0 ; i < rs->raid_disks; i++) {struct md_rdev *rdev = &rs->dev[i].rdev; if (!test_bit(Journal, &rdev->flags) &&
@@ -3751,13 +3753,13 @@ static int raid_iterate_devices(struct dm_target *ti,unsigned int i;int r =0 ; -for (i =0 ; !r && i < rs->md.raid_disks; i++) -if (rs->dev[i].data_dev) - r =fn (ti, - rs->dev[i].data_dev, -0 ,/* No offset on data devs */ - rs->md.dev_sectors, - data); +for (i =0 ; !r && i < rs->raid_disks; i++) { +if (rs->dev[i].data_dev) { + r =fn (ti, rs->dev[i].data_dev, +0 ,/* No offset on data devs */ + rs->md.dev_sectors, data); + } + }return r; }
drivers/md/raid5.c +1 -0
@@ -7716,6 +7716,7 @@ static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev)*/ if (rdev->saved_raid_disk >=0 && rdev->saved_raid_disk >= first && + rdev->saved_raid_disk <= last && conf->disks[rdev->saved_raid_disk].rdev ==NULL ) first = rdev->saved_raid_disk;
drivers/net/bonding/bond_3ad.c +2 -1
@@ -2199,7 +2199,8 @@ void bond_3ad_unbind_slave(struct slave *slave) temp_aggregator->num_of_ports--;if (__agg_active_ports (temp_aggregator) ==0 ) { select_new_active_agg = temp_aggregator->is_active; -ad_clear_agg (temp_aggregator); +if (temp_aggregator->num_of_ports ==0 ) +ad_clear_agg (temp_aggregator);if (select_new_active_agg) {netdev_info (bond->dev,"Removing an active aggregator\n" );/* select new active aggregator */
drivers/net/bonding/bond_alb.c +1 -1
@@ -1292,12 +1292,12 @@ int bond_alb_initialize(struct bonding *bond, int rlb_enabled)return res;if (rlb_enabled) { - bond->alb_info.rlb_enabled =1 ; res =rlb_initialize (bond);if (res) {tlb_deinitialize (bond);return res; } + bond->alb_info.rlb_enabled =1 ; }else { bond->alb_info.rlb_enabled =0 ; }
drivers/net/caif/caif_virtio.c +9 -1
@@ -727,13 +727,21 @@ static int cfv_probe(struct virtio_device *vdev)/* Carrier is off until netdevice is opened */ netif_carrier_off (netdev); +/* serialize netdev register + virtio_device_ready() with ndo_open() */ +rtnl_lock (); +/* register Netdev */ - err =register_netdev (netdev); + err =register_netdevice (netdev);if (err) { +rtnl_unlock ();dev_err (&vdev->dev,"Unable to register netdev (%d)\n" , err); goto err; } +virtio_device_ready (vdev); + +rtnl_unlock (); +debugfs_init (cfv);return 0 ;
drivers/net/dsa/bcm_sf2.c +5 -0
@@ -599,6 +599,11 @@ static void bcm_sf2_sw_mac_config(struct dsa_switch *ds, int port, reg |=LINK_STS ;if (state->duplex ==DUPLEX_FULL ) reg |=DUPLX_MODE ; +if (state->pause &MLO_PAUSE_TXRX_MASK ) { +if (state->pause &MLO_PAUSE_TX ) + reg |=TXFLOW_CNTL ; + reg |=RXFLOW_CNTL ; + }core_writel (priv, reg, offset); }
drivers/net/tun.c +13 -2
@@ -333,6 +333,12 @@ static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile, } } +static void tun_napi_enable (struct tun_file *tfile) +{ +if (tfile->napi_enabled) +napi_enable (&tfile->napi); +} +static void tun_napi_disable (struct tun_file *tfile) {if (tfile->napi_enabled)
@@ -704,7 +710,8 @@ static void __tun_detach(struct tun_file *tfile, bool clean) tun =rtnl_dereference (tfile->tun);if (tun && clean) { -tun_napi_disable (tfile); +if (!tfile->detached) +tun_napi_disable (tfile);tun_napi_del (tfile); }
@@ -723,8 +730,10 @@ static void __tun_detach(struct tun_file *tfile, bool clean)if (clean) {RCU_INIT_POINTER (tfile->tun,NULL );sock_put (&tfile->sk); - }else + }else {tun_disable_queue (tun, tfile); +tun_napi_disable (tfile); + }synchronize_net ();tun_flow_delete_by_queue (tun, tun->numqueues +1 );
@@ -797,6 +806,7 @@ static void tun_detach_all(struct net_device *dev)sock_put (&tfile->sk); }list_for_each_entry_safe (tfile, tmp, &tun->disabled, next) { +tun_napi_del (tfile);tun_enable_queue (tfile);tun_queue_purge (tfile);xdp_rxq_info_unreg (&tfile->xdp_rxq);
@@ -877,6 +887,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file,if (tfile->detached) {tun_enable_queue (tfile); +tun_napi_enable (tfile); }else {sock_hold (&tfile->sk);tun_napi_init (tun, tfile, napi, napi_frags);
drivers/net/usb/ax88179_178a.c +76 -25
133 lines not on this page · raw message
drivers/net/usb/qmi_wwan.c +2 -0
@@ -1318,6 +1318,8 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x1bc7, 0x1031, 3)}, /* Telit LE910C1-EUX */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1040, 2)}, /* Telit LE922A */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x1060, 2)}, /* Telit LN920 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x1070, 2)}, /* Telit FN990 */ {QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */ {QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
drivers/net/usb/usbnet.c +2 -2
@@ -1998,7 +1998,7 @@ static int __usbnet_read_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, cmd, reqtype, value, index, size);if (size) { - buf =kmalloc (size,GFP_KERNEL ); + buf =kmalloc (size,GFP_NOIO );if (!buf) goto out; }
@@ -2030,7 +2030,7 @@ static int __usbnet_write_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, cmd, reqtype, value, index, size);if (data) { - buf =kmemdup (data, size,GFP_KERNEL ); + buf =kmemdup (data, size,GFP_NOIO );if (!buf) goto out; }else {
drivers/net/virtio_net.c +7 -1
@@ -3105,14 +3105,20 @@ static int virtnet_probe(struct virtio_device *vdev) } } - err =register_netdev (dev); +/* serialize netdev register + virtio_device_ready() with ndo_open() */ +rtnl_lock (); + + err =register_netdevice (dev);if (err) {pr_debug ("virtio_net: registering device failed\n" ); +rtnl_unlock (); goto free_failover; }virtio_device_ready (vdev); +rtnl_unlock (); + err =virtnet_cpu_notif_add (vi);if (err) {pr_debug ("virtio_net: registering cpu notifier failed\n" );
drivers/net/xen-netfront.c +49 -3
95 lines not on this page · raw message
drivers/nfc/nfcmrvl/i2c.c +3 -3
@@ -186,9 +186,9 @@ static int nfcmrvl_i2c_parse_dt(struct device_node *node, pdata->irq_polarity =IRQF_TRIGGER_RISING ; ret =irq_of_parse_and_map (node,0 ); -if (ret <0 ) { -pr_err ("Unable to get irq, error: %d\n" , ret); -return ret; +if (!ret) { +pr_err ("Unable to get irq\n" ); +return -EINVAL ; } pdata->irq = ret;
drivers/nfc/nfcmrvl/spi.c +3 -3
@@ -129,9 +129,9 @@ static int nfcmrvl_spi_parse_dt(struct device_node *node, } ret =irq_of_parse_and_map (node,0 ); -if (ret <0 ) { -pr_err ("Unable to get irq, error: %d\n" , ret); -return ret; +if (!ret) { +pr_err ("Unable to get irq\n" ); +return -EINVAL ; } pdata->irq = ret;
drivers/nfc/nxp-nci/i2c.c +3 -0
@@ -178,6 +178,9 @@ static int nxp_nci_i2c_nci_read(struct nxp_nci_i2c_phy *phy,skb_put_data (*skb, (void *)&header,NCI_CTRL_HDR_SIZE ); +if (!header.plen) +return 0 ; + r =i2c_master_recv (client,skb_put (*skb, header.plen), header.plen);if (r != header.plen) { nfc_err(&client->dev,
drivers/nvdimm/bus.c +2 -2
@@ -196,8 +196,8 @@ static int nvdimm_clear_badblocks_region(struct device *dev, void *data) ndr_end = nd_region->ndr_start + nd_region->ndr_size -1 ;/* make sure we are in the region */ -if (ctx->phys < nd_region->ndr_start - || (ctx->phys + ctx->cleared) > ndr_end) +if (ctx->phys < nd_region->ndr_start || + (ctx->phys + ctx->cleared -1 ) > ndr_end)return 0 ; sector = (ctx->phys - nd_region->ndr_start) /512 ;
drivers/xen/gntdev-common.h +8 -0
@@ -15,6 +15,8 @@#include <linux/mman.h> #include <linux/mmu_notifier.h> #include <linux/types.h> +#include <xen/interface/event_channel.h> +#include <xen/grant_table.h> struct gntdev_dmabuf_priv ;
@@ -61,6 +63,7 @@ struct gntdev_grant_map {struct gnttab_unmap_grant_ref *unmap_ops;struct gnttab_map_grant_ref *kmap_ops;struct gnttab_unmap_grant_ref *kunmap_ops; +bool *being_removed;struct page **pages;unsigned long pages_vm_start;
@@ -78,6 +81,11 @@ struct gntdev_grant_map {/* Needed to avoid allocation in gnttab_dma_free_pages(). */ xen_pfn_t *frames;#endif + +/* Number of live grants */ +atomic_t live_grants; +/* Needed to avoid allocation in __unmap_grant_pages */ +struct gntab_unmap_queue_data unmap_data; }; struct gntdev_grant_map *gntdev_alloc_map(struct gntdev_priv *priv, int count,
drivers/xen/gntdev.c +101 -45
275 lines not on this page · raw message
net/ipv6/seg6_hmac.c +0 -1
@@ -415,7 +415,6 @@ int __net_init seg6_hmac_net_init(struct net *net)return 0 ; } -EXPORT_SYMBOL (seg6_hmac_net_init);void seg6_hmac_exit (void ) {
net/ipv6/sit.c +4 -6
@@ -314,9 +314,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t, kcalloc(cmax, sizeof(*kp), GFP_KERNEL | __GFP_NOWARN) : NULL; -rcu_read_lock (); - - ca = t->prl_count < cmax ? t->prl_count : cmax; + ca =min (t->prl_count, cmax);if (!kp) {/* We don't try hard to allocate much memory for
@@ -331,7 +329,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t, } } - c =0 ; +rcu_read_lock ();for_each_prl_rcu (t->prl) {if (c >= cmax)break ;
@@ -343,7 +341,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,if (kprl.addr !=htonl (INADDR_ANY ))break ; } -out: +rcu_read_unlock (); len =sizeof (*kp) * c;
@@ -352,7 +350,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t, ret = -EFAULT ;kfree (kp); - +out:return ret; }
net/netfilter/nft_set_hash.c +2 -0
@@ -145,6 +145,7 @@ static bool nft_rhash_update(struct nft_set *set, const u32 *key,/* Another cpu may race to insert the element with the same key */ if (prev) {nft_set_elem_destroy (set, he, true); +atomic_dec (&set->nelems); he = prev; }
@@ -154,6 +155,7 @@ static bool nft_rhash_update(struct nft_set *set, const u32 *key, err2:nft_set_elem_destroy (set, he, true); +atomic_dec (&set->nelems); err1:return false; }
net/rose/rose_timer.c +19 -15
@@ -34,89 +34,89 @@ static void rose_idletimer_expiry(struct timer_list *);void rose_start_heartbeat (struct sock *sk) { -del_timer (&sk->sk_timer); +sk_stop_timer (sk, &sk->sk_timer); sk->sk_timer.function = rose_heartbeat_expiry; sk->sk_timer.expires = jiffies +5 *HZ ; -add_timer (&sk->sk_timer); +sk_reset_timer (sk, &sk->sk_timer, sk->sk_timer.expires); }void rose_start_t1timer (struct sock *sk) {struct rose_sock *rose =rose_sk (sk); -del_timer (&rose->timer); +sk_stop_timer (sk, &rose->timer); rose->timer.function = rose_timer_expiry; rose->timer.expires = jiffies + rose->t1; -add_timer (&rose->timer); +sk_reset_timer (sk, &rose->timer, rose->timer.expires); }void rose_start_t2timer (struct sock *sk) {struct rose_sock *rose =rose_sk (sk); -del_timer (&rose->timer); +sk_stop_timer (sk, &rose->timer); rose->timer.function = rose_timer_expiry; rose->timer.expires = jiffies + rose->t2; -add_timer (&rose->timer); +sk_reset_timer (sk, &rose->timer, rose->timer.expires); }void rose_start_t3timer (struct sock *sk) {struct rose_sock *rose =rose_sk (sk); -del_timer (&rose->timer); +sk_stop_timer (sk, &rose->timer); rose->timer.function = rose_timer_expiry; rose->timer.expires = jiffies + rose->t3; -add_timer (&rose->timer); +sk_reset_timer (sk, &rose->timer, rose->timer.expires); }void rose_start_hbtimer (struct sock *sk) {struct rose_sock *rose =rose_sk (sk); -del_timer (&rose->timer); +sk_stop_timer (sk, &rose->timer); rose->timer.function = rose_timer_expiry; rose->timer.expires = jiffies + rose->hb; -add_timer (&rose->timer); +sk_reset_timer (sk, &rose->timer, rose->timer.expires); }void rose_start_idletimer (struct sock *sk) {struct rose_sock *rose =rose_sk (sk); -del_timer (&rose->idletimer); +sk_stop_timer (sk, &rose->idletimer);if (rose->idle >0 ) { rose->idletimer.function = rose_idletimer_expiry; rose->idletimer.expires = jiffies + rose->idle; -add_timer (&rose->idletimer); +sk_reset_timer (sk, &rose->idletimer, rose->idletimer.expires); } }void rose_stop_heartbeat (struct sock *sk) { -del_timer (&sk->sk_timer); +sk_stop_timer (sk, &sk->sk_timer); }void rose_stop_timer (struct sock *sk) { -del_timer (&rose_sk (sk)->timer); +sk_stop_timer (sk, &rose_sk (sk)->timer); }void rose_stop_idletimer (struct sock *sk) { -del_timer (&rose_sk (sk)->idletimer); +sk_stop_timer (sk, &rose_sk (sk)->idletimer); }static void rose_heartbeat_expiry (struct timer_list *t)
@@ -133,6 +133,7 @@ static void rose_heartbeat_expiry(struct timer_list *t) (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) {bh_unlock_sock (sk);rose_destroy_socket (sk); +sock_put (sk);return ; }break ;
@@ -155,6 +156,7 @@ static void rose_heartbeat_expiry(struct timer_list *t)rose_start_heartbeat (sk);bh_unlock_sock (sk); +sock_put (sk); }static void rose_timer_expiry (struct timer_list *t)
@@ -184,6 +186,7 @@ static void rose_timer_expiry(struct timer_list *t)break ; }bh_unlock_sock (sk); +sock_put (sk); }static void rose_idletimer_expiry (struct timer_list *t)
@@ -208,4 +211,5 @@ static void rose_idletimer_expiry(struct timer_list *t)sock_set_flag (sk,SOCK_DEAD ); }bh_unlock_sock (sk); +sock_put (sk); }
net/sunrpc/xdr.c +1 -1
@@ -544,7 +544,7 @@ static __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,*/ xdr->p = (void *)p + frag2bytes; space_left = xdr->buf->buflen - xdr->buf->len; -if (space_left - nbytes >=PAGE_SIZE ) +if (space_left - frag1bytes >=PAGE_SIZE ) xdr->end = (void *)p +PAGE_SIZE ;else xdr->end = (void *)p + space_left - frag1bytes;
tools/testing/selftests/net/udpgso_bench.sh +1 -1
@@ -57,7 +57,7 @@ run_all() { run_udp "${ipv4_args}" echo "ipv6" - run_tcp "${ipv4_args}" + run_tcp "${ipv6_args}" run_udp "${ipv6_args}" }