mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
This is the 5.4.198 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmKos2QACgkQONu9yGCS
aT4QYQ//WQD/rHjO021lbo/z4eZbWUxjDiQNisJQY4MTCnIJgPYROJ6YLBLL2+of
VwDdZ0yQNpf3hBA3qgTZ8RgaBinVf+WNAk37Ap/3VFXTExxgyGCx7p/PG+Jx9Jk4
qd9YPHZCu8g9rQjJoex95fd8Fedu47tzBSd88MoAKiLz90JsNbYUZb+gqdRrLAYc
6krd7zm7T8Grk31xUWOl/tlUSxveuUuz6QQr5mwPmSyspz4gQXsBlrKSrNSWmk0o
qtqgqUCypvpKTF7RYiEoS3F8wy4XvWpGsET+W79SJ84inVx3EMsZKXB9GsWVZZgI
fm3eFjn10NcgA+lvc7TJpwKg0f5g8uHW/06FcfYwgBhbI+otCFDLQkkHtViN0wY2
gks3PLPsYJdAZTlwIvjNY0XY7wRqjS7Ta1pf+d1po1EndEFAyH76KJaIGCzdVKb4
OeSEy4Xw8HxmuCO+mrUtRVRqV3Y7x88GuJC359iDKYdDpc+Z21FcvaVcgrR5cy2V
A7ICKIfNyArgNmWnXQ6UBXqS1rDcoyfJe+0CYyRRdgDO/ON48Mx8FIW9YJrSrMeS
XEx6cw6VKZ7hE1G71us/ITOOeUlHO93V7Ju+oOcx9Fgew8TZ0mdNMliOFUFaNWPb
iAG+zZD0jwP5iyx0KFfOJyyuoovEtjBh9ZgVIF5BP3Ry1xRHuHY=
=oE7B
-----END PGP SIGNATURE-----
Merge 5.4.198 into android11-5.4-lts
Changes in 5.4.198
binfmt_flat: do not stop relocating GOT entries prematurely on riscv
ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS
USB: serial: option: add Quectel BG95 modem
USB: new quirk for Dell Gen 2 devices
usb: core: hcd: Add support for deferring roothub registration
perf/x86/intel: Fix event constraints for ICL
ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
btrfs: add "0x" prefix for unsupported optional features
btrfs: repair super block num_devices automatically
drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
b43legacy: Fix assigning negative value to unsigned variable
b43: Fix assigning negative value to unsigned variable
ipw2x00: Fix potential NULL dereference in libipw_xmit()
ipv6: fix locking issues with loops over idev->addr_list
fbcon: Consistently protect deferred_takeover with console_lock()
ACPICA: Avoid cache flush inside virtual machines
drm/komeda: return early if drm_universal_plane_init() fails.
ALSA: jack: Access input_dev under mutex
spi: spi-rspi: Remove setting {src,dst}_{addr,addr_width} based on DMA direction
tools/power turbostat: fix ICX DRAM power numbers
drm/amd/pm: fix double free in si_parse_power_table()
ath9k: fix QCA9561 PA bias level
media: venus: hfi: avoid null dereference in deinit
media: pci: cx23885: Fix the error handling in cx23885_initdev()
media: cx25821: Fix the warning when removing the module
md/bitmap: don't set sb values if can't pass sanity check
mmc: jz4740: Apply DMA engine limits to maximum segment size
scsi: megaraid: Fix error check return value of register_chrdev()
drm/plane: Move range check for format_count earlier
drm/amd/pm: fix the compile warning
arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall
drm: msm: fix error check return value of irq_of_parse_and_map()
ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
net/mlx5: fs, delete the FTE when there are no rules attached to it
ASoC: dapm: Don't fold register value changes into notifications
mlxsw: spectrum_dcb: Do not warn about priority changes
drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo
HID: bigben: fix slab-out-of-bounds Write in bigben_probe
ASoC: tscs454: Add endianness flag in snd_soc_component_driver
s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
spi: stm32-qspi: Fix wait_cmd timeout in APM mode
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default
ipmi:ssif: Check for NULL msg when handling events and messages
ipmi: Fix pr_fmt to avoid compilation issues
rtlwifi: Use pr_warn instead of WARN_ONCE
media: coda: limit frame interval enumeration to supported encoder frame sizes
media: cec-adap.c: fix is_configuring state
openrisc: start CPU timer early in boot
nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
ASoC: rt5645: Fix errorenous cleanup order
nbd: Fix hung on disconnect request if socket is closed before
net: phy: micrel: Allow probing without .driver_data
media: exynos4-is: Fix compile warning
ASoC: max98357a: remove dependency on GPIOLIB
hwmon: Make chip parameter for with_info API mandatory
rxrpc: Return an error to sendmsg if call failed
eth: tg3: silence the GCC 12 array-bounds warning
selftests/bpf: fix btf_dump/btf_dump due to recent clang change
IB/rdmavt: add missing locks in rvt_ruc_loopback
ARM: dts: ox820: align interrupt controller node name with dtschema
PM / devfreq: rk3399_dmc: Disable edev on remove()
fs: jfs: fix possible NULL pointer dereference in dbFree()
ARM: OMAP1: clock: Fix UART rate reporting algorithm
powerpc/fadump: Fix fadump to work with a different endian capture kernel
fat: add ratelimit to fat*_ent_bread()
ARM: versatile: Add missing of_node_put in dcscb_init
ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
ARM: hisi: Add missing of_node_put after of_find_compatible_node
PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
powerpc/xics: fix refcount leak in icp_opal_init()
powerpc/powernv: fix missing of_node_put in uv_init()
macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
powerpc/iommu: Add missing of_node_put in iommu_init_early_dart
RDMA/hfi1: Prevent panic when SDMA is disabled
drm: fix EDID struct for old ARM OABI format
ath9k: fix ar9003_get_eepmisc
drm/edid: fix invalid EDID extension block filtering
drm/bridge: adv7511: clean up CEC adapter when probe fails
ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
x86/delay: Fix the wrong asm constraint in delay_loop()
drm/mediatek: Fix mtk_cec_mask()
drm/vc4: txp: Don't set TXP_VSTART_AT_EOF
drm/vc4: txp: Force alpha to be 0xff if it's disabled
bpf: Fix excessive memory allocation in stack_map_alloc()
nl80211: show SSID for P2P_GO interfaces
drm/komeda: Fix an undefined behavior bug in komeda_plane_add()
drm: mali-dp: potential dereference of null pointer
spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
NFC: NULL out the dev->rfkill to prevent UAF
efi: Add missing prototype for efi_capsule_setup_info
drbd: fix duplicate array initializer
HID: hid-led: fix maximum brightness for Dream Cheeky
HID: elan: Fix potential double free in elan_input_configured
drm/bridge: Fix error handling in analogix_dp_probe
sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq
spi: img-spfi: Fix pm_runtime_get_sync() error checking
cpufreq: Fix possible race in cpufreq online error path
ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
inotify: show inotify mask flags in proc fdinfo
fsnotify: fix wrong lockdep annotations
of: overlay: do not break notify on NOTIFY_{OK|STOP}
scsi: ufs: core: Exclude UECxx from SFR dump list
x86/pm: Fix false positive kmemleak report in msr_build_context()
x86/speculation: Add missing prototype for unpriv_ebpf_notify()
ASoC: rk3328: fix disabling mclk on pclk probe failure
perf tools: Add missing headers needed by util/data.h
drm/msm/disp/dpu1: set vbif hw config to NULL to avoid use after memory free during pm runtime resume
drm/msm/dsi: fix error checks and return values for DSI xmit functions
drm/msm/hdmi: check return value after calling platform_get_resource_byname()
drm/msm/hdmi: fix error check return value of irq_of_parse_and_map()
drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
virtio_blk: fix the discard_granularity and discard_alignment queue limits
x86: Fix return value of __setup handlers
irqchip/exiu: Fix acknowledgment of edge triggered interrupts
irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
x86/mm: Cleanup the control_va_addr_alignment() __setup handler
regulator: core: Fix enable_count imbalance with EXCLUSIVE_GET
drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected
drm/msm/mdp5: Return error code in mdp5_mixer_release when deadlock is detected
drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
media: uvcvideo: Fix missing check to determine if element is found in list
iomap: iomap_write_failed fix
Revert "cpufreq: Fix possible race in cpufreq online error path"
perf/amd/ibs: Use interrupt regs ip for stack unwinding
ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe
ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
scripts/faddr2line: Fix overlapping text section failures
media: aspeed: Fix an error handling path in aspeed_video_probe()
media: st-delta: Fix PM disable depth imbalance in delta_probe
media: exynos4-is: Change clk_disable to clk_disable_unprepare
media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
media: vsp1: Fix offset calculation for plane cropping
Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
m68k: math-emu: Fix dependencies of math emulation support
sctp: read sk->sk_bound_dev_if once in sctp_rcv()
media: ov7670: remove ov7670_power_off from ov7670_remove
ext4: reject the 'commit' option on ext2 filesystems
drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe
ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx
rxrpc: Fix listen() setting the bar too high for the prealloc rings
rxrpc: Don't try to resend the request if we're receiving the reply
rxrpc: Fix overlapping ACK accounting
rxrpc: Don't let ack.previousPacket regress
rxrpc: Fix decision on when to generate an IDLE ACK
net/smc: postpone sk_refcnt increment in connect()
arm64: dts: rockchip: Move drive-impedance-ohm to emmc phy on rk3399
ARM: dts: suniv: F1C100: fix watchdog compatible
soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
PCI: cadence: Fix find_first_zero_bit() limit
PCI: rockchip: Fix find_first_zero_bit() limit
KVM: nVMX: Leave most VM-Exit info fields unmodified on failed VM-Entry
can: xilinx_can: mark bit timing constants as const
ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT
ARM: dts: bcm2837-rpi-cm3-io3: Fix GPIO line names for SMPS I2C
ARM: dts: bcm2837-rpi-3-b-plus: Fix GPIO line name of power LED
ARM: dts: bcm2835-rpi-b: Fix GPIO line names
misc: ocxl: fix possible double free in ocxl_file_register_afu
crypto: marvell/cesa - ECB does not IV
arm: mediatek: select arch timer for mt7629
powerpc/fadump: fix PT_LOAD segment for boot memory area
mfd: ipaq-micro: Fix error check return value of platform_get_irq()
scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
firmware: arm_scmi: Fix list protocols enumeration in the base protocol
nvdimm: Allow overwrite in the presence of disabled dimms
pinctrl: mvebu: Fix irq_of_parse_and_map() return value
drivers/base/node.c: fix compaction sysfs file leak
dax: fix cache flush on PMD-mapped pages
powerpc/8xx: export 'cpm_setbrg' for modules
powerpc/idle: Fix return value of __setup() handler
powerpc/4xx/cpm: Fix return value of __setup() handler
proc: fix dentry/inode overinstantiating under /proc/${pid}/net
ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
PCI: imx6: Fix PERST# start-up sequence
tty: fix deadlock caused by calling printk() under tty_port->lock
crypto: cryptd - Protect per-CPU resource by disabling BH.
Input: sparcspkr - fix refcount leak in bbc_beep_probe
powerpc/64: Only WARN if __pa()/__va() called with bad addresses
powerpc/perf: Fix the threshold compare group constraint for power9
macintosh: via-pmu and via-cuda need RTC_LIB
powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe()
mailbox: forward the hrtimer if not queued and under a lock
RDMA/hfi1: Prevent use of lock before it is initialized
Input: stmfts - do not leave device disabled in stmfts_input_open
f2fs: fix dereference of stale list iterator after loop body
iommu/mediatek: Add list_del in mtk_iommu_remove
i2c: at91: use dma safe buffers
i2c: at91: Initialize dma_buf in at91_twi_xfer()
NFS: Do not report EINTR/ERESTARTSYS as mapping errors
NFS: Do not report flush errors in nfs_write_end()
NFS: Don't report errors from nfs_pageio_complete() more than once
NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout
video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
dmaengine: stm32-mdma: remove GISR1 register
iommu/amd: Increase timeout waiting for GA log enablement
perf c2c: Use stdio interface if slang is not supported
perf jevents: Fix event syntax error caused by ExtSel
f2fs: fix to avoid f2fs_bug_on() in dec_valid_node_count()
f2fs: fix to do sanity check on block address in f2fs_do_zero_range()
f2fs: fix to clear dirty inode in f2fs_evict_inode()
f2fs: fix deadloop in foreground GC
f2fs: don't need inode lock for system hidden quota
f2fs: fix fallocate to use file_modified to update permissions consistently
wifi: mac80211: fix use-after-free in chanctx code
iwlwifi: mvm: fix assert 1F04 upon reconfig
fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
efi: Do not import certificates from UEFI Secure Boot for T2 Macs
bfq: Split shared queues on move between cgroups
bfq: Update cgroup information before merging bio
bfq: Track whether bfq_group is still online
netfilter: nf_tables: disallow non-stateful expression in sets earlier
ext4: fix use-after-free in ext4_rename_dir_prepare
ext4: fix warning in ext4_handle_inode_extension
ext4: fix bug_on in ext4_writepages
ext4: verify dir block before splitting it
ext4: avoid cycles in directory h-tree
ACPI: property: Release subnode properties with data nodes
tracing: Fix potential double free in create_var_ref()
PCI/PM: Fix bridge_d3_blacklist[] Elo i2 overwrite of Gigabyte X299
PCI: qcom: Fix runtime PM imbalance on probe errors
PCI: qcom: Fix unbalanced PHY init on probe errors
mm, compaction: fast_find_migrateblock() should return pfn in the target zone
dlm: fix plock invalid read
dlm: fix missing lkb refcount handling
ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
scsi: dc395x: Fix a missing check on list iterator
scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem
drm/nouveau/clk: Fix an incorrect NULL check on list iterator
drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
md: fix an incorrect NULL check in does_sb_need_changing
md: fix an incorrect NULL check in md_reload_sb
mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
media: coda: Fix reported H264 profile
media: coda: Add more H264 levels for CODA960
Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug
RDMA/hfi1: Fix potential integer multiplication overflow errors
irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
irqchip: irq-xtensa-mx: fix initial IRQ affinity
mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
um: chan_user: Fix winch_tramp() return value
um: Fix out-of-bounds read in LDT setup
iommu/msm: Fix an incorrect NULL check on list iterator
nodemask.h: fix compilation error with GCC12
hugetlb: fix huge_pmd_unshare address update
rtl818x: Prevent using not initialized queues
ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
carl9170: tx: fix an incorrect use of list iterator
serial: pch: don't overwrite xmit->buf[0] by x_char
tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator
gma500: fix an incorrect NULL check on list iterator
arm64: dts: qcom: ipq8074: fix the sleep clock frequency
phy: qcom-qmp: fix struct clk leak on probe errors
ARM: pxa: maybe fix gpio lookup tables
docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
dt-bindings: gpio: altera: correct interrupt-cells
blk-iolatency: Fix inflight count imbalances and IO hangs on offline
phy: qcom-qmp: fix reset-controller leak on probe errors
Kconfig: add config option for asm goto w/ outputs
RDMA/rxe: Generate a completion for unsupported/invalid opcode
MIPS: IP27: Remove incorrect `cpu_has_fpu' override
bfq: Avoid merging queues with different parents
bfq: Drop pointless unlock-lock pair
bfq: Remove pointless bfq_init_rq() calls
bfq: Get rid of __bio_blkcg() usage
bfq: Make sure bfqg for which we are queueing requests is online
block: fix bio_clone_blkg_association() to associate with proper blkcg_gq
md: bcache: check the return value of kzalloc() in detached_dev_do_request()
pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
staging: greybus: codecs: fix type confusion of list iterator variable
iio: adc: ad7124: Remove shift from scan_type
tty: goldfish: Use tty_port_destroy() to destroy port
tty: serial: owl: Fix missing clk_disable_unprepare() in owl_uart_probe
tty: serial: fsl_lpuart: fix potential bug when using both of_alias_get_id and ida_simple_get
usb: usbip: fix a refcount leak in stub_probe()
usb: usbip: add missing device lock on tweak configuration cmd
USB: storage: karma: fix rio_karma_init return
usb: musb: Fix missing of_node_put() in omap2430_probe
staging: fieldbus: Fix the error handling path in anybuss_host_common_probe()
pwm: lp3943: Fix duty calculation in case period was clamped
rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value
usb: dwc3: pci: Fix pm_runtime_get_sync() error checking
firmware: stratix10-svc: fix a missing check on list iterator
iio: adc: stmpe-adc: Fix wait_for_completion_timeout return value check
iio: adc: sc27xx: fix read big scale voltage not right
iio: adc: sc27xx: Fine tune the scale calibration values
rpmsg: qcom_smd: Fix returning 0 if irq_of_parse_and_map() fails
phy: qcom-qmp: fix pipe-clock imbalance on power-on failure
serial: sifive: Report actual baud base rather than fixed 115200
coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier
soc: rockchip: Fix refcount leak in rockchip_grf_init
clocksource/drivers/riscv: Events are stopped during CPU suspend
rtc: mt6397: check return value after calling platform_get_resource()
serial: meson: acquire port->lock in startup()
serial: 8250_fintek: Check SER_RS485_RTS_* only with RS485
serial: digicolor-usart: Don't allow CS5-6
serial: rda-uart: Don't allow CS5-6
serial: txx9: Don't allow CS5-6
serial: sh-sci: Don't allow CS5-6
serial: sifive: Sanitize CSIZE and c_iflag
serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
serial: stm32-usart: Correct CSIZE, bits, and parity
firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
bus: ti-sysc: Fix warnings for unbind for serial
driver: base: fix UAF when driver_attach failed
driver core: fix deadlock in __device_attach
watchdog: ts4800_wdt: Fix refcount leak in ts4800_wdt_probe
ASoC: fsl_sai: Fix FSL_SAI_xDR/xFR definition
clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
s390/crypto: fix scatterwalk_unmap() callers in AES-GCM
net: sched: fixed barrier to prevent skbuff sticking in qdisc backlog
net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register
modpost: fix removing numeric suffixes
jffs2: fix memory leak in jffs2_do_fill_super
ubi: ubi_create_volume: Fix use-after-free when volume creation failed
nfp: only report pause frame configuration for physical device
net/mlx5: Don't use already freed action pointer
net/mlx5e: Update netdev features after changing XDP state
net: sched: add barrier to fix packet stuck problem for lockless qdisc
tcp: tcp_rtx_synack() can be called from process context
afs: Fix infinite loop found by xfstest generic/676
tipc: check attribute length for bearer name
perf c2c: Fix sorting in percent_rmt_hitm_cmp()
mips: cpc: Fix refcount leak in mips_cpc_default_phys_base
tracing: Fix sleeping function called from invalid context on RT kernel
tracing: Avoid adding tracer option before update_tracer_options
f2fs: remove WARN_ON in f2fs_is_valid_blkaddr
i2c: cadence: Increase timeout per message if necessary
m68knommu: set ZERO_PAGE() to the allocated zeroed page
m68knommu: fix undefined reference to `_init_sp'
dmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type
NFSv4: Don't hold the layoutget locks across multiple RPC calls
video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
xprtrdma: treat all calls not a bcall when bc_serv is NULL
netfilter: nat: really support inet nat without l3 address
ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
netfilter: nf_tables: memleak flow rule from commit path
xen: unexport __init-annotated xen_xlate_map_ballooned_pages()
af_unix: Fix a data-race in unix_dgram_peer_wake_me().
bpf, arm64: Clear prog->jited_len along prog->jited
net: dsa: lantiq_gswip: Fix refcount leak in gswip_gphy_fw_list
net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
net: mdio: unexport __init-annotated mdio_bus_init()
net: xfrm: unexport __init-annotated xfrm4_protocol_init()
net: ipv6: unexport __init-annotated seg6_hmac_init()
net/mlx5: Rearm the FW tracer after each tracer event
net/mlx5: fs, fail conflicting actions
ip_gre: test csum_start instead of transport header
net: altera: Fix refcount leak in altera_tse_mdio_create
drm: imx: fix compiler warning with gcc-12
iio: dummy: iio_simple_dummy: check the return value of kstrdup()
iio: st_sensors: Add a local lock for protecting odr
lkdtm/usercopy: Expand size of "out of frame" object
tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
tty: Fix a possible resource leak in icom_probe
drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()
drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
USB: host: isp116x: check return value after calling platform_get_resource()
drivers: tty: serial: Fix deadlock in sa1100_set_termios()
drivers: usb: host: Fix deadlock in oxu_bus_suspend()
USB: hcd-pci: Fully suspend across freeze/thaw cycle
usb: dwc2: gadget: don't reset gadget's driver->bus
misc: rtsx: set NULL intfdata when probe fails
extcon: Modify extcon device to be created after driver data is set
clocksource/drivers/sp804: Avoid error on multiple instances
staging: rtl8712: fix uninit-value in usb_read8() and friends
staging: rtl8712: fix uninit-value in r871xu_drv_init()
serial: msm_serial: disable interrupts in __msm_console_write()
kernfs: Separate kernfs_pr_cont_buf and rename_lock.
watchdog: wdat_wdt: Stop watchdog when rebooting the system
md: protect md_unregister_thread from reentrancy
scsi: myrb: Fix up null pointer access on myrb_cleanup()
Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
ceph: allow ceph.dir.rctime xattr to be updatable
drm/radeon: fix a possible null pointer dereference
modpost: fix undefined behavior of is_arm_mapping_symbol()
x86/cpu: Elide KCSAN for cpu_has() and friends
nbd: call genl_unregister_family() first in nbd_cleanup()
nbd: fix race between nbd_alloc_config() and module removal
nbd: fix io hung while disconnecting device
s390/gmap: voluntarily schedule during key setting
cifs: version operations for smb20 unneeded when legacy support disabled
nodemask: Fix return values to be unsigned
vringh: Fix loop descriptors check in the indirect cases
scripts/gdb: change kernel config dumping method
ALSA: hda/conexant - Fix loopback issue with CX20632
cifs: return errors during session setup during reconnects
ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
mmc: block: Fix CQE recovery reset success
nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
ixgbe: fix bcast packets Rx on VF after promisc removal
ixgbe: fix unexpected VLAN Rx in promisc mode on VF
Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
powerpc/32: Fix overread/overwrite of thread_struct via ptrace
md/raid0: Ignore RAID0 layout if the second zone has only one device
mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
Linux 5.4.198
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: I05615e33dbd0029f93c9724c9abc9cb9035122d2
This commit is contained in:
commit
a778a36923
413 changed files with 2500 additions and 1316 deletions
|
|
@ -415,8 +415,11 @@ static int afs_dir_iterate_block(struct afs_vnode *dvnode,
|
|||
}
|
||||
|
||||
/* skip if starts before the current position */
|
||||
if (offset < curr)
|
||||
if (offset < curr) {
|
||||
if (next > curr)
|
||||
ctx->pos = blkoff + next * sizeof(union afs_xdr_dirent);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* found the next entry */
|
||||
if (!dir_emit(ctx, dire->u.name, nlen,
|
||||
|
|
|
|||
|
|
@ -422,6 +422,30 @@ static void old_reloc(unsigned long rl)
|
|||
|
||||
/****************************************************************************/
|
||||
|
||||
static inline u32 __user *skip_got_header(u32 __user *rp)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_RISCV)) {
|
||||
/*
|
||||
* RISC-V has a 16 byte GOT PLT header for elf64-riscv
|
||||
* and 8 byte GOT PLT header for elf32-riscv.
|
||||
* Skip the whole GOT PLT header, since it is reserved
|
||||
* for the dynamic linker (ld.so).
|
||||
*/
|
||||
u32 rp_val0, rp_val1;
|
||||
|
||||
if (get_user(rp_val0, rp))
|
||||
return rp;
|
||||
if (get_user(rp_val1, rp + 1))
|
||||
return rp;
|
||||
|
||||
if (rp_val0 == 0xffffffff && rp_val1 == 0xffffffff)
|
||||
rp += 4;
|
||||
else if (rp_val0 == 0xffffffff)
|
||||
rp += 2;
|
||||
}
|
||||
return rp;
|
||||
}
|
||||
|
||||
static int load_flat_file(struct linux_binprm *bprm,
|
||||
struct lib_info *libinfo, int id, unsigned long *extra_stack)
|
||||
{
|
||||
|
|
@ -769,7 +793,8 @@ static int load_flat_file(struct linux_binprm *bprm,
|
|||
* image.
|
||||
*/
|
||||
if (flags & FLAT_FLAG_GOTPIC) {
|
||||
for (rp = (u32 __user *)datapos; ; rp++) {
|
||||
rp = skip_got_header((u32 __user *) datapos);
|
||||
for (; ; rp++) {
|
||||
u32 addr, rp_val;
|
||||
if (get_user(rp_val, rp))
|
||||
return -EFAULT;
|
||||
|
|
|
|||
|
|
@ -2927,7 +2927,7 @@ int open_ctree(struct super_block *sb,
|
|||
~BTRFS_FEATURE_INCOMPAT_SUPP;
|
||||
if (features) {
|
||||
btrfs_err(fs_info,
|
||||
"cannot mount because of unsupported optional features (%llx)",
|
||||
"cannot mount because of unsupported optional features (0x%llx)",
|
||||
features);
|
||||
err = -EINVAL;
|
||||
goto fail_csum;
|
||||
|
|
@ -2965,7 +2965,7 @@ int open_ctree(struct super_block *sb,
|
|||
~BTRFS_FEATURE_COMPAT_RO_SUPP;
|
||||
if (!sb_rdonly(sb) && features) {
|
||||
btrfs_err(fs_info,
|
||||
"cannot mount read-write because of unsupported optional features (%llx)",
|
||||
"cannot mount read-write because of unsupported optional features (0x%llx)",
|
||||
features);
|
||||
err = -EINVAL;
|
||||
goto fail_csum;
|
||||
|
|
|
|||
|
|
@ -7383,12 +7383,12 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
|
|||
* do another round of validation checks.
|
||||
*/
|
||||
if (total_dev != fs_info->fs_devices->total_devices) {
|
||||
btrfs_err(fs_info,
|
||||
"super_num_devices %llu mismatch with num_devices %llu found here",
|
||||
btrfs_warn(fs_info,
|
||||
"super block num_devices %llu mismatch with DEV_ITEM count %llu, will be repaired on next transaction commit",
|
||||
btrfs_super_num_devices(fs_info->super_copy),
|
||||
total_dev);
|
||||
ret = -EINVAL;
|
||||
goto error;
|
||||
fs_info->fs_devices->total_devices = total_dev;
|
||||
btrfs_set_super_num_devices(fs_info->super_copy, total_dev);
|
||||
}
|
||||
if (btrfs_super_total_bytes(fs_info->super_copy) <
|
||||
fs_info->fs_devices->total_rw_bytes) {
|
||||
|
|
|
|||
|
|
@ -316,6 +316,14 @@ static ssize_t ceph_vxattrcb_snap_btime(struct ceph_inode_info *ci, char *val,
|
|||
}
|
||||
#define XATTR_RSTAT_FIELD(_type, _name) \
|
||||
XATTR_NAME_CEPH(_type, _name, VXATTR_FLAG_RSTAT)
|
||||
#define XATTR_RSTAT_FIELD_UPDATABLE(_type, _name) \
|
||||
{ \
|
||||
.name = CEPH_XATTR_NAME(_type, _name), \
|
||||
.name_size = sizeof (CEPH_XATTR_NAME(_type, _name)), \
|
||||
.getxattr_cb = ceph_vxattrcb_ ## _type ## _ ## _name, \
|
||||
.exists_cb = NULL, \
|
||||
.flags = VXATTR_FLAG_RSTAT, \
|
||||
}
|
||||
#define XATTR_LAYOUT_FIELD(_type, _name, _field) \
|
||||
{ \
|
||||
.name = CEPH_XATTR_NAME2(_type, _name, _field), \
|
||||
|
|
@ -353,7 +361,7 @@ static struct ceph_vxattr ceph_dir_vxattrs[] = {
|
|||
XATTR_RSTAT_FIELD(dir, rfiles),
|
||||
XATTR_RSTAT_FIELD(dir, rsubdirs),
|
||||
XATTR_RSTAT_FIELD(dir, rbytes),
|
||||
XATTR_RSTAT_FIELD(dir, rctime),
|
||||
XATTR_RSTAT_FIELD_UPDATABLE(dir, rctime),
|
||||
{
|
||||
.name = "ceph.dir.pin",
|
||||
.name_size = sizeof("ceph.dir.pin"),
|
||||
|
|
|
|||
|
|
@ -1930,11 +1930,13 @@ extern mempool_t *cifs_mid_poolp;
|
|||
|
||||
/* Operations for different SMB versions */
|
||||
#define SMB1_VERSION_STRING "1.0"
|
||||
#define SMB20_VERSION_STRING "2.0"
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
extern struct smb_version_operations smb1_operations;
|
||||
extern struct smb_version_values smb1_values;
|
||||
#define SMB20_VERSION_STRING "2.0"
|
||||
extern struct smb_version_operations smb20_operations;
|
||||
extern struct smb_version_values smb20_values;
|
||||
#endif /* CIFS_ALLOW_INSECURE_LEGACY */
|
||||
#define SMB21_VERSION_STRING "2.1"
|
||||
extern struct smb_version_operations smb21_operations;
|
||||
extern struct smb_version_values smb21_values;
|
||||
|
|
|
|||
|
|
@ -3487,11 +3487,13 @@ smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
static bool
|
||||
smb2_is_read_op(__u32 oplock)
|
||||
{
|
||||
return oplock == SMB2_OPLOCK_LEVEL_II;
|
||||
}
|
||||
#endif /* CIFS_ALLOW_INSECURE_LEGACY */
|
||||
|
||||
static bool
|
||||
smb21_is_read_op(__u32 oplock)
|
||||
|
|
@ -4573,7 +4575,7 @@ out:
|
|||
return rc;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
struct smb_version_operations smb20_operations = {
|
||||
.compare_fids = smb2_compare_fids,
|
||||
.setup_request = smb2_setup_request,
|
||||
|
|
@ -4670,6 +4672,7 @@ struct smb_version_operations smb20_operations = {
|
|||
.fiemap = smb3_fiemap,
|
||||
.llseek = smb3_llseek,
|
||||
};
|
||||
#endif /* CIFS_ALLOW_INSECURE_LEGACY */
|
||||
|
||||
struct smb_version_operations smb21_operations = {
|
||||
.compare_fids = smb2_compare_fids,
|
||||
|
|
@ -4987,6 +4990,7 @@ struct smb_version_operations smb311_operations = {
|
|||
.llseek = smb3_llseek,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
struct smb_version_values smb20_values = {
|
||||
.version_string = SMB20_VERSION_STRING,
|
||||
.protocol_id = SMB20_PROT_ID,
|
||||
|
|
@ -5007,6 +5011,7 @@ struct smb_version_values smb20_values = {
|
|||
.signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
|
||||
.create_lease_size = sizeof(struct create_lease),
|
||||
};
|
||||
#endif /* ALLOW_INSECURE_LEGACY */
|
||||
|
||||
struct smb_version_values smb21_values = {
|
||||
.version_string = SMB21_VERSION_STRING,
|
||||
|
|
|
|||
|
|
@ -356,6 +356,9 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)
|
|||
rc = -EHOSTDOWN;
|
||||
mutex_unlock(&tcon->ses->session_mutex);
|
||||
goto failed;
|
||||
} else if (rc) {
|
||||
mutex_unlock(&ses->session_mutex);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (rc || !tcon->need_reconnect) {
|
||||
|
|
|
|||
3
fs/dax.c
3
fs/dax.c
|
|
@ -819,7 +819,8 @@ static void dax_entry_mkclean(struct address_space *mapping, pgoff_t index,
|
|||
if (!pmd_dirty(*pmdp) && !pmd_write(*pmdp))
|
||||
goto unlock_pmd;
|
||||
|
||||
flush_cache_page(vma, address, pfn);
|
||||
flush_cache_range(vma, address,
|
||||
address + HPAGE_PMD_SIZE);
|
||||
pmd = pmdp_invalidate(vma, address, pmdp);
|
||||
pmd = pmd_wrprotect(pmd);
|
||||
pmd = pmd_mkclean(pmd);
|
||||
|
|
|
|||
|
|
@ -1551,6 +1551,7 @@ static int _remove_from_waiters(struct dlm_lkb *lkb, int mstype,
|
|||
lkb->lkb_wait_type = 0;
|
||||
lkb->lkb_flags &= ~DLM_IFL_OVERLAP_CANCEL;
|
||||
lkb->lkb_wait_count--;
|
||||
unhold_lkb(lkb);
|
||||
goto out_del;
|
||||
}
|
||||
|
||||
|
|
@ -1577,6 +1578,7 @@ static int _remove_from_waiters(struct dlm_lkb *lkb, int mstype,
|
|||
log_error(ls, "remwait error %x reply %d wait_type %d overlap",
|
||||
lkb->lkb_id, mstype, lkb->lkb_wait_type);
|
||||
lkb->lkb_wait_count--;
|
||||
unhold_lkb(lkb);
|
||||
lkb->lkb_wait_type = 0;
|
||||
}
|
||||
|
||||
|
|
@ -5312,11 +5314,16 @@ int dlm_recover_waiters_post(struct dlm_ls *ls)
|
|||
lkb->lkb_flags &= ~DLM_IFL_OVERLAP_UNLOCK;
|
||||
lkb->lkb_flags &= ~DLM_IFL_OVERLAP_CANCEL;
|
||||
lkb->lkb_wait_type = 0;
|
||||
lkb->lkb_wait_count = 0;
|
||||
/* drop all wait_count references we still
|
||||
* hold a reference for this iteration.
|
||||
*/
|
||||
while (lkb->lkb_wait_count) {
|
||||
lkb->lkb_wait_count--;
|
||||
unhold_lkb(lkb);
|
||||
}
|
||||
mutex_lock(&ls->ls_waiters_mutex);
|
||||
list_del_init(&lkb->lkb_wait_reply);
|
||||
mutex_unlock(&ls->ls_waiters_mutex);
|
||||
unhold_lkb(lkb); /* for waiters list */
|
||||
|
||||
if (oc || ou) {
|
||||
/* do an unlock or cancel instead of resending */
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ struct plock_op {
|
|||
struct list_head list;
|
||||
int done;
|
||||
struct dlm_plock_info info;
|
||||
int (*callback)(struct file_lock *fl, int result);
|
||||
};
|
||||
|
||||
struct plock_xop {
|
||||
struct plock_op xop;
|
||||
int (*callback)(struct file_lock *fl, int result);
|
||||
void *fl;
|
||||
void *file;
|
||||
struct file_lock flc;
|
||||
|
|
@ -129,19 +129,18 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|||
/* fl_owner is lockd which doesn't distinguish
|
||||
processes on the nfs client */
|
||||
op->info.owner = (__u64) fl->fl_pid;
|
||||
xop->callback = fl->fl_lmops->lm_grant;
|
||||
op->callback = fl->fl_lmops->lm_grant;
|
||||
locks_init_lock(&xop->flc);
|
||||
locks_copy_lock(&xop->flc, fl);
|
||||
xop->fl = fl;
|
||||
xop->file = file;
|
||||
} else {
|
||||
op->info.owner = (__u64)(long) fl->fl_owner;
|
||||
xop->callback = NULL;
|
||||
}
|
||||
|
||||
send_op(op);
|
||||
|
||||
if (xop->callback == NULL) {
|
||||
if (!op->callback) {
|
||||
rv = wait_event_interruptible(recv_wq, (op->done != 0));
|
||||
if (rv == -ERESTARTSYS) {
|
||||
log_debug(ls, "dlm_posix_lock: wait killed %llx",
|
||||
|
|
@ -203,7 +202,7 @@ static int dlm_plock_callback(struct plock_op *op)
|
|||
file = xop->file;
|
||||
flc = &xop->flc;
|
||||
fl = xop->fl;
|
||||
notify = xop->callback;
|
||||
notify = op->callback;
|
||||
|
||||
if (op->info.rv) {
|
||||
notify(fl, op->info.rv);
|
||||
|
|
@ -436,10 +435,9 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
|
|||
if (op->info.fsid == info.fsid &&
|
||||
op->info.number == info.number &&
|
||||
op->info.owner == info.owner) {
|
||||
struct plock_xop *xop = (struct plock_xop *)op;
|
||||
list_del_init(&op->list);
|
||||
memcpy(&op->info, &info, sizeof(info));
|
||||
if (xop->callback)
|
||||
if (op->callback)
|
||||
do_callback = 1;
|
||||
else
|
||||
op->done = 1;
|
||||
|
|
|
|||
|
|
@ -2032,6 +2032,18 @@ int ext4_convert_inline_data(struct inode *inode)
|
|||
if (!ext4_has_inline_data(inode)) {
|
||||
ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);
|
||||
return 0;
|
||||
} else if (!ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
|
||||
/*
|
||||
* Inode has inline data but EXT4_STATE_MAY_INLINE_DATA is
|
||||
* cleared. This means we are in the middle of moving of
|
||||
* inline data to delay allocated block. Just force writeout
|
||||
* here to finish conversion.
|
||||
*/
|
||||
error = filemap_flush(inode->i_mapping);
|
||||
if (error)
|
||||
return error;
|
||||
if (!ext4_has_inline_data(inode))
|
||||
return 0;
|
||||
}
|
||||
|
||||
needed_blocks = ext4_writepage_trans_blocks(inode);
|
||||
|
|
|
|||
|
|
@ -5722,6 +5722,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
|
|||
if (attr->ia_valid & ATTR_SIZE) {
|
||||
handle_t *handle;
|
||||
loff_t oldsize = inode->i_size;
|
||||
loff_t old_disksize;
|
||||
int shrink = (attr->ia_size < inode->i_size);
|
||||
|
||||
if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
|
||||
|
|
@ -5777,6 +5778,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
|
|||
inode->i_ctime = inode->i_mtime;
|
||||
}
|
||||
down_write(&EXT4_I(inode)->i_data_sem);
|
||||
old_disksize = EXT4_I(inode)->i_disksize;
|
||||
EXT4_I(inode)->i_disksize = attr->ia_size;
|
||||
rc = ext4_mark_inode_dirty(handle, inode);
|
||||
if (!error)
|
||||
|
|
@ -5788,6 +5790,8 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
|
|||
*/
|
||||
if (!error)
|
||||
i_size_write(inode, attr->ia_size);
|
||||
else
|
||||
EXT4_I(inode)->i_disksize = old_disksize;
|
||||
up_write(&EXT4_I(inode)->i_data_sem);
|
||||
ext4_journal_stop(handle);
|
||||
if (error)
|
||||
|
|
|
|||
|
|
@ -273,9 +273,9 @@ static struct dx_frame *dx_probe(struct ext4_filename *fname,
|
|||
struct dx_hash_info *hinfo,
|
||||
struct dx_frame *frame);
|
||||
static void dx_release(struct dx_frame *frames);
|
||||
static int dx_make_map(struct inode *dir, struct ext4_dir_entry_2 *de,
|
||||
unsigned blocksize, struct dx_hash_info *hinfo,
|
||||
struct dx_map_entry map[]);
|
||||
static int dx_make_map(struct inode *dir, struct buffer_head *bh,
|
||||
struct dx_hash_info *hinfo,
|
||||
struct dx_map_entry *map_tail);
|
||||
static void dx_sort_map(struct dx_map_entry *map, unsigned count);
|
||||
static struct ext4_dir_entry_2 *dx_move_dirents(struct inode *dir, char *from,
|
||||
char *to, struct dx_map_entry *offsets,
|
||||
|
|
@ -757,12 +757,14 @@ static struct dx_frame *
|
|||
dx_probe(struct ext4_filename *fname, struct inode *dir,
|
||||
struct dx_hash_info *hinfo, struct dx_frame *frame_in)
|
||||
{
|
||||
unsigned count, indirect;
|
||||
unsigned count, indirect, level, i;
|
||||
struct dx_entry *at, *entries, *p, *q, *m;
|
||||
struct dx_root *root;
|
||||
struct dx_frame *frame = frame_in;
|
||||
struct dx_frame *ret_err = ERR_PTR(ERR_BAD_DX_DIR);
|
||||
u32 hash;
|
||||
ext4_lblk_t block;
|
||||
ext4_lblk_t blocks[EXT4_HTREE_LEVEL];
|
||||
|
||||
memset(frame_in, 0, EXT4_HTREE_LEVEL * sizeof(frame_in[0]));
|
||||
frame->bh = ext4_read_dirblock(dir, 0, INDEX);
|
||||
|
|
@ -834,6 +836,8 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
|
|||
}
|
||||
|
||||
dxtrace(printk("Look up %x", hash));
|
||||
level = 0;
|
||||
blocks[0] = 0;
|
||||
while (1) {
|
||||
count = dx_get_count(entries);
|
||||
if (!count || count > dx_get_limit(entries)) {
|
||||
|
|
@ -875,15 +879,27 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
|
|||
dx_get_block(at)));
|
||||
frame->entries = entries;
|
||||
frame->at = at;
|
||||
if (!indirect--)
|
||||
|
||||
block = dx_get_block(at);
|
||||
for (i = 0; i <= level; i++) {
|
||||
if (blocks[i] == block) {
|
||||
ext4_warning_inode(dir,
|
||||
"dx entry: tree cycle block %u points back to block %u",
|
||||
blocks[level], block);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
if (++level > indirect)
|
||||
return frame;
|
||||
blocks[level] = block;
|
||||
frame++;
|
||||
frame->bh = ext4_read_dirblock(dir, dx_get_block(at), INDEX);
|
||||
frame->bh = ext4_read_dirblock(dir, block, INDEX);
|
||||
if (IS_ERR(frame->bh)) {
|
||||
ret_err = (struct dx_frame *) frame->bh;
|
||||
frame->bh = NULL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
entries = ((struct dx_node *) frame->bh->b_data)->entries;
|
||||
|
||||
if (dx_get_limit(entries) != dx_node_limit(dir)) {
|
||||
|
|
@ -1246,15 +1262,23 @@ static inline int search_dirblock(struct buffer_head *bh,
|
|||
* Create map of hash values, offsets, and sizes, stored at end of block.
|
||||
* Returns number of entries mapped.
|
||||
*/
|
||||
static int dx_make_map(struct inode *dir, struct ext4_dir_entry_2 *de,
|
||||
unsigned blocksize, struct dx_hash_info *hinfo,
|
||||
static int dx_make_map(struct inode *dir, struct buffer_head *bh,
|
||||
struct dx_hash_info *hinfo,
|
||||
struct dx_map_entry *map_tail)
|
||||
{
|
||||
int count = 0;
|
||||
char *base = (char *) de;
|
||||
struct ext4_dir_entry_2 *de = (struct ext4_dir_entry_2 *)bh->b_data;
|
||||
unsigned int buflen = bh->b_size;
|
||||
char *base = bh->b_data;
|
||||
struct dx_hash_info h = *hinfo;
|
||||
|
||||
while ((char *) de < base + blocksize) {
|
||||
if (ext4_has_metadata_csum(dir->i_sb))
|
||||
buflen -= sizeof(struct ext4_dir_entry_tail);
|
||||
|
||||
while ((char *) de < base + buflen) {
|
||||
if (ext4_check_dir_entry(dir, NULL, de, bh, base, buflen,
|
||||
((char *)de) - base))
|
||||
return -EFSCORRUPTED;
|
||||
if (de->name_len && de->inode) {
|
||||
if (ext4_hash_in_dirent(dir))
|
||||
h.hash = EXT4_DIRENT_HASH(de);
|
||||
|
|
@ -1267,8 +1291,7 @@ static int dx_make_map(struct inode *dir, struct ext4_dir_entry_2 *de,
|
|||
count++;
|
||||
cond_resched();
|
||||
}
|
||||
/* XXX: do we need to check rec_len == 0 case? -Chris */
|
||||
de = ext4_next_entry(de, blocksize);
|
||||
de = ext4_next_entry(de, dir->i_sb->s_blocksize);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
|
@ -1934,8 +1957,11 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
|
|||
|
||||
/* create map in the end of data2 block */
|
||||
map = (struct dx_map_entry *) (data2 + blocksize);
|
||||
count = dx_make_map(dir, (struct ext4_dir_entry_2 *) data1,
|
||||
blocksize, hinfo, map);
|
||||
count = dx_make_map(dir, *bh, hinfo, map);
|
||||
if (count < 0) {
|
||||
err = count;
|
||||
goto journal_error;
|
||||
}
|
||||
map -= count;
|
||||
dx_sort_map(map, count);
|
||||
/* Ensure that neither split block is over half full */
|
||||
|
|
@ -3554,6 +3580,9 @@ static struct buffer_head *ext4_get_first_dir_block(handle_t *handle,
|
|||
struct buffer_head *bh;
|
||||
|
||||
if (!ext4_has_inline_data(inode)) {
|
||||
struct ext4_dir_entry_2 *de;
|
||||
unsigned int offset;
|
||||
|
||||
/* The first directory block must not be a hole, so
|
||||
* treat it as DIRENT_HTREE
|
||||
*/
|
||||
|
|
@ -3562,9 +3591,30 @@ static struct buffer_head *ext4_get_first_dir_block(handle_t *handle,
|
|||
*retval = PTR_ERR(bh);
|
||||
return NULL;
|
||||
}
|
||||
*parent_de = ext4_next_entry(
|
||||
(struct ext4_dir_entry_2 *)bh->b_data,
|
||||
inode->i_sb->s_blocksize);
|
||||
|
||||
de = (struct ext4_dir_entry_2 *) bh->b_data;
|
||||
if (ext4_check_dir_entry(inode, NULL, de, bh, bh->b_data,
|
||||
bh->b_size, 0) ||
|
||||
le32_to_cpu(de->inode) != inode->i_ino ||
|
||||
strcmp(".", de->name)) {
|
||||
EXT4_ERROR_INODE(inode, "directory missing '.'");
|
||||
brelse(bh);
|
||||
*retval = -EFSCORRUPTED;
|
||||
return NULL;
|
||||
}
|
||||
offset = ext4_rec_len_from_disk(de->rec_len,
|
||||
inode->i_sb->s_blocksize);
|
||||
de = ext4_next_entry(de, inode->i_sb->s_blocksize);
|
||||
if (ext4_check_dir_entry(inode, NULL, de, bh, bh->b_data,
|
||||
bh->b_size, offset) ||
|
||||
le32_to_cpu(de->inode) == 0 || strcmp("..", de->name)) {
|
||||
EXT4_ERROR_INODE(inode, "directory missing '..'");
|
||||
brelse(bh);
|
||||
*retval = -EFSCORRUPTED;
|
||||
return NULL;
|
||||
}
|
||||
*parent_de = de;
|
||||
|
||||
return bh;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1728,6 +1728,7 @@ static const struct mount_opts {
|
|||
MOPT_EXT4_ONLY | MOPT_CLEAR},
|
||||
{Opt_warn_on_error, EXT4_MOUNT_WARN_ON_ERROR, MOPT_SET},
|
||||
{Opt_nowarn_on_error, EXT4_MOUNT_WARN_ON_ERROR, MOPT_CLEAR},
|
||||
{Opt_commit, 0, MOPT_NO_EXT2},
|
||||
{Opt_nojournal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM,
|
||||
MOPT_EXT4_ONLY | MOPT_CLEAR},
|
||||
{Opt_journal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM,
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ static bool __is_bitmap_valid(struct f2fs_sb_info *sbi, block_t blkaddr,
|
|||
f2fs_err(sbi, "Inconsistent error blkaddr:%u, sit bitmap:%d",
|
||||
blkaddr, exist);
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
WARN_ON(1);
|
||||
dump_stack();
|
||||
}
|
||||
return exist;
|
||||
}
|
||||
|
|
@ -186,7 +186,7 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
|
|||
f2fs_warn(sbi, "access invalid blkaddr:%u",
|
||||
blkaddr);
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
WARN_ON(1);
|
||||
dump_stack();
|
||||
return false;
|
||||
} else {
|
||||
return __is_bitmap_valid(sbi, blkaddr, type);
|
||||
|
|
|
|||
|
|
@ -2342,11 +2342,17 @@ static inline void dec_valid_node_count(struct f2fs_sb_info *sbi,
|
|||
{
|
||||
spin_lock(&sbi->stat_lock);
|
||||
|
||||
f2fs_bug_on(sbi, !sbi->total_valid_block_count);
|
||||
f2fs_bug_on(sbi, !sbi->total_valid_node_count);
|
||||
if (unlikely(!sbi->total_valid_block_count ||
|
||||
!sbi->total_valid_node_count)) {
|
||||
f2fs_warn(sbi, "dec_valid_node_count: inconsistent block counts, total_valid_block:%u, total_valid_node:%u",
|
||||
sbi->total_valid_block_count,
|
||||
sbi->total_valid_node_count);
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
} else {
|
||||
sbi->total_valid_block_count--;
|
||||
sbi->total_valid_node_count--;
|
||||
}
|
||||
|
||||
sbi->total_valid_node_count--;
|
||||
sbi->total_valid_block_count--;
|
||||
if (sbi->reserved_blocks &&
|
||||
sbi->current_reserved_blocks < sbi->reserved_blocks)
|
||||
sbi->current_reserved_blocks++;
|
||||
|
|
|
|||
|
|
@ -1413,11 +1413,19 @@ static int f2fs_do_zero_range(struct dnode_of_data *dn, pgoff_t start,
|
|||
ret = -ENOSPC;
|
||||
break;
|
||||
}
|
||||
if (dn->data_blkaddr != NEW_ADDR) {
|
||||
f2fs_invalidate_blocks(sbi, dn->data_blkaddr);
|
||||
dn->data_blkaddr = NEW_ADDR;
|
||||
f2fs_set_data_blkaddr(dn);
|
||||
|
||||
if (dn->data_blkaddr == NEW_ADDR)
|
||||
continue;
|
||||
|
||||
if (!f2fs_is_valid_blkaddr(sbi, dn->data_blkaddr,
|
||||
DATA_GENERIC_ENHANCE)) {
|
||||
ret = -EFSCORRUPTED;
|
||||
break;
|
||||
}
|
||||
|
||||
f2fs_invalidate_blocks(sbi, dn->data_blkaddr);
|
||||
dn->data_blkaddr = NEW_ADDR;
|
||||
f2fs_set_data_blkaddr(dn);
|
||||
}
|
||||
|
||||
f2fs_update_extent_cache_range(dn, start, 0, index - start);
|
||||
|
|
@ -1736,6 +1744,10 @@ static long f2fs_fallocate(struct file *file, int mode,
|
|||
|
||||
inode_lock(inode);
|
||||
|
||||
ret = file_modified(file);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
if (mode & FALLOC_FL_PUNCH_HOLE) {
|
||||
if (offset >= inode->i_size)
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -745,8 +745,22 @@ retry:
|
|||
f2fs_lock_op(sbi);
|
||||
err = f2fs_remove_inode_page(inode);
|
||||
f2fs_unlock_op(sbi);
|
||||
if (err == -ENOENT)
|
||||
if (err == -ENOENT) {
|
||||
err = 0;
|
||||
|
||||
/*
|
||||
* in fuzzed image, another node may has the same
|
||||
* block address as inode's, if it was truncated
|
||||
* previously, truncation of inode node will fail.
|
||||
*/
|
||||
if (is_inode_flag_set(inode, FI_DIRTY_INODE)) {
|
||||
f2fs_warn(F2FS_I_SB(inode),
|
||||
"f2fs_evict_inode: inconsistent node id, ino:%lu",
|
||||
inode->i_ino);
|
||||
f2fs_inode_synced(inode);
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* give more chances, if ENOMEM case */
|
||||
|
|
|
|||
|
|
@ -352,16 +352,19 @@ void f2fs_drop_inmem_page(struct inode *inode, struct page *page)
|
|||
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
||||
struct list_head *head = &fi->inmem_pages;
|
||||
struct inmem_pages *cur = NULL;
|
||||
struct inmem_pages *tmp;
|
||||
|
||||
f2fs_bug_on(sbi, !IS_ATOMIC_WRITTEN_PAGE(page));
|
||||
|
||||
mutex_lock(&fi->inmem_lock);
|
||||
list_for_each_entry(cur, head, list) {
|
||||
if (cur->page == page)
|
||||
list_for_each_entry(tmp, head, list) {
|
||||
if (tmp->page == page) {
|
||||
cur = tmp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
f2fs_bug_on(sbi, list_empty(head) || cur->page != page);
|
||||
f2fs_bug_on(sbi, !cur);
|
||||
list_del(&cur->list);
|
||||
mutex_unlock(&fi->inmem_lock);
|
||||
|
||||
|
|
|
|||
|
|
@ -533,11 +533,10 @@ static inline int reserved_sections(struct f2fs_sb_info *sbi)
|
|||
return GET_SEC_FROM_SEG(sbi, (unsigned int)reserved_segments(sbi));
|
||||
}
|
||||
|
||||
static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi)
|
||||
static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,
|
||||
unsigned int node_blocks, unsigned int dent_blocks)
|
||||
{
|
||||
unsigned int node_blocks = get_pages(sbi, F2FS_DIRTY_NODES) +
|
||||
get_pages(sbi, F2FS_DIRTY_DENTS);
|
||||
unsigned int dent_blocks = get_pages(sbi, F2FS_DIRTY_DENTS);
|
||||
|
||||
unsigned int segno, left_blocks;
|
||||
int i;
|
||||
|
||||
|
|
@ -563,19 +562,28 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi)
|
|||
static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi,
|
||||
int freed, int needed)
|
||||
{
|
||||
int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES);
|
||||
int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS);
|
||||
int imeta_secs = get_blocktype_secs(sbi, F2FS_DIRTY_IMETA);
|
||||
unsigned int total_node_blocks = get_pages(sbi, F2FS_DIRTY_NODES) +
|
||||
get_pages(sbi, F2FS_DIRTY_DENTS) +
|
||||
get_pages(sbi, F2FS_DIRTY_IMETA);
|
||||
unsigned int total_dent_blocks = get_pages(sbi, F2FS_DIRTY_DENTS);
|
||||
unsigned int node_secs = total_node_blocks / BLKS_PER_SEC(sbi);
|
||||
unsigned int dent_secs = total_dent_blocks / BLKS_PER_SEC(sbi);
|
||||
unsigned int node_blocks = total_node_blocks % BLKS_PER_SEC(sbi);
|
||||
unsigned int dent_blocks = total_dent_blocks % BLKS_PER_SEC(sbi);
|
||||
unsigned int free, need_lower, need_upper;
|
||||
|
||||
if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
|
||||
return false;
|
||||
|
||||
if (free_sections(sbi) + freed == reserved_sections(sbi) + needed &&
|
||||
has_curseg_enough_space(sbi))
|
||||
free = free_sections(sbi) + freed;
|
||||
need_lower = node_secs + dent_secs + reserved_sections(sbi) + needed;
|
||||
need_upper = need_lower + (node_blocks ? 1 : 0) + (dent_blocks ? 1 : 0);
|
||||
|
||||
if (free > need_upper)
|
||||
return false;
|
||||
return (free_sections(sbi) + freed) <=
|
||||
(node_secs + 2 * dent_secs + imeta_secs +
|
||||
reserved_sections(sbi) + needed);
|
||||
else if (free <= need_lower)
|
||||
return true;
|
||||
return !has_curseg_enough_space(sbi, node_blocks, dent_blocks);
|
||||
}
|
||||
|
||||
static inline bool f2fs_is_checkpoint_ready(struct f2fs_sb_info *sbi)
|
||||
|
|
|
|||
|
|
@ -2252,7 +2252,8 @@ int f2fs_quota_sync(struct super_block *sb, int type)
|
|||
if (!sb_has_quota_active(sb, cnt))
|
||||
continue;
|
||||
|
||||
inode_lock(dqopt->files[cnt]);
|
||||
if (!f2fs_sb_has_quota_ino(sbi))
|
||||
inode_lock(dqopt->files[cnt]);
|
||||
|
||||
/*
|
||||
* do_quotactl
|
||||
|
|
@ -2271,7 +2272,8 @@ int f2fs_quota_sync(struct super_block *sb, int type)
|
|||
up_read(&sbi->quota_sem);
|
||||
f2fs_unlock_op(sbi);
|
||||
|
||||
inode_unlock(dqopt->files[cnt]);
|
||||
if (!f2fs_sb_has_quota_ino(sbi))
|
||||
inode_unlock(dqopt->files[cnt]);
|
||||
|
||||
if (ret)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent,
|
|||
err_brelse:
|
||||
brelse(bhs[0]);
|
||||
err:
|
||||
fat_msg(sb, KERN_ERR, "FAT read failed (blocknr %llu)", (llu)blocknr);
|
||||
fat_msg_ratelimit(sb, KERN_ERR, "FAT read failed (blocknr %llu)",
|
||||
(llu)blocknr);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
@ -106,8 +107,8 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent,
|
|||
fatent->fat_inode = MSDOS_SB(sb)->fat_inode;
|
||||
fatent->bhs[0] = sb_bread(sb, blocknr);
|
||||
if (!fatent->bhs[0]) {
|
||||
fat_msg(sb, KERN_ERR, "FAT read failed (blocknr %llu)",
|
||||
(llu)blocknr);
|
||||
fat_msg_ratelimit(sb, KERN_ERR, "FAT read failed (blocknr %llu)",
|
||||
(llu)blocknr);
|
||||
return -EIO;
|
||||
}
|
||||
fatent->nr_bhs = 1;
|
||||
|
|
|
|||
|
|
@ -1650,11 +1650,12 @@ static long writeback_sb_inodes(struct super_block *sb,
|
|||
};
|
||||
unsigned long start_time = jiffies;
|
||||
long write_chunk;
|
||||
long wrote = 0; /* count both pages and inodes */
|
||||
long total_wrote = 0; /* count both pages and inodes */
|
||||
|
||||
while (!list_empty(&wb->b_io)) {
|
||||
struct inode *inode = wb_inode(wb->b_io.prev);
|
||||
struct bdi_writeback *tmp_wb;
|
||||
long wrote;
|
||||
|
||||
if (inode->i_sb != sb) {
|
||||
if (work->sb) {
|
||||
|
|
@ -1730,7 +1731,9 @@ static long writeback_sb_inodes(struct super_block *sb,
|
|||
|
||||
wbc_detach_inode(&wbc);
|
||||
work->nr_pages -= write_chunk - wbc.nr_to_write;
|
||||
wrote += write_chunk - wbc.nr_to_write;
|
||||
wrote = write_chunk - wbc.nr_to_write - wbc.pages_skipped;
|
||||
wrote = wrote < 0 ? 0 : wrote;
|
||||
total_wrote += wrote;
|
||||
|
||||
if (need_resched()) {
|
||||
/*
|
||||
|
|
@ -1752,7 +1755,7 @@ static long writeback_sb_inodes(struct super_block *sb,
|
|||
tmp_wb = inode_to_wb_and_lock_list(inode);
|
||||
spin_lock(&inode->i_lock);
|
||||
if (!(inode->i_state & I_DIRTY_ALL))
|
||||
wrote++;
|
||||
total_wrote++;
|
||||
requeue_inode(inode, tmp_wb, &wbc);
|
||||
inode_sync_complete(inode);
|
||||
spin_unlock(&inode->i_lock);
|
||||
|
|
@ -1766,14 +1769,14 @@ static long writeback_sb_inodes(struct super_block *sb,
|
|||
* bail out to wb_writeback() often enough to check
|
||||
* background threshold and other termination conditions.
|
||||
*/
|
||||
if (wrote) {
|
||||
if (total_wrote) {
|
||||
if (time_is_before_jiffies(start_time + HZ / 10UL))
|
||||
break;
|
||||
if (work->nr_pages <= 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return wrote;
|
||||
return total_wrote;
|
||||
}
|
||||
|
||||
static long __writeback_inodes_wb(struct bdi_writeback *wb,
|
||||
|
|
|
|||
|
|
@ -535,7 +535,8 @@ iomap_write_failed(struct inode *inode, loff_t pos, unsigned len)
|
|||
* write started inside the existing inode size.
|
||||
*/
|
||||
if (pos + len > i_size)
|
||||
truncate_pagecache_range(inode, max(pos, i_size), pos + len);
|
||||
truncate_pagecache_range(inode, max(pos, i_size),
|
||||
pos + len - 1);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -603,6 +603,7 @@ out_root:
|
|||
jffs2_free_raw_node_refs(c);
|
||||
kvfree(c->blocks);
|
||||
jffs2_clear_xattr_subsystem(c);
|
||||
jffs2_sum_exit(c);
|
||||
out_inohash:
|
||||
kfree(c->inocache_list);
|
||||
out_wbuf:
|
||||
|
|
|
|||
|
|
@ -385,7 +385,8 @@ int dbFree(struct inode *ip, s64 blkno, s64 nblocks)
|
|||
}
|
||||
|
||||
/* write the last buffer. */
|
||||
write_metapage(mp);
|
||||
if (mp)
|
||||
write_metapage(mp);
|
||||
|
||||
IREAD_UNLOCK(ipbmap);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,15 @@
|
|||
|
||||
DEFINE_MUTEX(kernfs_mutex);
|
||||
static DEFINE_SPINLOCK(kernfs_rename_lock); /* kn->parent and ->name */
|
||||
static char kernfs_pr_cont_buf[PATH_MAX]; /* protected by rename_lock */
|
||||
/*
|
||||
* Don't use rename_lock to piggy back on pr_cont_buf. We don't want to
|
||||
* call pr_cont() while holding rename_lock. Because sometimes pr_cont()
|
||||
* will perform wakeups when releasing console_sem. Holding rename_lock
|
||||
* will introduce deadlock if the scheduler reads the kernfs_name in the
|
||||
* wakeup path.
|
||||
*/
|
||||
static DEFINE_SPINLOCK(kernfs_pr_cont_lock);
|
||||
static char kernfs_pr_cont_buf[PATH_MAX]; /* protected by pr_cont_lock */
|
||||
static DEFINE_SPINLOCK(kernfs_idr_lock); /* root->ino_idr */
|
||||
|
||||
#define rb_to_kn(X) rb_entry((X), struct kernfs_node, rb)
|
||||
|
|
@ -230,12 +238,12 @@ void pr_cont_kernfs_name(struct kernfs_node *kn)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&kernfs_rename_lock, flags);
|
||||
spin_lock_irqsave(&kernfs_pr_cont_lock, flags);
|
||||
|
||||
kernfs_name_locked(kn, kernfs_pr_cont_buf, sizeof(kernfs_pr_cont_buf));
|
||||
kernfs_name(kn, kernfs_pr_cont_buf, sizeof(kernfs_pr_cont_buf));
|
||||
pr_cont("%s", kernfs_pr_cont_buf);
|
||||
|
||||
spin_unlock_irqrestore(&kernfs_rename_lock, flags);
|
||||
spin_unlock_irqrestore(&kernfs_pr_cont_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -249,10 +257,10 @@ void pr_cont_kernfs_path(struct kernfs_node *kn)
|
|||
unsigned long flags;
|
||||
int sz;
|
||||
|
||||
spin_lock_irqsave(&kernfs_rename_lock, flags);
|
||||
spin_lock_irqsave(&kernfs_pr_cont_lock, flags);
|
||||
|
||||
sz = kernfs_path_from_node_locked(kn, NULL, kernfs_pr_cont_buf,
|
||||
sizeof(kernfs_pr_cont_buf));
|
||||
sz = kernfs_path_from_node(kn, NULL, kernfs_pr_cont_buf,
|
||||
sizeof(kernfs_pr_cont_buf));
|
||||
if (sz < 0) {
|
||||
pr_cont("(error)");
|
||||
goto out;
|
||||
|
|
@ -266,7 +274,7 @@ void pr_cont_kernfs_path(struct kernfs_node *kn)
|
|||
pr_cont("%s", kernfs_pr_cont_buf);
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&kernfs_rename_lock, flags);
|
||||
spin_unlock_irqrestore(&kernfs_pr_cont_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -870,13 +878,12 @@ static struct kernfs_node *kernfs_walk_ns(struct kernfs_node *parent,
|
|||
|
||||
lockdep_assert_held(&kernfs_mutex);
|
||||
|
||||
/* grab kernfs_rename_lock to piggy back on kernfs_pr_cont_buf */
|
||||
spin_lock_irq(&kernfs_rename_lock);
|
||||
spin_lock_irq(&kernfs_pr_cont_lock);
|
||||
|
||||
len = strlcpy(kernfs_pr_cont_buf, path, sizeof(kernfs_pr_cont_buf));
|
||||
|
||||
if (len >= sizeof(kernfs_pr_cont_buf)) {
|
||||
spin_unlock_irq(&kernfs_rename_lock);
|
||||
spin_unlock_irq(&kernfs_pr_cont_lock);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -888,7 +895,7 @@ static struct kernfs_node *kernfs_walk_ns(struct kernfs_node *parent,
|
|||
parent = kernfs_find_ns(parent, name, ns);
|
||||
}
|
||||
|
||||
spin_unlock_irq(&kernfs_rename_lock);
|
||||
spin_unlock_irq(&kernfs_pr_cont_lock);
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,11 +394,8 @@ static int nfs_write_end(struct file *file, struct address_space *mapping,
|
|||
return status;
|
||||
NFS_I(mapping->host)->write_io += copied;
|
||||
|
||||
if (nfs_ctx_key_to_expire(ctx, mapping->host)) {
|
||||
status = nfs_wb_all(mapping->host);
|
||||
if (status < 0)
|
||||
return status;
|
||||
}
|
||||
if (nfs_ctx_key_to_expire(ctx, mapping->host))
|
||||
nfs_wb_all(mapping->host);
|
||||
|
||||
return copied;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3041,6 +3041,10 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
|
|||
}
|
||||
|
||||
out:
|
||||
if (opendata->lgp) {
|
||||
nfs4_lgopen_release(opendata->lgp);
|
||||
opendata->lgp = NULL;
|
||||
}
|
||||
if (!opendata->cancelled)
|
||||
nfs4_sequence_free_slot(&opendata->o_res.seq_res);
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -1961,6 +1961,7 @@ lookup_again:
|
|||
lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags);
|
||||
if (lo == NULL) {
|
||||
spin_unlock(&ino->i_lock);
|
||||
lseg = ERR_PTR(-ENOMEM);
|
||||
trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
|
||||
PNFS_UPDATE_LAYOUT_NOMEM);
|
||||
goto out;
|
||||
|
|
@ -2090,6 +2091,7 @@ lookup_again:
|
|||
|
||||
lgp = pnfs_alloc_init_layoutget_args(ino, ctx, &stateid, &arg, gfp_flags);
|
||||
if (!lgp) {
|
||||
lseg = ERR_PTR(-ENOMEM);
|
||||
trace_pnfs_update_layout(ino, pos, count, iomode, lo, NULL,
|
||||
PNFS_UPDATE_LAYOUT_NOMEM);
|
||||
nfs_layoutget_end(lo);
|
||||
|
|
|
|||
|
|
@ -692,11 +692,7 @@ static int nfs_writepage_locked(struct page *page,
|
|||
err = nfs_do_writepage(page, wbc, &pgio);
|
||||
pgio.pg_error = 0;
|
||||
nfs_pageio_complete(&pgio);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (nfs_error_is_fatal(pgio.pg_error))
|
||||
return pgio.pg_error;
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
int nfs_writepage(struct page *page, struct writeback_control *wbc)
|
||||
|
|
@ -747,9 +743,6 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc)
|
|||
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
err = pgio.pg_error;
|
||||
if (nfs_error_is_fatal(err))
|
||||
goto out_err;
|
||||
return 0;
|
||||
out_err:
|
||||
return err;
|
||||
|
|
@ -1429,7 +1422,7 @@ static void nfs_async_write_error(struct list_head *head, int error)
|
|||
while (!list_empty(head)) {
|
||||
req = nfs_list_entry(head->next);
|
||||
nfs_list_remove_request(req);
|
||||
if (nfs_error_is_fatal(error))
|
||||
if (nfs_error_is_fatal_on_server(error))
|
||||
nfs_write_error(req, error);
|
||||
else
|
||||
nfs_redirty_request(req);
|
||||
|
|
|
|||
|
|
@ -84,16 +84,9 @@ static void inotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark)
|
|||
inode_mark = container_of(mark, struct inotify_inode_mark, fsn_mark);
|
||||
inode = igrab(fsnotify_conn_inode(mark->connector));
|
||||
if (inode) {
|
||||
/*
|
||||
* IN_ALL_EVENTS represents all of the mask bits
|
||||
* that we expose to userspace. There is at
|
||||
* least one bit (FS_EVENT_ON_CHILD) which is
|
||||
* used only internally to the kernel.
|
||||
*/
|
||||
u32 mask = mark->mask & IN_ALL_EVENTS;
|
||||
seq_printf(m, "inotify wd:%x ino:%lx sdev:%x mask:%x ignored_mask:%x ",
|
||||
seq_printf(m, "inotify wd:%x ino:%lx sdev:%x mask:%x ignored_mask:0 ",
|
||||
inode_mark->wd, inode->i_ino, inode->i_sb->s_dev,
|
||||
mask, mark->ignored_mask);
|
||||
inotify_mark_user_mask(mark));
|
||||
show_mark_fhandle(m, inode);
|
||||
seq_putc(m, '\n');
|
||||
iput(inode);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,18 @@ static inline struct inotify_event_info *INOTIFY_E(struct fsnotify_event *fse)
|
|||
return container_of(fse, struct inotify_event_info, fse);
|
||||
}
|
||||
|
||||
/*
|
||||
* INOTIFY_USER_FLAGS represents all of the mask bits that we expose to
|
||||
* userspace. There is at least one bit (FS_EVENT_ON_CHILD) which is
|
||||
* used only internally to the kernel.
|
||||
*/
|
||||
#define INOTIFY_USER_MASK (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK)
|
||||
|
||||
static inline __u32 inotify_mark_user_mask(struct fsnotify_mark *fsn_mark)
|
||||
{
|
||||
return fsn_mark->mask & INOTIFY_USER_MASK;
|
||||
}
|
||||
|
||||
extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
|
||||
struct fsnotify_group *group);
|
||||
extern int inotify_handle_event(struct fsnotify_group *group,
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ static inline __u32 inotify_arg_to_mask(u32 arg)
|
|||
mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD | FS_UNMOUNT);
|
||||
|
||||
/* mask off the flags used to open the fd */
|
||||
mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK));
|
||||
mask |= (arg & INOTIFY_USER_MASK);
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ void fsnotify_free_mark(struct fsnotify_mark *mark)
|
|||
void fsnotify_destroy_mark(struct fsnotify_mark *mark,
|
||||
struct fsnotify_group *group)
|
||||
{
|
||||
mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING);
|
||||
mutex_lock(&group->mark_mutex);
|
||||
fsnotify_detach_mark(mark);
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
fsnotify_free_mark(mark);
|
||||
|
|
@ -738,7 +738,7 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group,
|
|||
* move marks to free to to_free list in one go and then free marks in
|
||||
* to_free list one by one.
|
||||
*/
|
||||
mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING);
|
||||
mutex_lock(&group->mark_mutex);
|
||||
list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) {
|
||||
if ((1U << mark->connector->type) & type_mask)
|
||||
list_move(&mark->g_list, &to_free);
|
||||
|
|
@ -747,7 +747,7 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group,
|
|||
|
||||
clear:
|
||||
while (1) {
|
||||
mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING);
|
||||
mutex_lock(&group->mark_mutex);
|
||||
if (list_empty(head)) {
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -435,6 +435,11 @@ again:
|
|||
}
|
||||
|
||||
spin_lock(&lockres->l_lock);
|
||||
if (lockres->l_flags & USER_LOCK_IN_TEARDOWN) {
|
||||
spin_unlock(&lockres->l_lock);
|
||||
status = -EAGAIN;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* We only compare against the currently granted level
|
||||
* here. If the lock is blocked waiting on a downconvert,
|
||||
|
|
@ -601,7 +606,7 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
|
|||
spin_lock(&lockres->l_lock);
|
||||
if (lockres->l_flags & USER_LOCK_IN_TEARDOWN) {
|
||||
spin_unlock(&lockres->l_lock);
|
||||
return 0;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
lockres->l_flags |= USER_LOCK_IN_TEARDOWN;
|
||||
|
|
@ -615,12 +620,17 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
|
|||
}
|
||||
|
||||
if (lockres->l_ro_holders || lockres->l_ex_holders) {
|
||||
lockres->l_flags &= ~USER_LOCK_IN_TEARDOWN;
|
||||
spin_unlock(&lockres->l_lock);
|
||||
goto bail;
|
||||
}
|
||||
|
||||
status = 0;
|
||||
if (!(lockres->l_flags & USER_LOCK_ATTACHED)) {
|
||||
/*
|
||||
* lock is never requested, leave USER_LOCK_IN_TEARDOWN set
|
||||
* to avoid new lock request coming in.
|
||||
*/
|
||||
spin_unlock(&lockres->l_lock);
|
||||
goto bail;
|
||||
}
|
||||
|
|
@ -631,6 +641,10 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
|
|||
|
||||
status = ocfs2_dlm_unlock(conn, &lockres->l_lksb, DLM_LKF_VALBLK);
|
||||
if (status) {
|
||||
spin_lock(&lockres->l_lock);
|
||||
lockres->l_flags &= ~USER_LOCK_IN_TEARDOWN;
|
||||
lockres->l_flags &= ~USER_LOCK_BUSY;
|
||||
spin_unlock(&lockres->l_lock);
|
||||
user_log_dlm_error("ocfs2_dlm_unlock", status, lockres);
|
||||
goto bail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -446,6 +446,9 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent,
|
|||
proc_set_user(ent, (*parent)->uid, (*parent)->gid);
|
||||
|
||||
ent->proc_dops = &proc_misc_dentry_ops;
|
||||
/* Revalidate everything under /proc/${pid}/net */
|
||||
if ((*parent)->proc_dops == &proc_net_dentry_ops)
|
||||
pde_force_lookup(ent);
|
||||
|
||||
out:
|
||||
return ent;
|
||||
|
|
|
|||
|
|
@ -343,6 +343,9 @@ static __net_init int proc_net_ns_init(struct net *net)
|
|||
|
||||
proc_set_user(netd, uid, gid);
|
||||
|
||||
/* Seed dentry revalidation for /proc/${pid}/net */
|
||||
pde_force_lookup(netd);
|
||||
|
||||
err = -EEXIST;
|
||||
net_statd = proc_net_mkdir(net, "stat", netd);
|
||||
if (!net_statd)
|
||||
|
|
|
|||
Loading…
Reference in a new issue