Linux 4.19.265
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.265 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
------------
Documentation/trace/histogram.rst | 2 Makefile | 2 arch/parisc/include/asm/hardware.h | 12 - arch/parisc/kernel/drivers.c | 14 -- arch/x86/kvm/cpuid.c | 1 arch/x86/kvm/emulate.c | 102 +++++++++++----- block/bfq-iosched.c | 4 drivers/ata/pata_legacy.c | 5 drivers/firmware/efi/efi.c | 2 drivers/hid/hid-ids.h | 1 drivers/hid/hid-quirks.c | 1 drivers/hid/hid-saitek.c | 2 drivers/i2c/busses/i2c-xiic.c | 1 drivers/infiniband/hw/qedr/main.c | 9 + drivers/isdn/hardware/mISDN/netjet.c | 2 drivers/isdn/mISDN/core.c | 5 drivers/media/dvb-frontends/drxk_hard.c | 2 drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 2 drivers/media/platform/s5p-cec/s5p_cec.c | 2 drivers/net/dsa/dsa_loop.c | 25 ++- drivers/net/ethernet/freescale/fec_main.c | 4 drivers/net/phy/mdio_bus.c | 2 drivers/net/tun.c | 3 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 4 drivers/nfc/nfcmrvl/i2c.c | 7 - drivers/nfc/s3fwrn5/core.c | 8 - drivers/parisc/iosapic.c | 1 drivers/tty/serial/8250/Kconfig | 2 fs/btrfs/backref.c | 36 ++--- fs/btrfs/export.c | 2 fs/btrfs/export.h | 2 fs/btrfs/tests/qgroup-tests.c | 20 ++- fs/ext4/migrate.c | 3 fs/nfs/nfs4client.c | 1 fs/nfs/nfs4state.c | 2 include/linux/bits.h | 17 +- include/linux/efi.h | 2 include/net/protocol.h | 4 include/net/tcp.h | 2 include/net/udp.h | 1 kernel/kprobes.c | 5 net/bluetooth/l2cap_core.c | 52 ++++++-- net/core/neighbour.c | 2 net/ipv4/af_inet.c | 14 -- net/ipv4/ip_input.c | 32 +++-- net/ipv4/sysctl_net_ipv4.c | 59 --------- net/ipv6/ip6_input.c | 23 ++- net/ipv6/route.c | 14 +- net/ipv6/tcp_ipv6.c | 9 - net/ipv6/udp.c | 9 - net/netfilter/ipvs/ip_vs_app.c | 10 + net/netfilter/ipvs/ip_vs_conn.c | 30 +++- net/rose/rose_link.c | 3 net/sched/sch_red.c | 4 security/commoncap.c | 6 sound/usb/quirks-table.h | 58 +++++++++ sound/usb/quirks.c | 1 57 files changed, 414 insertions(+), 236 deletions(-)
Ard Biesheuvel (1):
efi: random: reduce seed size to 32 bytes
Chen Zhongjin (2):
net: dsa: Fix possible memory leaks in dsa_loop_init() net, neigh: Fix null-ptr-deref in neigh_table_clear()
Dan Carpenter (2):
RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
net: sched: Fix use after free in red_enqueue()
David Sterba (1):
btrfs: fix type of parameter generation in btrfs_get_dentry
Dokyung Song (1):
wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker()
Filipe Manana (2):
btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
btrfs: fix ulist leaks in error paths of qgroup self tests
Gaosheng Cui (2):
net: mdio: fix undefined behavior in bit shift for __mdiobus_register
capabilities: fix potential memleak on error path from vfs_getxattr_alloc()
Greg Kroah-Hartman (1):
Linux 4.19.265
Hans Verkuil (3):
media: s5p_cec: limit msg.len to CEC_MAX_MSG_SIZE
media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE
media: dvb-frontends/drxk: initialize err to 0
Helge Deller (3):
parisc: Make 8250_gsc driver dependend on CONFIG_PARISC
parisc: Export iosapic_serial_irq() symbol for serial port driver
parisc: Avoid printing the hardware path twice
Jason A. Donenfeld (1):
ipvs: use explicitly signed chars
Jim Mattson (1):
KVM: x86: Mask off reserved bits in CPUID.80000008H
John Veness (1):
ALSA: usb-audio: Add quirks for MacroSilicon MS2100/MS2106 devices
Kuniyuki Iwashima (1):
tcp/udp: Make early_demux back namespacified.
Li Qiang (1):
kprobe: reverse kp->flags when arm_kprobe failed
Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix attempting to access uninitialized memory
Martin Tůma (1):
i2c: xiic: Add platform module alias
Masahiro Yamada (1):
linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
Maxim Levitsky (3):
KVM: x86: emulator: em_sysexit should update ctxt->mode
KVM: x86: emulator: introduce emulator_recalc_and_set_mode
KVM: x86: emulator: update the emulation mode after CR0 write
Maxim Mikityanskiy (1):
Bluetooth: L2CAP: Fix use-after-free caused by l2cap_reassemble_sdu
Samuel Bailey (1):
HID: saitek: add madcatz variant of MMO7 mouse device ID
Sergey Shtylyov (1):
ata: pata_legacy: fix pdc20230_set_piomode()
Shang XiaoJing (2):
nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
Trond Myklebust (2):
NFSv4.1: Handle RECLAIM_COMPLETE trunking errors NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
Yang Yingliang (2):
mISDN: fix possible memory leak in mISDN_register_device()
isdn: mISDN: netjet: fix wrong check of device registration
Ye Bin (1):
ext4: fix warning in 'ext4_da_release_space'
Yu Kuai (1):
block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
Zhang Changzhong (1):
net: fec: fix improper use of NETDEV_TX_BUSY
Zhang Qilong (1):
rose: Fix NULL pointer dereference in rose_send_frame()
Zhang Xiaoxu (1):
nfs4: Fix kmemleak when allocate slot failed
Zheng Yejian (1):
tracing/histogram: Update document for KEYS_MAX size
Zhengchao Shao (4):
ipvs: fix WARNING in __ip_vs_cleanup_batch()
ipvs: fix WARNING in ip_vs_app_net_cleanup()
Bluetooth: L2CAP: fix use-after-free in l2cap_conn_del()
ipv6: fix WARNING in ip6_route_net_exit_late()
Ziyang Xuan (1):
net: tun: fix bugs for oversize packet when napi frags enabled
Greg Kroah-Hartman
maintainerDocumentation/trace/histogram.rst +1 -1
@@ -39,7 +39,7 @@ Documentation written by Tom Zanussi will use the event's kernel stacktrace as the key. The keywords 'keys' or 'key' can be used to specify keys, and the keywords 'values', 'vals', or 'val' can be used to specify values. Compound - keys consisting of up to two fields can be specified by the 'keys' + keys consisting of up to three fields can be specified by the 'keys' keyword. Hashing a compound key produces a unique entry in the table for each unique combination of component keys, and can be useful for providing more fine-grained summaries of event data.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 264 +SUBLEVEL = 265 EXTRAVERSION = NAME = "People's Front"
arch/parisc/include/asm/hardware.h +6 -6
@@ -10,12 +10,12 @@#define SVERSION_ANY_ID PA_SVERSION_ANY_IDstruct hp_hardware { -unsigned short hw_type:5 ;/* HPHW_xxx */ -unsigned short hversion; -unsigned long sversion:28 ; -unsigned short opt; -const char name[80 ];/* The hardware description */ -}; +unsigned int hw_type:8 ;/* HPHW_xxx */ +unsigned int hversion:12 ; +unsigned int sversion:12 ; +unsigned char opt; +unsigned char name[59 ];/* The hardware description */ +} __packed;struct parisc_device ;
arch/parisc/kernel/drivers.c +6 -8
@@ -861,15 +861,13 @@ void __init walk_central_bus(void) &root); } -static void print_parisc_device (struct parisc_device *dev) +static __init void print_parisc_device (struct parisc_device *dev) { -char hw_path[64 ]; -static int count; +static int count__initdata ; -print_pa_hwpath (dev, hw_path); -pr_info ("%d. %s at %pap [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }" , - ++count, dev->name, &(dev->hpa.start), hw_path, dev->id.hw_type, - dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); +pr_info ("%d. %s at %pap { type:%d, hv:%#x, sv:%#x, rev:%#x }" , + ++count, dev->name, &(dev->hpa.start), dev->id.hw_type, + dev->id.hversion, dev->id.sversion, dev->id.hversion_rev);if (dev->num_addrs) {int k;
@@ -1058,7 +1056,7 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data) -static int print_one_device (struct device * dev,void * data) +static __init int print_one_device (struct device * dev,void * data) {struct parisc_device * pdev =to_parisc_device (dev);
arch/x86/kvm/cpuid.c +1 -0
@@ -680,6 +680,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, g_phys_as = phys_as; entry->eax = g_phys_as | (virt_as <<8 ); + entry->ecx &= ~(GENMASK (31 ,16 ) |GENMASK (11 ,8 )); entry->edx =0 ;/* * IBRS, IBPB and VIRT_SSBD aren't necessarily present in
arch/x86/kvm/emulate.c +73 -29
160 lines not on this page · raw message
block/bfq-iosched.c +3 -1
@@ -416,6 +416,8 @@ static struct bfq_io_cq *bfq_bic_lookup(struct bfq_data *bfqd,*/ void bfq_schedule_dispatch (struct bfq_data *bfqd) { +lockdep_assert_held (&bfqd->lock); +if (bfqd->queued !=0 ) {bfq_log (bfqd,"schedule dispatch" );blk_mq_run_hw_queues (bfqd->queue, true);
@@ -5278,8 +5280,8 @@ bfq_idle_slice_timer_body(struct bfq_data *bfqd, struct bfq_queue *bfqq)bfq_bfqq_expire (bfqd, bfqq, true, reason); schedule_dispatch: -spin_unlock_irqrestore (&bfqd->lock, flags);bfq_schedule_dispatch (bfqd); +spin_unlock_irqrestore (&bfqd->lock, flags); }/*
drivers/ata/pata_legacy.c +3 -2
@@ -292,9 +292,10 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev)outb (inb (0x1F4 ) &0x07 ,0x1F4 ); rt =inb (0x1F3 ); - rt &=0x07 << (3 * adev->devno); + rt &= ~(0x07 << (3 * !adev->devno));if (pio) - rt |= (1 +3 * pio) << (3 * adev->devno); + rt |= (1 +3 * pio) << (3 * !adev->devno); +outb (rt,0x1F3 );udelay (100 );outb (inb (0x1F2 ) |0x01 ,0x1F2 );
drivers/firmware/efi/efi.c +1 -1
@@ -556,7 +556,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, seed =early_memremap (efi.rng_seed,sizeof (*seed));if (seed !=NULL ) { - size = seed->size; + size =min (seed->size,EFI_RANDOM_SEED_SIZE );early_memunmap (seed,sizeof (*seed)); }else {pr_err ("Could not map UEFI random seed!\n" );
drivers/hid/hid-ids.h +1 -0
@@ -793,6 +793,7 @@#define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540#define USB_DEVICE_ID_MADCATZ_RAT5 0x1705#define USB_DEVICE_ID_MADCATZ_RAT9 0x1709 +#define USB_DEVICE_ID_MADCATZ_MMO7 0x1713#define USB_VENDOR_ID_MCC 0x09db#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
drivers/hid/hid-quirks.c +1 -0
@@ -620,6 +620,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) }, { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT5) }, { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_MMO7) }, #endif #if IS_ENABLED(CONFIG_HID_SAMSUNG) { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
drivers/hid/hid-saitek.c +2 -0
@@ -191,6 +191,8 @@ static const struct hid_device_id saitek_devices[] = { .driver_data = SAITEK_RELEASE_MODE_RAT7 }, { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7), .driver_data = SAITEK_RELEASE_MODE_MMO7 }, + { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_MMO7), + .driver_data = SAITEK_RELEASE_MODE_MMO7 }, { } };
drivers/i2c/busses/i2c-xiic.c +1 -0
@@ -893,6 +893,7 @@ static struct platform_driver xiic_i2c_driver = {module_platform_driver (xiic_i2c_driver); +MODULE_ALIAS ("platform:" DRIVER_NAME );MODULE_AUTHOR ("[email protected]" );MODULE_DESCRIPTION ("Xilinx I2C bus driver" );MODULE_LICENSE ("GPL v2" );
drivers/infiniband/hw/qedr/main.c +8 -1
@@ -338,6 +338,10 @@ static int qedr_alloc_resources(struct qedr_dev *dev)spin_lock_init (&dev->qpidr.idr_lock);idr_init (&dev->qpidr.idr); dev->iwarp_wq =create_singlethread_workqueue ("qedr_iwarpq" ); +if (!dev->iwarp_wq) { + rc = -ENOMEM ; + goto err1; + } }/* Allocate Status blocks for CNQ */
@@ -345,7 +349,7 @@ static int qedr_alloc_resources(struct qedr_dev *dev) GFP_KERNEL);if (!dev->sb_array) { rc = -ENOMEM ; - goto err1; + goto err_destroy_wq; } dev->cnq_array = kcalloc(dev->num_cnq,
@@ -399,6 +403,9 @@ static int qedr_alloc_resources(struct qedr_dev *dev)kfree (dev->cnq_array); err2:kfree (dev->sb_array); +err_destroy_wq: +if (IS_IWARP (dev)) +destroy_workqueue (dev->iwarp_wq); err1:kfree (dev->sgid_tbl);return rc;
drivers/isdn/hardware/mISDN/netjet.c +1 -1
@@ -970,7 +970,7 @@ nj_release(struct tiger_hw *card) }if (card->irq >0 )free_irq (card->irq, card); -if (card->isac.dch.dev.dev.class) +if (device_is_registered (&card->isac.dch.dev.dev))mISDN_unregister_device (&card->isac.dch.dev);for (i =0 ; i <2 ; i++) {
drivers/isdn/mISDN/core.c +3 -2
@@ -242,11 +242,12 @@ mISDN_register_device(struct mISDNdevice *dev,if (debug &DEBUG_CORE )printk (KERN_DEBUG "mISDN_register %s %d\n" ,dev_name (&dev->dev), dev->id); + dev->dev.class = &mISDN_class; + err =create_stack (dev);if (err) goto error1; - dev->dev.class = &mISDN_class; dev->dev.platform_data = dev; dev->dev.parent = parent;dev_set_drvdata (&dev->dev, dev);
@@ -258,8 +259,8 @@ mISDN_register_device(struct mISDNdevice *dev, error3:delete_stack (dev); -return err; error1: +put_device (&dev->dev);return err; }
drivers/media/dvb-frontends/drxk_hard.c +1 -1
@@ -6694,7 +6694,7 @@ static int drxk_read_snr(struct dvb_frontend *fe, u16 *snr)static int drxk_read_ucblocks (struct dvb_frontend *fe,u32 *ucblocks) {struct drxk_state *state = fe->demodulator_priv; -u16 err; +u16 err =0 ;dprintk (1 ,"\n" );
drivers/media/platform/cros-ec-cec/cros-ec-cec.c +2 -0
@@ -44,6 +44,8 @@ static void handle_cec_message(struct cros_ec_cec *cros_ec_cec)uint8_t *cec_message = cros_ec->event_data.data.cec_message;unsigned int len = cros_ec->event_size; +if (len >CEC_MAX_MSG_SIZE ) + len =CEC_MAX_MSG_SIZE ; cros_ec_cec->rx_msg.len = len;memcpy (cros_ec_cec->rx_msg.msg, cec_message, len);
drivers/media/platform/s5p-cec/s5p_cec.c +2 -0
@@ -116,6 +116,8 @@ static irqreturn_t s5p_cec_irq_handler(int irq, void *priv)dev_dbg (cec->dev,"Buffer overrun (worker did not process previous message)\n" ); cec->rx =STATE_BUSY ; cec->msg.len = status >>24 ; +if (cec->msg.len >CEC_MAX_MSG_SIZE ) + cec->msg.len =CEC_MAX_MSG_SIZE ; cec->msg.rx_status =CEC_RX_STATUS_OK ;s5p_cec_get_rx_buf (cec, cec->msg.len, cec->msg.msg);
drivers/net/dsa/dsa_loop.c +18 -7
@@ -333,6 +333,17 @@ static struct mdio_driver dsa_loop_drv = {#define NUM_FIXED_PHYS (DSA_LOOP_NUM_PORTS - 2) +static void dsa_loop_phydevs_unregister (void ) +{ +unsigned int i; + +for (i =0 ; i <NUM_FIXED_PHYS ; i++) +if (!IS_ERR (phydevs[i])) { +fixed_phy_unregister (phydevs[i]); +phy_device_free (phydevs[i]); + } +} +static int __init dsa_loop_init (void ) {struct fixed_phy_status status = {
@@ -340,23 +351,23 @@ static int __init dsa_loop_init(void) .speed = SPEED_100, .duplex = DUPLEX_FULL, }; -unsigned int i; +unsigned int i, ret;for (i =0 ; i <NUM_FIXED_PHYS ; i++) phydevs[i] =fixed_phy_register (PHY_POLL , &status,-1 ,NULL ); -return mdio_driver_register (&dsa_loop_drv); + ret =mdio_driver_register (&dsa_loop_drv); +if (ret) +dsa_loop_phydevs_unregister (); + +return ret; }module_init (dsa_loop_init); static void __exit dsa_loop_exit(void) { -unsigned int i; -mdio_driver_unregister (&dsa_loop_drv); -for (i =0 ; i <NUM_FIXED_PHYS ; i++) -if (!IS_ERR (phydevs[i])) -fixed_phy_unregister (phydevs[i]); +dsa_loop_phydevs_unregister (); }module_exit (dsa_loop_exit);
drivers/net/ethernet/freescale/fec_main.c +2 -2
@@ -623,7 +623,7 @@ fec_enet_txq_put_data_tso(struct fec_enet_priv_tx_q *txq, struct sk_buff *skb,dev_kfree_skb_any (skb);if (net_ratelimit ())netdev_err (ndev,"Tx DMA memory map failed\n" ); -return NETDEV_TX_BUSY ; +return NETDEV_TX_OK ; } bdp->cbd_datlen =cpu_to_fec16 (size);
@@ -685,7 +685,7 @@ fec_enet_txq_put_hdr_tso(struct fec_enet_priv_tx_q *txq,dev_kfree_skb_any (skb);if (net_ratelimit ())netdev_err (ndev,"Tx DMA memory map failed\n" ); -return NETDEV_TX_BUSY ; +return NETDEV_TX_OK ; } }
drivers/net/phy/mdio_bus.c +1 -1
@@ -412,7 +412,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) bus->reset (bus);for (i =0 ; i <PHY_MAX_ADDR ; i++) { -if ((bus->phy_mask & (1 << i)) ==0 ) { +if ((bus->phy_mask &BIT (i)) ==0 ) {struct phy_device *phydev; phydev =mdiobus_scan (bus, i);
drivers/net/tun.c +2 -1
@@ -1473,7 +1473,8 @@ static struct sk_buff *tun_napi_alloc_frags(struct tun_file *tfile,int err;int i; -if (it->nr_segs >MAX_SKB_FRAGS +1 ) +if (it->nr_segs >MAX_SKB_FRAGS +1 || + len > (ETH_MAX_MTU -NET_SKB_PAD -NET_IP_ALIGN ))return ERR_PTR (-EMSGSIZE );local_bh_disable ();
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c +4 -0
@@ -237,6 +237,10 @@ static void brcmf_fweh_event_worker(struct work_struct *work)brcmf_fweh_event_name (event->code), event->code, event->emsg.ifidx, event->emsg.bsscfgidx, event->emsg.addr); +if (event->emsg.bsscfgidx >=BRCMF_MAX_IFS ) { +brcmf_err ("invalid bsscfg index: %u\n" , event->emsg.bsscfgidx); + goto event_free; + }/* convert event message */ emsg_be = &event->emsg;
drivers/nfc/nfcmrvl/i2c.c +6 -1
@@ -151,10 +151,15 @@ static int nfcmrvl_i2c_nci_send(struct nfcmrvl_private *priv, ret = -EREMOTEIO ; }else ret =0 ; + } + +if (ret) {kfree_skb (skb); +return ret; } -return ret; +consume_skb (skb); +return 0 ; } static void nfcmrvl_i2c_nci_update_config(struct nfcmrvl_private *priv,
drivers/nfc/s3fwrn5/core.c +6 -2
@@ -108,11 +108,15 @@ static int s3fwrn5_nci_send(struct nci_dev *ndev, struct sk_buff *skb) } ret =s3fwrn5_write (info, skb); -if (ret <0 ) +if (ret <0 ) {kfree_skb (skb); +mutex_unlock (&info->mutex); +return ret; + } +consume_skb (skb);mutex_unlock (&info->mutex); -return ret; +return 0 ; }static int s3fwrn5_nci_post_setup (struct nci_dev *ndev)
drivers/parisc/iosapic.c +1 -0
@@ -889,6 +889,7 @@ int iosapic_serial_irq(struct parisc_device *dev) return vi->txn_irq; } +EXPORT_SYMBOL (iosapic_serial_irq);#endif
drivers/tty/serial/8250/Kconfig +1 -1
@@ -106,7 +106,7 @@ config SERIAL_8250_CONSOLE config SERIAL_8250_GSC tristate - depends on SERIAL_8250 && GSC + depends on SERIAL_8250 && PARISC default SERIAL_8250 config SERIAL_8250_DMA
fs/btrfs/backref.c +17 -19
@@ -589,6 +589,18 @@ unode_aux_to_inode_list(struct ulist_node *node)return (struct extent_inode_elem *)(uintptr_t )node->aux; } +static void free_leaf_list (struct ulist *ulist) +{ +struct ulist_node *node; +struct ulist_iterator uiter; + +ULIST_ITER_INIT (&uiter); +while ((node =ulist_next (ulist, &uiter))) +free_inode_elem_list (unode_aux_to_inode_list (node)); + +ulist_free (ulist); +} +/* * We maintain three seperate rbtrees: one for direct refs, one for * indirect refs which have a key, and one for indirect refs which do not
@@ -703,7 +715,11 @@ static int resolve_indirect_refs(struct btrfs_fs_info *fs_info,cond_resched (); } out: -ulist_free (parents); +/* +* We may have inode lists attached to refs in the parents ulist, so we +* must free them before freeing the ulist and its refs. +*/ +free_leaf_list (parents);return ret; }
@@ -1360,24 +1376,6 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,return ret; } -static void free_leaf_list (struct ulist *blocks) -{ -struct ulist_node *node =NULL ; -struct extent_inode_elem *eie; -struct ulist_iterator uiter; - -ULIST_ITER_INIT (&uiter); -while ((node =ulist_next (blocks, &uiter))) { -if (!node->aux) -continue ; - eie =unode_aux_to_inode_list (node); -free_inode_elem_list (eie); - node->aux =0 ; - } - -ulist_free (blocks); -} -/* * Finds all leafs with a reference to the specified combination of bytenr and * offset. key_list_head will point to a list of corresponding keys (caller must
fs/btrfs/export.c +1 -1
@@ -58,7 +58,7 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len, }struct dentry *btrfs_get_dentry (struct super_block *sb,u64 objectid, -u64 root_objectid,u32 generation, +u64 root_objectid,u64 generation,int check_generation) {struct btrfs_fs_info *fs_info =btrfs_sb (sb);
fs/btrfs/export.h +1 -1
@@ -19,7 +19,7 @@ struct btrfs_fid { } __attribute__ ((packed));struct dentry *btrfs_get_dentry (struct super_block *sb,u64 objectid, -u64 root_objectid,u32 generation, +u64 root_objectid,u64 generation,int check_generation);struct dentry *btrfs_get_parent (struct dentry *child);
fs/btrfs/tests/qgroup-tests.c +15 -5
@@ -237,8 +237,10 @@ static int test_no_shared_qgroup(struct btrfs_root *root, ret =insert_normal_tree_ref (root, nodesize, nodesize,0 ,BTRFS_FS_TREE_OBJECTID ); -if (ret) +if (ret) { +ulist_free (old_roots);return ret; + } ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &new_roots, false);
@@ -273,8 +275,10 @@ static int test_no_shared_qgroup(struct btrfs_root *root, } ret =remove_extent_item (root, nodesize, nodesize); -if (ret) +if (ret) { +ulist_free (old_roots);return -EINVAL ; + } ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &new_roots, false);
@@ -338,8 +342,10 @@ static int test_multiple_refs(struct btrfs_root *root, ret =insert_normal_tree_ref (root, nodesize, nodesize,0 ,BTRFS_FS_TREE_OBJECTID ); -if (ret) +if (ret) { +ulist_free (old_roots);return ret; + } ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &new_roots, false);
@@ -373,8 +379,10 @@ static int test_multiple_refs(struct btrfs_root *root, ret =add_tree_ref (root, nodesize, nodesize,0 ,BTRFS_FIRST_FREE_OBJECTID ); -if (ret) +if (ret) { +ulist_free (old_roots);return ret; + } ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &new_roots, false);
@@ -414,8 +422,10 @@ static int test_multiple_refs(struct btrfs_root *root, ret =remove_extent_ref (root, nodesize, nodesize,0 ,BTRFS_FIRST_FREE_OBJECTID ); -if (ret) +if (ret) { +ulist_free (old_roots);return ret; + } ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &new_roots, false);
fs/ext4/migrate.c +2 -1
@@ -443,7 +443,8 @@ int ext4_ext_migrate(struct inode *inode)* already is extent-based, error out. */ if (!ext4_has_feature_extents (inode->i_sb) || - (ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS ))) +ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS ) || +ext4_has_inline_data (inode))return -EINVAL ;if (S_ISLNK (inode->i_mode) && inode->i_blocks ==0 )
fs/nfs/nfs4client.c +1 -0
@@ -340,6 +340,7 @@ int nfs40_init_client(struct nfs_client *clp) ret =nfs4_setup_slot_table (tbl,NFS4_MAX_SLOT_TABLE ,"NFSv4.0 transport Slot table" );if (ret) { +nfs4_shutdown_slot_table (tbl);kfree (tbl);return ret; }
fs/nfs/nfs4state.c +2 -0
@@ -1736,6 +1736,7 @@ static void nfs4_state_mark_reclaim_helper(struct nfs_client *clp,static void nfs4_state_start_reclaim_reboot (struct nfs_client *clp) { +set_bit (NFS4CLNT_RECLAIM_REBOOT , &clp->cl_state);/* Mark all delegations for reclaim */ nfs_delegation_mark_reclaim (clp);nfs4_state_mark_reclaim_helper (clp, nfs4_state_mark_reclaim_reboot);
@@ -2589,6 +2590,7 @@ static void nfs4_state_manager(struct nfs_client *clp)if (status <0 ) goto out_error;nfs4_state_end_reclaim_reboot (clp); +continue ; }/* Detect expired delegations... */
include/linux/bits.h +10 -7
@@ -1,13 +1,15 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LINUX_BITS_H#define __LINUX_BITS_H + +#include <linux/const.h> #include <asm/bitsperlong.h> -#define BIT (nr) (1UL << (nr)) -#define BIT_ULL (nr) (1ULL << (nr)) -#define BIT_MASK (nr) (1UL << ((nr) % BITS_PER_LONG)) +#define BIT (nr) (UL(1) << (nr)) +#define BIT_ULL (nr) (ULL(1) << (nr)) +#define BIT_MASK (nr) (UL(1) << ((nr) % BITS_PER_LONG))#define BIT_WORD (nr) ((nr) / BITS_PER_LONG) -#define BIT_ULL_MASK (nr) (1ULL << ((nr) % BITS_PER_LONG_LONG)) +#define BIT_ULL_MASK (nr) (ULL(1) << ((nr) % BITS_PER_LONG_LONG))#define BIT_ULL_WORD (nr) ((nr) / BITS_PER_LONG_LONG)#define BITS_PER_BYTE 8
@@ -17,10 +19,11 @@* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ #define GENMASK (h, l) \ - (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) + (((~UL(0)) - (UL(1) << (l)) + 1) & \ + (~UL(0) >> (BITS_PER_LONG - 1 - (h))))#define GENMASK_ULL (h, l) \ - (((~0ULL) - (1ULL << (l)) + 1) & \ - (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h)))) + (((~ULL(0)) - (ULL(1) << (l)) + 1) & \ + (~ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))#endif /* __LINUX_BITS_H */
include/linux/efi.h +1 -1
@@ -1655,7 +1655,7 @@ efi_status_t efi_exit_boot_services(efi_system_table_t *sys_table,void *priv, efi_exit_boot_map_processing priv_func); -#define EFI_RANDOM_SEED_SIZE 64U +#define EFI_RANDOM_SEED_SIZE 32U // BLAKE2S_HASH_SIZEstruct linux_efi_random_seed {u32 size;
include/net/protocol.h +0 -4
@@ -39,8 +39,6 @@/* This is used to register protocols. */ struct net_protocol { -int (*early_demux)(struct sk_buff *skb); -int (*early_demux_handler)(struct sk_buff *skb);int (*handler)(struct sk_buff *skb);void (*err_handler)(struct sk_buff *skb,u32 info); unsigned int no_policy:1,
@@ -54,8 +52,6 @@ struct net_protocol { #if IS_ENABLED(CONFIG_IPV6) struct inet6_protocol { - void (*early_demux)(struct sk_buff *skb); - void (*early_demux_handler)(struct sk_buff *skb); int (*handler)(struct sk_buff *skb); void (*err_handler)(struct sk_buff *skb,
include/net/tcp.h +2 -0
@@ -901,6 +901,8 @@ static inline int tcp_v6_sdif(const struct sk_buff *skb)#endif return 0; } + +void tcp_v6_early_demux (struct sk_buff *skb);#endif static inline bool inet_exact_dif_match (struct net *net,struct sk_buff *skb)
include/net/udp.h +1 -0
@@ -173,6 +173,7 @@ typedef struct sock *(*udp_lookup_t)(struct sk_buff *skb, __be16 sport,struct sk_buff *udp_gro_receive (struct list_head *head,struct sk_buff *skb,struct udphdr *uh,udp_lookup_t lookup);int udp_gro_complete (struct sk_buff *skb,int nhoff,udp_lookup_t lookup); +void udp_v6_early_demux (struct sk_buff *skb);struct sk_buff *__udp_gso_segment (struct sk_buff *gso_skb,netdev_features_t features);
kernel/kprobes.c +4 -1
@@ -2172,8 +2172,11 @@ int enable_kprobe(struct kprobe *kp)if (!kprobes_all_disarmed &&kprobe_disabled (p)) { p->flags &= ~KPROBE_FLAG_DISABLED ; ret =arm_kprobe (p); -if (ret) +if (ret) { p->flags |=KPROBE_FLAG_DISABLED ; +if (p != kp) + kp->flags |=KPROBE_FLAG_DISABLED ; + } } out:mutex_unlock (&kprobe_mutex);
net/bluetooth/l2cap_core.c +44 -8
97 lines not on this page · raw message
net/core/neighbour.c +1 -1
@@ -312,7 +312,7 @@ int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)write_lock_bh (&tbl->lock);neigh_flush_dev (tbl, dev);pneigh_ifdown_and_unlock (tbl, dev); -pneigh_queue_purge (&tbl->proxy_queue,dev_net (dev)); +pneigh_queue_purge (&tbl->proxy_queue, dev ?dev_net (dev) :NULL );if (skb_queue_empty_lockless (&tbl->proxy_queue))del_timer_sync (&tbl->proxy_timer);return 0 ;
net/ipv4/af_inet.c +2 -12
@@ -1678,12 +1678,7 @@ static const struct net_protocol igmp_protocol = { };#endif -/* thinking of making this const? Don't. -* early_demux can change based on sysctl. -*/ -static struct net_protocol tcp_protocol = { - .early_demux = tcp_v4_early_demux, - .early_demux_handler = tcp_v4_early_demux, +static const struct net_protocol tcp_protocol = { .handler = tcp_v4_rcv, .err_handler = tcp_v4_err, .no_policy =1 ,
@@ -1691,12 +1686,7 @@ static struct net_protocol tcp_protocol = { .icmp_strict_tag_validation = 1, }; -/* thinking of making this const? Don't. -* early_demux can change based on sysctl. -*/ -static struct net_protocol udp_protocol = { - .early_demux = udp_v4_early_demux, - .early_demux_handler = udp_v4_early_demux, +static const struct net_protocol udp_protocol = { .handler = udp_rcv, .err_handler = udp_err, .no_policy =1 ,
net/ipv4/ip_input.c +21 -11
@@ -306,28 +306,38 @@ static inline bool ip_rcv_options(struct sk_buff *skb, struct net_device *dev)return true; } +int udp_v4_early_demux (struct sk_buff *); +int tcp_v4_early_demux (struct sk_buff *);static int ip_rcv_finish_core (struct net *net,struct sock *sk,struct sk_buff *skb,struct net_device *dev) {const struct iphdr *iph =ip_hdr (skb); -int (*edemux)(struct sk_buff *skb);struct rtable *rt;int err; -if (net->ipv4.sysctl_ip_early_demux && +if (READ_ONCE (net->ipv4.sysctl_ip_early_demux) && !skb_dst (skb) && !skb->sk && !ip_is_fragment (iph)) { -const struct net_protocol *ipprot; -int protocol = iph->protocol; +switch (iph->protocol) { +case IPPROTO_TCP : +if (READ_ONCE (net->ipv4.sysctl_tcp_early_demux)) { +tcp_v4_early_demux (skb); - ipprot =rcu_dereference (inet_protos[protocol]); -if (ipprot && (edemux =READ_ONCE (ipprot->early_demux))) { - err =edemux (skb); -if (unlikely (err)) - goto drop_error; -/* must reload iph, skb->head might have changed */ - iph =ip_hdr (skb); +/* must reload iph, skb->head might have changed */ + iph =ip_hdr (skb); + } +break ; +case IPPROTO_UDP : +if (READ_ONCE (net->ipv4.sysctl_udp_early_demux)) { + err =udp_v4_early_demux (skb); +if (unlikely (err)) + goto drop_error; + +/* must reload iph, skb->head might have changed */ + iph =ip_hdr (skb); + } +break ; } }
net/ipv4/sysctl_net_ipv4.c +2 -57
77 lines not on this page · raw message
net/ipv6/ip6_input.c +15 -8
@@ -47,18 +47,25 @@#include <net/inet_ecn.h> #include <net/dst_metadata.h> +void udp_v6_early_demux (struct sk_buff *); +void tcp_v6_early_demux (struct sk_buff *);static void ip6_rcv_finish_core (struct net *net,struct sock *sk,struct sk_buff *skb) { -void (*edemux)(struct sk_buff *skb); - -if (net->ipv4.sysctl_ip_early_demux && !skb_dst (skb) && skb->sk ==NULL ) { -const struct inet6_protocol *ipprot; - - ipprot =rcu_dereference (inet6_protos[ipv6_hdr (skb)->nexthdr]); -if (ipprot && (edemux =READ_ONCE (ipprot->early_demux))) -edemux (skb); +if (READ_ONCE (net->ipv4.sysctl_ip_early_demux) && + !skb_dst (skb) && !skb->sk) { +switch (ipv6_hdr (skb)->nexthdr) { +case IPPROTO_TCP : +if (READ_ONCE (net->ipv4.sysctl_tcp_early_demux)) +tcp_v6_early_demux (skb); +break ; +case IPPROTO_UDP : +if (READ_ONCE (net->ipv4.sysctl_udp_early_demux)) +udp_v6_early_demux (skb); +break ; + } } +if (!skb_valid_dst (skb))ip6_route_input (skb); }
net/ipv6/route.c +10 -4
@@ -5374,10 +5374,16 @@ static void __net_exit ip6_route_net_exit(struct net *net)static int __net_init ip6_route_net_init_late (struct net *net) {#ifdef CONFIG_PROC_FS -proc_create_net ("ipv6_route" ,0 , net->proc_net, &ipv6_route_seq_ops, -sizeof (struct ipv6_route_iter )); -proc_create_net_single ("rt6_stats" ,0444 , net->proc_net, - rt6_stats_seq_show,NULL ); +if (!proc_create_net ("ipv6_route" ,0 , net->proc_net, + &ipv6_route_seq_ops, +sizeof (struct ipv6_route_iter ))) +return -ENOMEM ; + +if (!proc_create_net_single ("rt6_stats" ,0444 , net->proc_net, + rt6_stats_seq_show,NULL )) { +remove_proc_entry ("ipv6_route" , net->proc_net); +return -ENOMEM ; + }#endif return 0 ; }
net/ipv6/tcp_ipv6.c +2 -7
@@ -1673,7 +1673,7 @@ static int tcp_v6_rcv(struct sk_buff *skb) goto discard_it; } -static void tcp_v6_early_demux (struct sk_buff *skb) +void tcp_v6_early_demux (struct sk_buff *skb) {const struct ipv6hdr *hdr;const struct tcphdr *th;
@@ -2028,12 +2028,7 @@ struct proto tcpv6_prot = { .diag_destroy = tcp_abort, }; -/* thinking of making this const? Don't. -* early_demux can change based on sysctl. -*/ -static struct inet6_protocol tcpv6_protocol = { - .early_demux = tcp_v6_early_demux, - .early_demux_handler = tcp_v6_early_demux, +static const struct inet6_protocol tcpv6_protocol = { .handler = tcp_v6_rcv, .err_handler = tcp_v6_err, .flags =INET6_PROTO_NOPOLICY |INET6_PROTO_FINAL ,
net/ipv6/udp.c +2 -7
@@ -912,7 +912,7 @@ static struct sock *__udp6_lib_demux_lookup(struct net *net,return NULL ; } -static void udp_v6_early_demux (struct sk_buff *skb) +void udp_v6_early_demux (struct sk_buff *skb) {struct net *net =dev_net (skb->dev);const struct udphdr *uh;
@@ -1533,12 +1533,7 @@ int compat_udpv6_getsockopt(struct sock *sk, int level, int optname, }#endif -/* thinking of making this const? Don't. -* early_demux can change based on sysctl. -*/ -static struct inet6_protocol udpv6_protocol = { - .early_demux = udp_v6_early_demux, - .early_demux_handler = udp_v6_early_demux, +static const struct inet6_protocol udpv6_protocol = { .handler = udpv6_rcv, .err_handler = udpv6_err, .flags =INET6_PROTO_NOPOLICY |INET6_PROTO_FINAL ,
net/netfilter/ipvs/ip_vs_app.c +8 -2
@@ -604,13 +604,19 @@ static const struct seq_operations ip_vs_app_seq_ops = {int __net_init ip_vs_app_net_init (struct netns_ipvs *ipvs) {INIT_LIST_HEAD (&ipvs->app_list); -proc_create_net ("ip_vs_app" ,0 , ipvs->net->proc_net, &ip_vs_app_seq_ops, -sizeof (struct seq_net_private )); +#ifdef CONFIG_PROC_FS +if (!proc_create_net ("ip_vs_app" ,0 , ipvs->net->proc_net, + &ip_vs_app_seq_ops, +sizeof (struct seq_net_private ))) +return -ENOMEM ; +#endif return 0 ; } void __net_exit ip_vs_app_net_cleanup(struct netns_ipvs *ipvs) {unregister_ip_vs_app (ipvs,NULL /* all */ ); +#ifdef CONFIG_PROC_FS remove_proc_entry ("ip_vs_app" , ipvs->net->proc_net); +#endif }
net/netfilter/ipvs/ip_vs_conn.c +23 -7
@@ -1230,8 +1230,8 @@ static inline int todrop_entry(struct ip_vs_conn *cp)* The drop rate array needs tuning for real environments. * Called from timer bh only => no locking */ -static const char todrop_rate[9 ] = {0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 }; -static char todrop_counter[9 ] = {0 }; +static const signed char todrop_rate[9 ] = {0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 }; +static signed char todrop_counter[9 ] = {0 };int i;/* if the conn entry hasn't lasted for 60 seconds, don't drop it.
@@ -1378,20 +1378,36 @@ int __net_init ip_vs_conn_net_init(struct netns_ipvs *ipvs) {atomic_set (&ipvs->conn_count,0 ); -proc_create_net ("ip_vs_conn" ,0 , ipvs->net->proc_net, - &ip_vs_conn_seq_ops,sizeof (struct ip_vs_iter_state )); -proc_create_net ("ip_vs_conn_sync" ,0 , ipvs->net->proc_net, - &ip_vs_conn_sync_seq_ops, -sizeof (struct ip_vs_iter_state )); +#ifdef CONFIG_PROC_FS +if (!proc_create_net ("ip_vs_conn" ,0 , ipvs->net->proc_net, + &ip_vs_conn_seq_ops, +sizeof (struct ip_vs_iter_state ))) + goto err_conn; + +if (!proc_create_net ("ip_vs_conn_sync" ,0 , ipvs->net->proc_net, + &ip_vs_conn_sync_seq_ops, +sizeof (struct ip_vs_iter_state ))) + goto err_conn_sync; +#endif +return 0 ; + +#ifdef CONFIG_PROC_FS +err_conn_sync: +remove_proc_entry ("ip_vs_conn" , ipvs->net->proc_net); +err_conn: +return -ENOMEM ; +#endif } void __net_exit ip_vs_conn_net_cleanup(struct netns_ipvs *ipvs) {/* flush all the connection entries first */ ip_vs_conn_flush (ipvs); +#ifdef CONFIG_PROC_FS remove_proc_entry ("ip_vs_conn" , ipvs->net->proc_net);remove_proc_entry ("ip_vs_conn_sync" , ipvs->net->proc_net); +#endif }int __init ip_vs_conn_init (void )
net/rose/rose_link.c +3 -0
@@ -239,6 +239,9 @@ void rose_transmit_clear_request(struct rose_neigh *neigh, unsigned int lci, unsunsigned char *dptr;int len; +if (!neigh->dev) +return ; + len =AX25_BPQ_HEADER_LEN +AX25_MAX_HEADER_LEN +ROSE_MIN_LEN +3 ;if ((skb =alloc_skb (len,GFP_ATOMIC )) ==NULL )
net/sched/sch_red.c +3 -1
@@ -63,6 +63,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch, {struct red_sched_data *q =qdisc_priv (sch);struct Qdisc *child = q->qdisc; +unsigned int len;int ret; q->vars.qavg = red_calc_qavg(&q->parms,
@@ -98,9 +99,10 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,break ; } + len =qdisc_pkt_len (skb); ret =qdisc_enqueue (skb, child, to_free);if (likely (ret ==NET_XMIT_SUCCESS )) { -qdisc_qstats_backlog_inc (sch, skb); + sch->qstats.backlog += len; sch->q.qlen++; }else if (net_xmit_drop_count (ret)) { q->stats.pdrop++;
security/commoncap.c +4 -2
@@ -397,8 +397,10 @@ int cap_inode_getsecurity(struct inode *inode, const char *name, void **buffer, &tmpbuf, size, GFP_NOFS);dput (dentry); -if (ret <0 || !tmpbuf) -return ret; +if (ret <0 || !tmpbuf) { + size = ret; + goto out_free; + } fs_ns = inode->i_sb->s_user_ns; cap = (struct vfs_cap_data *) tmpbuf;
sound/usb/quirks-table.h +58 -0
64 lines not on this page · raw message
sound/usb/quirks.c +1 -0
@@ -1174,6 +1174,7 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,case USB_ID (0x041e ,0x3f19 ):/* E-Mu 0204 USB */ set_format_emu_quirk (subs, fmt);break ; +case USB_ID (0x534d ,0x0021 ):/* MacroSilicon MS2100/MS2106 */ case USB_ID (0x534d ,0x2109 ):/* MacroSilicon MS2109 */ subs->stream_offset_adj =2 ;break ;