Linux 5.4.224
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.224 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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/events/intel/core.c | 1 arch/x86/events/intel/ds.c | 9 arch/x86/kvm/cpuid.c | 4 arch/x86/kvm/emulate.c | 102 +++++++--- block/bfq-iosched.c | 4 drivers/android/binder_alloc.c | 6 drivers/ata/pata_legacy.c | 5 drivers/firmware/efi/efi.c | 2 drivers/gpu/drm/i915/display/intel_sdvo.c | 58 +++-- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 6 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/core/cma.c | 2 drivers/infiniband/core/device.c | 10 drivers/infiniband/core/nldev.c | 2 drivers/infiniband/hw/hfi1/pio.c | 3 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/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 6 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/scsi/scsi_sysfs.c | 8 drivers/staging/media/meson/vdec/vdec.c | 2 drivers/tty/serial/8250/Kconfig | 2 fs/btrfs/backref.c | 54 +++-- fs/btrfs/export.c | 2 fs/btrfs/export.h | 2 fs/btrfs/tests/qgroup-tests.c | 20 + fs/ext4/migrate.c | 3 fs/ext4/namei.c | 10 fs/fuse/file.c | 4 fs/nfs/nfs4client.c | 1 fs/nfs/nfs4state.c | 2 fs/xfs/libxfs/xfs_attr_leaf.c | 8 fs/xfs/libxfs/xfs_defer.c | 10 fs/xfs/xfs_dquot.c | 56 ++++- fs/xfs/xfs_inode.c | 4 fs/xfs/xfs_iomap.c | 2 fs/xfs/xfs_trans.c | 163 +--------------- fs/xfs/xfs_trans_dquot.c | 3 include/linux/efi.h | 2 include/net/protocol.h | 4 include/net/tcp.h | 2 include/net/udp.h | 1 ipc/msg.c | 2 ipc/sem.c | 6 ipc/shm.c | 2 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 | 37 ++- net/ipv4/sysctl_net_ipv4.c | 59 ----- net/ipv6/ip6_input.c | 26 +- net/ipv6/ipv6_sockglue.c | 7 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/netfilter/nf_tables_api.c | 6 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 tools/include/nolibc/nolibc.h | 4 83 files changed, 610 insertions(+), 452 deletions(-)
Ard Biesheuvel (1):
efi: random: reduce seed size to 32 bytes
Brian Foster (1):
xfs: don't fail verifier on empty attr3 leaf block
Brian Norris (1):
drm/rockchip: dsi: Force synchronous probe
Carlos Llamas (1):
binder: fix UAF of alloc->vma in race with munmap()
Chen Zhongjin (3):
net: dsa: Fix possible memory leaks in dsa_loop_init() RDMA/core: Fix null-ptr-deref in ib_core_cleanup() net, neigh: Fix null-ptr-deref in neigh_table_clear()
Chuhong Yuan (1):
xfs: Add the missed xfs_perag_put() for xfs_ifree_cluster()
Dan Carpenter (2):
RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
net: sched: Fix use after free in red_enqueue()
Darrick J. Wong (2):
xfs: use ordered buffers to initialize dquot buffers during quotacheck
xfs: don't fail unwritten extent conversion on writeback due to edquot
Dave Chinner (1):
xfs: gut error handling in xfs_trans_unreserve_and_mod_sb()
David Sterba (1):
btrfs: fix type of parameter generation in btrfs_get_dentry
Dean Luick (1):
IB/hfi1: Correctly move list in sc_disable()
Dokyung Song (1):
wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker()
Eric Sandeen (1):
xfs: group quota should return EDQUOT when prj quota enabled
Filipe Manana (3):
btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
btrfs: fix inode list leak during backref walking at find_parent_nodes()
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 5.4.224
Hangyu Hua (1):
media: meson: vdec: fix possible refcount leak in vdec_probe()
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
Håkon Bugge (1):
RDMA/cma: Use output interface for net_dev check
Jason A. Donenfeld (1):
ipvs: use explicitly signed chars
Jim Mattson (2):
KVM: x86: Mask off reserved bits in CPUID.8000001AH
KVM: x86: Mask off reserved bits in CPUID.80000008H
John Veness (1):
ALSA: usb-audio: Add quirks for MacroSilicon MS2100/MS2106 devices
Kan Liang (2):
perf/x86/intel: Fix pebs event constraints for ICL perf/x86/intel: Add Cooper Lake stepping to isolation_ucodes[]
Kuniyuki Iwashima (2):
tcp/udp: Fix memory leak in ipv6_renew_options(). 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
Luís Henriques (1):
ext4: fix BUG_ON() when directory entry has invalid rec_len
Martin Tůma (1):
i2c: xiic: Add platform module alias
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
Miklos Szeredi (1):
fuse: add file_modified() to fallocate
Pablo Neira Ayuso (1):
netfilter: nf_tables: release flow rule object from commit path
Rasmus Villemoes (1):
tools/nolibc/string: Fix memcmp() implementation
Samuel Bailey (1):
HID: saitek: add madcatz variant of MMO7 mouse device ID
Sascha Hauer (1):
mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase times
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
Uday Shankar (1):
scsi: core: Restrict legal sdev_state transitions via sysfs
Vasily Averin (2):
memcg: enable accounting of ipc resources
ipc: remove memcg accounting for sops objects in do_semtimedop()
Ville Syrjälä (2):
drm/i915/sdvo: Filter out invalid outputs more sensibly drm/i915/sdvo: Setup DDC fully before output init
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 = 5 PATCHLEVEL = 4 -SUBLEVEL = 223 +SUBLEVEL = 224 EXTRAVERSION = NAME = Kleptomaniac Octopus
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
@@ -882,15 +882,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;
@@ -1079,7 +1077,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/events/intel/core.c +1 -0
@@ -4009,6 +4009,7 @@ static const struct x86_cpu_desc isolation_ucodes[] = {INTEL_CPU_DESC (INTEL_FAM6_SKYLAKE_X ,5 ,0x00000000 ),INTEL_CPU_DESC (INTEL_FAM6_SKYLAKE_X ,6 ,0x00000000 ),INTEL_CPU_DESC (INTEL_FAM6_SKYLAKE_X ,7 ,0x00000000 ), +INTEL_CPU_DESC (INTEL_FAM6_SKYLAKE_X ,11 ,0x00000000 ),INTEL_CPU_DESC (INTEL_FAM6_SKYLAKE_L ,3 ,0x0000007c ),INTEL_CPU_DESC (INTEL_FAM6_SKYLAKE ,3 ,0x0000007c ), INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE, 9, 0x0000004e),
arch/x86/events/intel/ds.c +7 -2
@@ -852,8 +852,13 @@ struct event_constraint intel_icl_pebs_event_constraints[] = {INTEL_FLAGS_UEVENT_CONSTRAINT (0x0400 ,0x800000000ULL ),/* SLOTS */ INTEL_PLD_CONSTRAINT (0x1cd ,0xff ),/* MEM_TRANS_RETIRED.LOAD_LATENCY */ -INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD (0x1d0 ,0xf ),/* MEM_INST_RETIRED.LOAD */ -INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST (0x2d0 ,0xf ),/* MEM_INST_RETIRED.STORE */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD (0x11d0 ,0xf ),/* MEM_INST_RETIRED.STLB_MISS_LOADS */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST (0x12d0 ,0xf ),/* MEM_INST_RETIRED.STLB_MISS_STORES */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD (0x21d0 ,0xf ),/* MEM_INST_RETIRED.LOCK_LOADS */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD (0x41d0 ,0xf ),/* MEM_INST_RETIRED.SPLIT_LOADS */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST (0x42d0 ,0xf ),/* MEM_INST_RETIRED.SPLIT_STORES */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD (0x81d0 ,0xf ),/* MEM_INST_RETIRED.ALL_LOADS */ +INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST (0x82d0 ,0xf ),/* MEM_INST_RETIRED.ALL_STORES */ INTEL_FLAGS_EVENT_CONSTRAINT_DATALA_LD_RANGE(0xd1, 0xd4, 0xf), /* MEM_LOAD_*_RETIRED.* */
arch/x86/kvm/cpuid.c +4 -0
@@ -759,6 +759,7 @@ static inline int __do_cpuid_func(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 ; entry->ebx &= kvm_cpuid_8000_0008_ebx_x86_features;cpuid_mask (&entry->ebx,CPUID_8000_0008_EBX );
@@ -791,6 +792,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function, entry->ecx = entry->edx =0 ;break ;case 0x8000001a : + entry->eax &=GENMASK (2 ,0 ); + entry->ebx = entry->ecx = entry->edx =0 ; +break ;case 0x8000001e :break ;/*Add support for Centaur's CPUID instruction*/
arch/x86/kvm/emulate.c +73 -29
160 lines not on this page · raw message
block/bfq-iosched.c +3 -1
@@ -420,6 +420,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);
@@ -6257,8 +6259,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/android/binder_alloc.c +3 -3
@@ -212,7 +212,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, mm = alloc->vma_vm_mm;if (mm) { -down_read (&mm->mmap_sem); +down_write (&mm->mmap_sem); vma = alloc->vma; }
@@ -271,7 +271,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,/* vm_insert_page does not seem to increment the refcount */ }if (mm) { -up_read (&mm->mmap_sem); +up_write (&mm->mmap_sem);mmput (mm); }return 0 ;
@@ -304,7 +304,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, } err_no_vma:if (mm) { -up_read (&mm->mmap_sem); +up_write (&mm->mmap_sem);mmput (mm); }return vma ? -ENOMEM : -ESRCH ;
drivers/ata/pata_legacy.c +3 -2
@@ -278,9 +278,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
@@ -546,7 +546,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 =READ_ONCE (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/gpu/drm/i915/display/intel_sdvo.c +34 -24
125 lines not on this page · raw message
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +6 -0
@@ -1123,5 +1123,11 @@ struct platform_driver dw_mipi_dsi_rockchip_driver = { .of_match_table = dw_mipi_dsi_rockchip_dt_ids, .pm = &dw_mipi_dsi_rockchip_pm_ops, .name = "dw-mipi-dsi-rockchip", +/* +* For dual-DSI display, one DSI pokes at the other DSI's +* drvdata in dw_mipi_dsi_rockchip_find_second(). This is not +* safe for asynchronous probe. +*/ + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, };
drivers/hid/hid-ids.h +1 -0
@@ -818,6 +818,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
@@ -615,6 +615,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
@@ -187,6 +187,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
@@ -884,6 +884,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/core/cma.c +1 -1
@@ -1434,7 +1434,7 @@ static bool validate_ipv4_net_dev(struct net_device *net_dev,return false;memset (&fl4,0 ,sizeof (fl4)); - fl4.flowi4_iif = net_dev->ifindex; + fl4.flowi4_oif = net_dev->ifindex; fl4.daddr = daddr; fl4.saddr = saddr;
drivers/infiniband/core/device.c +9 -1
@@ -2762,10 +2762,18 @@ static int __init ib_core_init(void)nldev_init ();rdma_nl_register (RDMA_NL_LS , ibnl_ls_cb_table); -roce_gid_mgmt_init (); + ret =roce_gid_mgmt_init (); +if (ret) { +pr_warn ("Couldn't init RoCE GID management\n" ); + goto err_parent; + }return 0 ; +err_parent: +rdma_nl_unregister (RDMA_NL_LS ); +nldev_exit (); +unregister_pernet_device (&rdma_dev_net_ops); err_compat:unregister_blocking_lsm_notifier (&ibdev_lsm_nb); err_sa:
drivers/infiniband/core/nldev.c +1 -1
@@ -2098,7 +2098,7 @@ void __init nldev_init(void)rdma_nl_register (RDMA_NL_NLDEV , nldev_cb_table); } -void __exit nldev_exit(void) +void nldev_exit (void ) {rdma_nl_unregister (RDMA_NL_NLDEV ); }
drivers/infiniband/hw/hfi1/pio.c +1 -2
@@ -955,8 +955,7 @@ void sc_disable(struct send_context *sc)spin_unlock (&sc->release_lock);write_seqlock (&sc->waitlock); -if (!list_empty (&sc->piowait)) -list_move (&sc->piowait, &wake_list); +list_splice_init (&sc->piowait, &wake_list);write_sequnlock (&sc->waitlock);while (!list_empty (&wake_list)) {struct iowait *wait;
drivers/infiniband/hw/qedr/main.c +8 -1
@@ -362,6 +362,10 @@ static int qedr_alloc_resources(struct qedr_dev *dev)if (IS_IWARP (dev)) {xa_init (&dev->qps); dev->iwarp_wq =create_singlethread_workqueue ("qedr_iwarpq" ); +if (!dev->iwarp_wq) { + rc = -ENOMEM ; + goto err1; + } }/* Allocate Status blocks for CNQ */
@@ -369,7 +373,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,
@@ -423,6 +427,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
@@ -956,7 +956,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
@@ -233,11 +233,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);
@@ -249,8 +250,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
@@ -6684,7 +6684,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
@@ -45,6 +45,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
@@ -115,6 +115,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/mtd/nand/raw/gpmi-nand/gpmi-nand.c +4 -2
@@ -652,8 +652,9 @@ static void gpmi_nfc_compute_timings(struct gpmi_nand_data *this,unsigned int tRP_ps;bool use_half_period;int sample_delay_ps, sample_delay_factor; -u16 busy_timeout_cycles; +unsigned int busy_timeout_cycles;u8 wrn_dly_sel; +u64 busy_timeout_ps;if (sdr->tRC_min >=30000 ) {/* ONFI non-EDO modes [0-3] */
@@ -677,7 +678,8 @@ static void gpmi_nfc_compute_timings(struct gpmi_nand_data *this, addr_setup_cycles =TO_CYCLES (sdr->tALS_min, period_ps); data_setup_cycles =TO_CYCLES (sdr->tDS_min, period_ps); data_hold_cycles =TO_CYCLES (sdr->tDH_min, period_ps); - busy_timeout_cycles =TO_CYCLES (sdr->tWB_max + sdr->tR_max, period_ps); + busy_timeout_ps =max (sdr->tBERS_max, sdr->tPROG_max); + busy_timeout_cycles =TO_CYCLES (busy_timeout_ps, period_ps); hw->timing0 =BF_GPMI_TIMING0_ADDRESS_SETUP (addr_setup_cycles) | BF_GPMI_TIMING0_DATA_HOLD(data_hold_cycles) |
drivers/net/dsa/dsa_loop.c +18 -7
@@ -329,6 +329,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 = {
@@ -336,23 +347,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,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
@@ -626,7 +626,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);
@@ -688,7 +688,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
@@ -419,7 +419,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
@@ -1492,7 +1492,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
@@ -228,6 +228,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 ) { +bphy_err (drvr,"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
@@ -97,11 +97,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
@@ -875,6 +875,7 @@ int iosapic_serial_irq(struct parisc_device *dev) return vi->txn_irq; } +EXPORT_SYMBOL (iosapic_serial_irq);#endif
drivers/scsi/scsi_sysfs.c +8 -0
@@ -795,6 +795,14 @@ store_state_field(struct device *dev, struct device_attribute *attr, }mutex_lock (&sdev->state_mutex); +switch (sdev->sdev_state) { +case SDEV_RUNNING : +case SDEV_OFFLINE : +break ; +default : +mutex_unlock (&sdev->state_mutex); +return -EINVAL ; + }if (sdev->sdev_state ==SDEV_RUNNING && state ==SDEV_RUNNING ) { ret =0 ; }else {
drivers/staging/media/meson/vdec/vdec.c +2 -0
@@ -1074,6 +1074,7 @@ static int vdec_probe(struct platform_device *pdev) err_vdev_release:video_device_release (vdev); +v4l2_device_unregister (&core->v4l2_dev);return ret; }
@@ -1082,6 +1083,7 @@ static int vdec_remove(struct platform_device *pdev)struct amvdec_core *core =platform_get_drvdata (pdev);video_unregister_device (core->vdev_dec); +v4l2_device_unregister (&core->v4l2_dev);return 0 ; }
drivers/tty/serial/8250/Kconfig +1 -1
@@ -108,7 +108,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 +34 -20
91 lines not on this page · raw message
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/ext4/namei.c +9 -1
@@ -2141,8 +2141,16 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,memcpy (data2, de, len); de = (struct ext4_dir_entry_2 *) data2; top = data2 + len; -while ((char *)(de2 =ext4_next_entry (de, blocksize)) < top) +while ((char *)(de2 =ext4_next_entry (de, blocksize)) < top) { +if (ext4_check_dir_entry (dir,NULL , de, bh2, data2, len, + (data2 + (blocksize - csum_size) - + (char *) de))) { +brelse (bh2); +brelse (bh); +return -EFSCORRUPTED ; + } de = de2; + } de->rec_len =ext4_rec_len_to_disk (data2 + (blocksize - csum_size) - (char *) de, blocksize);
fs/fuse/file.c +4 -0
@@ -3239,6 +3239,10 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset, goto out; } + err =file_modified (file); +if (err) + goto out; +if (!(mode &FALLOC_FL_KEEP_SIZE ))set_bit (FUSE_I_SIZE_UNSTABLE , &fi->state);
fs/nfs/nfs4client.c +1 -0
@@ -346,6 +346,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
@@ -1743,6 +1743,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);
@@ -2588,6 +2589,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... */
fs/xfs/libxfs/xfs_attr_leaf.c +0 -8
@@ -250,14 +250,6 @@ xfs_attr3_leaf_verify(if (fa)return fa; -/* -* In recovery there is a transient state where count == 0 is valid -* because we may have transitioned an empty shortform attr to a leaf -* if the attr didn't fit in shortform. -*/ -if (!xfs_log_in_recovery (mp) && ichdr.count ==0 ) -return __this_address; -/* * firstused is the block offset of the first name info structure. * Make sure it doesn't go off the block or crash into the header.
fs/xfs/libxfs/xfs_defer.c +9 -1
@@ -234,10 +234,13 @@ xfs_defer_trans_roll(struct xfs_log_item *lip;struct xfs_buf *bplist[XFS_DEFER_OPS_NR_BUFS ];struct xfs_inode *iplist[XFS_DEFER_OPS_NR_INODES ]; +unsigned int ordered =0 ;/* bitmap */ int bpcount =0 , ipcount =0 ;int i;int error; +BUILD_BUG_ON (NBBY *sizeof (ordered) <XFS_DEFER_OPS_NR_BUFS ); +list_for_each_entry (lip, &tp->t_items, li_trans) {switch (lip->li_type) {case XFS_LI_BUF :
@@ -248,7 +251,10 @@ xfs_defer_trans_roll(ASSERT (0 );return -EFSCORRUPTED ; } -xfs_trans_dirty_buf (tp, bli->bli_buf); +if (bli->bli_flags &XFS_BLI_ORDERED ) + ordered |= (1U << bpcount); +else +xfs_trans_dirty_buf (tp, bli->bli_buf); bplist[bpcount++] = bli->bli_buf; }break ;
@@ -289,6 +295,8 @@ xfs_defer_trans_roll(/* Rejoin the buffers and dirty them so the log moves forward. */ for (i =0 ; i < bpcount; i++) {xfs_trans_bjoin (tp, bplist[i]); +if (ordered & (1U << i)) +xfs_trans_ordered_buf (tp, bplist[i]);xfs_trans_bhold (tp, bplist[i]); }
fs/xfs/xfs_dquot.c +43 -13
70 lines not on this page · raw message
fs/xfs/xfs_inode.c +3 -1
@@ -2592,8 +2592,10 @@ xfs_ifree_cluster( mp->m_bsize * igeo->blocks_per_cluster, XBF_UNMAPPED); -if (!bp) +if (!bp) { +xfs_perag_put (pag);return -ENOMEM ; + }/* * This buffer may not have been correctly initialised as we
fs/xfs/xfs_iomap.c +1 -1
@@ -789,7 +789,7 @@ xfs_iomap_write_unwritten(xfs_trans_ijoin (tp, ip,0 ); error =xfs_trans_reserve_quota_nblks (tp, ip, resblks,0 , -XFS_QMOPT_RES_REGBLKS ); +XFS_QMOPT_RES_REGBLKS |XFS_QMOPT_FORCE_RES );if (error) goto error_on_bmapi_transaction;
fs/xfs/xfs_trans.c +20 -143
192 lines not on this page · raw message
fs/xfs/xfs_trans_dquot.c +2 -1
@@ -756,7 +756,8 @@ xfs_trans_reserve_quota_bydquots( }if (gdqp) { - error =xfs_trans_dqresv (tp, mp, gdqp, nblks, ninos, flags); + error =xfs_trans_dqresv (tp, mp, gdqp, nblks, ninos, + (flags & ~XFS_QMOPT_ENOSPC ));if (error) goto unwind_usr; }
include/linux/efi.h +1 -1
@@ -1715,7 +1715,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
@@ -35,8 +35,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);/* This returns an error if we weren't able to handle the error. */
@@ -53,8 +51,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); /* This returns an error if we weren't able to handle the error. */
include/net/tcp.h +2 -0
@@ -922,6 +922,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
@@ -169,6 +169,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);
ipc/msg.c +1 -1
@@ -137,7 +137,7 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)key_t key = params->key;int msgflg = params->flg; - msq =kvmalloc (sizeof (*msq),GFP_KERNEL ); + msq =kvmalloc (sizeof (*msq),GFP_KERNEL_ACCOUNT );if (unlikely (!msq))return -ENOMEM ;
ipc/sem.c +3 -3
@@ -492,7 +492,7 @@ static struct sem_array *sem_alloc(size_t nsems)if (nsems > (INT_MAX -sizeof (*sma)) /sizeof (sma->sems[0 ]))return NULL ; - sma =kvzalloc (struct_size (sma, sems, nsems),GFP_KERNEL ); + sma =kvzalloc (struct_size (sma, sems, nsems),GFP_KERNEL_ACCOUNT );if (unlikely (!sma))return NULL ;
@@ -1835,7 +1835,7 @@ static inline int get_undo_list(struct sem_undo_list **undo_listp) undo_list = current->sysvsem.undo_list;if (!undo_list) { - undo_list =kzalloc (sizeof (*undo_list),GFP_KERNEL ); + undo_list =kzalloc (sizeof (*undo_list),GFP_KERNEL_ACCOUNT );if (undo_list ==NULL )return -ENOMEM ;spin_lock_init (&undo_list->lock);
@@ -1920,7 +1920,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)rcu_read_unlock ();/* step 2: allocate new undo structure */ - new =kzalloc (sizeof (struct sem_undo ) +sizeof (short )*nsems,GFP_KERNEL ); + new =kzalloc (sizeof (struct sem_undo ) +sizeof (short )*nsems,GFP_KERNEL_ACCOUNT );if (!new) {ipc_rcu_putref (&sma->sem_perm, sem_rcu_free);return ERR_PTR (-ENOMEM );
ipc/shm.c +1 -1
@@ -711,7 +711,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) ns->shm_tot + numpages > ns->shm_ctlall)return -ENOSPC ; - shp =kvmalloc (sizeof (*shp),GFP_KERNEL ); + shp =kvmalloc (sizeof (*shp),GFP_KERNEL_ACCOUNT );if (unlikely (!shp))return -ENOMEM ;
kernel/kprobes.c +4 -1
@@ -2199,8 +2199,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
@@ -373,7 +373,7 @@ static int __neigh_ifdown(struct neigh_table *tbl, struct net_device *dev,write_lock_bh (&tbl->lock);neigh_flush_dev (tbl, dev, skip_perm);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
@@ -1702,12 +1702,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 ,
@@ -1715,12 +1710,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 +22 -15
@@ -302,31 +302,38 @@ static inline bool ip_rcv_options(struct sk_buff *skb, struct net_device *dev)return true; } -INDIRECT_CALLABLE_DECLARE(int udp_v4_early_demux(struct sk_buff *)); -INDIRECT_CALLABLE_DECLARE(int tcp_v4_early_demux(struct sk_buff *)); +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; - - ipprot =rcu_dereference (inet_protos[protocol]); -if (ipprot && (edemux =READ_ONCE (ipprot->early_demux))) { - err =INDIRECT_CALL_2 (edemux, tcp_v4_early_demux, - udp_v4_early_demux, skb); -if (unlikely (err)) - goto drop_error; -/* must reload iph, skb->head might have changed */ - iph =ip_hdr (skb); +switch (iph->protocol) { +case IPPROTO_TCP : +if (READ_ONCE (net->ipv4.sysctl_tcp_early_demux)) { +tcp_v4_early_demux (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 -11
@@ -44,21 +44,25 @@#include <net/inet_ecn.h> #include <net/dst_metadata.h> -INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *)); -INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *)); +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))) -INDIRECT_CALL_2 (edemux, tcp_v6_early_demux, - udp_v6_early_demux, 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/ipv6_sockglue.c +7 -0
@@ -164,6 +164,12 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,rtnl_lock ();lock_sock (sk); +/* Another thread has converted the socket into IPv4 with +* IPV6_ADDRFORM concurrently. +*/ +if (unlikely (sk->sk_family !=AF_INET6 )) + goto unlock; +switch (optname) {case IPV6_ADDRFORM :
@@ -924,6 +930,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,break ; } +unlock:release_sock (sk);if (needs_rtnl)rtnl_unlock ();
net/ipv6/route.c +10 -4
@@ -6359,10 +6359,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
@@ -1729,7 +1729,7 @@ INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb) goto discard_it; } -INDIRECT_CALLABLE_SCOPE 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;
@@ -2084,12 +2084,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
@@ -973,7 +973,7 @@ static struct sock *__udp6_lib_demux_lookup(struct net *net,return NULL ; } -INDIRECT_CALLABLE_SCOPE 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;
@@ -1603,12 +1603,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
@@ -599,13 +599,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
@@ -1225,8 +1225,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.
@@ -1373,20 +1373,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/netfilter/nf_tables_api.c +3 -3
@@ -6576,9 +6576,6 @@ static void nft_commit_release(struct nft_trans *trans)nf_tables_chain_destroy (&trans->ctx);break ;case NFT_MSG_DELRULE : -if (trans->ctx.chain->flags &NFT_CHAIN_HW_OFFLOAD ) -nft_flow_rule_destroy (nft_trans_flow_rule (trans)); -nf_tables_rule_destroy (&trans->ctx,nft_trans_rule (trans));break ;case NFT_MSG_DELSET :
@@ -6913,6 +6910,9 @@ static int nf_tables_commit(struct net *net, struct sk_buff *skb)nft_rule_expr_deactivate (&trans->ctx,nft_trans_rule (trans),NFT_TRANS_COMMIT ); + +if (trans->ctx.chain->flags &NFT_CHAIN_HW_OFFLOAD ) +nft_flow_rule_destroy (nft_trans_flow_rule (trans));break ;case NFT_MSG_NEWSET :nft_clear (net,nft_trans_set (trans));
net/rose/rose_link.c +3 -0
@@ -236,6 +236,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
@@ -59,6 +59,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,
@@ -94,9 +95,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
@@ -391,8 +391,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
@@ -1440,6 +1440,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 ;
tools/include/nolibc/nolibc.h +2 -2
@@ -2318,9 +2318,9 @@ static __attribute__((unused))int memcmp (const void *s1,const void *s2,size_t n) {size_t ofs =0 ; -char c1 =0 ; +int c1 =0 ; -while (ofs < n && !(c1 = ((char *)s1)[ofs] - ((char *)s2)[ofs])) { +while (ofs < n && !(c1 = ((unsigned char *)s1)[ofs] - ((unsigned char *)s2)[ofs])) { ofs++; }return c1;