mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhebGEACgkQONu9yGCS
aT67mBAAqkBCrkNSqHHQpsl/YybmfDgGonfHeLkNOYp4G44Axp/oytb1bAEhg65A
oqfTSF67Hr3xjBVEvFMHMnuFO1+xHxkKIy3LUr9o9gjS+6+rEn7U5cYkaHYPNef5
hN/tPUwf90d2ivpAsTueUu4PegJUJTaux0VqW6PsECKJ/fRF2sdAW7NpGps4zwaw
+gnxZ7fhWnMLDeSH4d6HAFsVB10AH4sC/WzVMGlXpiS7V8vzM7QjAj3S7NWkOjaX
fUWmKLecRT6388V+PBH6tr7vwsbFAv83gKVENgFMPKnsfPLTKd3d81TJvWqbU5Dn
Y+KxG1NWmIUkhlMeqDld51JJCP2JpLxSchqHvJ2TiFJs3gRdkYeQxiDfXHzRsZ+v
8beqQufcmQFxOyUkWQLGlMR9ACva1IA7hQ4HdTqygDqcQjKcvIYGcy+29PpTBVjj
+BNs6F8ttK6jQ19IqwhP2AeIObq/DQCtn0xRaOkfAwyODhi2nD7F191ZtmrRwAq7
ax+hXzNIWkLhvsuG+YLuNXczYbOGKZ56mg8XI+3DQ0KNRUieznsgeXXsjkGbzivn
uDPWkRtqO48RnZHzlLUzT0Zv7pNCWXscnHEa1LfQ7Effj3G0C74TJWLDRcfSgf0i
+cdXwJhnHc1ztExtmuNvfk7SHEFRNhjB8Zmdd8weK6SUzH0knPE=
=jzgM
-----END PGP SIGNATURE-----
Merge 5.4.295 into android11-5.4-lts
Changes in 5.4.295
tracing: Fix compilation warning on arm32
pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
pinctrl: armada-37xx: set GPIO output value before setting direction
usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE
usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device
usb: usbtmc: Fix timeout value in get_stb
thunderbolt: Do not double dequeue a configuration request
netfilter: nft_socket: fix sk refcount leaks
gfs2: gfs2_create_inode error handling fix
perf/core: Fix broken throttling when max_samples_per_tick=1
x86/cpu: Sanitize CPUID(0x80000000) output
crypto: marvell/cesa - Handle zero-length skcipher requests
crypto: marvell/cesa - Avoid empty transfer descriptor
EDAC/skx_common: Fix general protection fault
PM: wakeup: Delete space in the end of string shown by pm_show_wakelocks()
x86/mtrr: Check if fixed-range MTRRs exist in mtrr_save_fixed_ranges()
ACPI: OSI: Stop advertising support for "3.0 _SCP Extensions"
spi: sh-msiof: Fix maximum DMA transfer size
drm/vmwgfx: Add seqno waiter for sync_files
m68k: mac: Fix macintosh_config for Mac II
firmware: psci: Fix refcount leak in psci_dt_init
selftests/seccomp: fix syscall_restart test for arm compat
drm: rcar-du: Fix memory leak in rcar_du_vsps_init()
drm/vkms: Adjust vkms_state->active_planes allocation type
drm/tegra: rgb: Fix the unbound reference count
f2fs: fix to do sanity check on sbi->total_valid_block_count
net: ncsi: Fix GCPS 64-bit member variables
wifi: rtw88: do not ignore hardware read error during DPK
RDMA/hns: Include hnae3.h in hns_roce_hw_v2.h
f2fs: clean up w/ fscrypt_is_bounce_page()
netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it
ktls, sockmap: Fix missing uncharge operation
pinctrl: at91: Fix possible out-of-boundary access
bpf: Fix WARN() in get_bpf_raw_tp_regs
wifi: ath9k_htc: Abort software beacon handling if disabled
netfilter: nf_tables: nft_fib_ipv6: fix VRF ipv4/ipv6 result discrepancy
net: usb: aqc111: fix error handling of usbnet read calls
net: lan743x: rename lan743x_reset_phy to lan743x_hw_reset_phy
calipso: Don't call calipso functions for AF_INET sk.
f2fs: use d_inode(dentry) cleanup dentry->d_inode
f2fs: fix to correct check conditions in f2fs_cross_rename
ARM: dts: at91: usb_a9263: fix GPIO for Dataflash chip select
ARM: dts: at91: at91sam9263: fix NAND chip selects
Squashfs: check return result of sb_min_blocksize
nilfs2: add pointer check for nilfs_direct_propagate()
nilfs2: do not propagate ENOENT error from nilfs_btree_propagate()
bus: fsl-mc: fix double-free on mc_dev
ARM: dts: qcom: apq8064 merge hw splinlock into corresponding syscon device
arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou
soc: aspeed: lpc: Fix impossible judgment condition
soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop()
fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
perf ui browser hists: Set actions->thread before calling do_zoom_thread()
perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3
rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()
mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in exynos_lpass_remove()
mfd: stmpe-spi: Correct the name used in MODULE_DEVICE_TABLE
perf tests switch-tracking: Fix timestamp comparison
perf record: Fix incorrect --user-regs comments
rtc: sh: assign correct interrupts with DT
rtc: Fix offset calculation for .start_secs < 0
usb: renesas_usbhs: Reorder clock handling and power management in probe
serial: Fix potential null-ptr-deref in mlb_usio_probe()
vt: remove VT_RESIZE and VT_RESIZEX from vt_compat_ioctl()
net/mlx4_en: Prevent potential integer overflow calculating Hz
Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION
ice: create new Tx scheduler nodes for new queues only
PM: sleep: Fix power.is_suspended cleanup for direct-complete devices
do_change_type(): refuse to operate on unmounted/not ours mounts
pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
Input: synaptics-rmi4 - convert to use sysfs_emit() APIs
Input: synaptics-rmi - fix crash with unsupported versions of F34
NFSD: Fix ia_size underflow
NFSD: Fix NFSv3 SETATTR/CREATE's handling of large file sizes
scsi: iscsi: Fix incorrect error path labels for flashnode operations
net_sched: sch_sfq: fix a potential crash on gso_skb handling
i40e: return false from i40e_reset_vf if reset is in progress
i40e: retry VFLR handling if there is ongoing VF reset
net/mlx5: Wait for inactive autogroups
net/mlx5: Fix return value when searching for existing flow group
net_sched: prio: fix a race in prio_tune()
net_sched: red: fix a race in __red_change()
net_sched: tbf: fix a race in tbf_change()
net: mdio: C22 is now optional, EOPNOTSUPP if not provided
x86/boot/compressed: prefer cc-option for CFLAGS additions
MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option
drm/amd/display: Do not add '-mhard-float' to dml_ccflags for clang
drm/amd/display: Do not add '-mhard-float' to dcn2{1,0}_resource.o for clang
net/mdiobus: Fix potential out-of-bounds read/write access
fs/filesystems: Fix potential unsigned integer underflow in fs_name()
usb: Flush altsetting 0 endpoints before reinitializating them after reset.
xen/arm: call uaccess_ttbr0_enable for dm_op hypercall
calipso: unlock rcu before returning -EAFNOSUPPORT
net: usb: aqc111: debug info before sanitation
configfs: Do not override creating attribute file failure in populate_attrs()
gfs2: move msleep to sleepable context
wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback()
nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723
media: gspca: Add error handling for stv06xx_read_sensor()
media: v4l2-dev: fix error handling in __video_register_device()
ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
ext4: inline: fix len overflow in ext4_prepare_inline_data
ext4: fix calculation of credits for extent tree modification
Input: ims-pcu - check record size in ims_pcu_flash_firmware()
f2fs: prevent kernel warning due to negative i_nlink from corrupted image
NFC: nci: uart: Set tty->disc_data only in success path
EDAC/altera: Use correct write width with the INTTEST register
fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var
vgacon: Add check for vc_origin address range in vgacon_scroll()
parisc: fix building with gcc-15
ipc: fix to protect IPCS lookups using RCU
mm: fix ratelimit_pages update error in dirty_ratio_handler()
mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
mtd: nand: sunxi: Add randomizer configuration before randomizer enable
dm-mirror: fix a tiny race condition
ftrace: Fix UAF when lookup kallsym after ftrace disabled
net: ch9200: fix uninitialised access during mii_nway_restart
staging: iio: ad5933: Correct settling cycles encoding per datasheet
mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS
regulator: max14577: Add error check for max14577_read_reg()
uio_hv_generic: Use correct size for interrupt and monitor pages
PCI: Add ACS quirk for Loongson PCIe
PCI: Fix lock symmetry in pci_slot_unlock()
iio: adc: ad7606_spi: fix reg write value mask
ACPICA: fix acpi operand cache leak in dswstate.c
ACPICA: Avoid sequence overread in call to strncmp()
ACPICA: fix acpi parse and parseext cache leaks
power: supply: bq27xxx: Retrieve again when busy
PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn()
ACPI: battery: negate current when discharging
drm/amdgpu/gfx6: fix CSIB handling
sunrpc: update nextcheck time when adding new cache entries
drm/bridge: analogix_dp: Add irq flag IRQF_NO_AUTOEN instead of calling disable_irq()
drm/msm/hdmi: add runtime PM calls to DDC transfer function
media: uapi: v4l: Fix V4L2_TYPE_IS_OUTPUT condition
drm/amd/display: Add NULL pointer checks in dm_force_atomic_commit()
drm/msm/a6xx: Increase HFI response timeout
drm/amdgpu/gfx10: fix CSIB handling
drm/amdgpu/gfx7: fix CSIB handling
jfs: fix array-index-out-of-bounds read in add_missing_indices
drm/amdgpu/gfx8: fix CSIB handling
drm/amdgpu/gfx9: fix CSIB handling
jfs: Fix null-ptr-deref in jfs_ioc_trim
drm/amdkfd: Set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB
media: tc358743: ignore video while HPD is low
media: platform: exynos4-is: Add hardware sync wait to fimc_is_hw_change_mode()
nios2: force update_mmu_cache on spurious tlb-permission--related pagefaults
cpufreq: Force sync policy boost with global boost on sysfs update
net: macb: Check return value of dma_set_mask_and_coherent()
i2c: designware: Invoke runtime suspend on quick slave re-registration
emulex/benet: correct command version selection in be_cmd_get_stats()
sctp: Do not wake readers in __sctp_write_space()
net: dlink: add synchronization for stats update
tcp: always seek for minimal rtt in tcp_rcv_rtt_update()
tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows
ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
net: mlx4: add SOF_TIMESTAMPING_TX_SOFTWARE flag when getting ts info
wifi: mac80211: do not offer a mesh path if forwarding is disabled
clk: rockchip: rk3036: mark ddrphy as critical
vxlan: Do not treat dst cache initialization errors as fatal
scsi: lpfc: Use memcpy() for BIOS version
sock: Correct error checking condition for (assign|release)_proto_idx()
i40e: fix MMIO write access to an invalid page in i40e_clear_hw
watchdog: da9052_wdt: respect TWDMIN
bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY
tee: Prevent size calculation wraparound on 32-bit kernels
Revert "bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first"
platform: Add Surface platform directory
platform/x86: dell_rbu: Stop overwriting data buffer
powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery
Revert "x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2" on v6.6 and older
drivers/rapidio/rio_cm.c: prevent possible heap overwrite
jffs2: check that raw node were preallocated before writing summary
jffs2: check jffs2_prealloc_raw_node_refs() result in few other places
scsi: storvsc: Increase the timeouts to storvsc_timeout
scsi: s390: zfcp: Ensure synchronous unit_add
selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len
atm: Revert atm_account_tx() if copy_from_iter_full() fails.
HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse()
Input: sparcspkr - avoid unannotated fall-through
ALSA: hda/intel: Add Thinkpad E15 to PM deny list
ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged
erofs: remove unused trace event erofs_destroy_inode
drm/nouveau/bl: increase buffer size to avoid truncate warning
hwmon: (occ) fix unaligned accesses
aoe: clean device rq_list in aoedev_downdev()
wifi: carl9170: do not ping device which has failed to load firmware
mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu().
atm: atmtcp: Free invalid length skb in atmtcp_c_send().
tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior
tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer
calipso: Fix null-ptr-deref in calipso_req_{set,del}attr().
net: atm: add lec_mutex
net: atm: fix /proc/net/atm/lec handling
ARM: dts: am335x-bone-common: Add GPIO PHY reset on revision C3 board
ARM: dts: am335x-bone-common: Increase MDIO reset deassert time
ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create
rtc: Improve performance of rtc_time64_to_tm(). Add tests.
rtc: Make rtc_time64_to_tm() support dates before 1970
mm/huge_memory: fix dereferencing invalid pmd migration entry
jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata()
rtc: test: Fix invalid format specifier.
s390/pci: Fix __pcilg_mio_inuser() inline assembly
perf: Fix sample vs do_exit()
arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth()
scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops
Linux 5.4.295
Change-Id: I44ee88afdff6b4865efac55635f7529a2d9715e8
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
|
||
| .. | ||
| acl.c | ||
| acl.h | ||
| background.c | ||
| build.c | ||
| compr.c | ||
| compr.h | ||
| compr_lzo.c | ||
| compr_rtime.c | ||
| compr_rubin.c | ||
| compr_zlib.c | ||
| debug.c | ||
| debug.h | ||
| dir.c | ||
| erase.c | ||
| file.c | ||
| fs.c | ||
| gc.c | ||
| ioctl.c | ||
| jffs2_fs_i.h | ||
| jffs2_fs_sb.h | ||
| Kconfig | ||
| LICENCE | ||
| Makefile | ||
| malloc.c | ||
| nodelist.c | ||
| nodelist.h | ||
| nodemgmt.c | ||
| os-linux.h | ||
| read.c | ||
| readinode.c | ||
| README.Locking | ||
| scan.c | ||
| security.c | ||
| summary.c | ||
| summary.h | ||
| super.c | ||
| symlink.c | ||
| TODO | ||
| wbuf.c | ||
| write.c | ||
| writev.c | ||
| xattr.c | ||
| xattr.h | ||
| xattr_trusted.c | ||
| xattr_user.c | ||
JFFS2 LOCKING DOCUMENTATION
---------------------------
This document attempts to describe the existing locking rules for
JFFS2. It is not expected to remain perfectly up to date, but ought to
be fairly close.
alloc_sem
---------
The alloc_sem is a per-filesystem mutex, used primarily to ensure
contiguous allocation of space on the medium. It is automatically
obtained during space allocations (jffs2_reserve_space()) and freed
upon write completion (jffs2_complete_reservation()). Note that
the garbage collector will obtain this right at the beginning of
jffs2_garbage_collect_pass() and release it at the end, thereby
preventing any other write activity on the file system during a
garbage collect pass.
When writing new nodes, the alloc_sem must be held until the new nodes
have been properly linked into the data structures for the inode to
which they belong. This is for the benefit of NAND flash - adding new
nodes to an inode may obsolete old ones, and by holding the alloc_sem
until this happens we ensure that any data in the write-buffer at the
time this happens are part of the new node, not just something that
was written afterwards. Hence, we can ensure the newly-obsoleted nodes
don't actually get erased until the write-buffer has been flushed to
the medium.
With the introduction of NAND flash support and the write-buffer,
the alloc_sem is also used to protect the wbuf-related members of the
jffs2_sb_info structure. Atomically reading the wbuf_len member to see
if the wbuf is currently holding any data is permitted, though.
Ordering constraints: See f->sem.
File Mutex f->sem
---------------------
This is the JFFS2-internal equivalent of the inode mutex i->i_sem.
It protects the contents of the jffs2_inode_info private inode data,
including the linked list of node fragments (but see the notes below on
erase_completion_lock), etc.
The reason that the i_sem itself isn't used for this purpose is to
avoid deadlocks with garbage collection -- the VFS will lock the i_sem
before calling a function which may need to allocate space. The
allocation may trigger garbage-collection, which may need to move a
node belonging to the inode which was locked in the first place by the
VFS. If the garbage collection code were to attempt to lock the i_sem
of the inode from which it's garbage-collecting a physical node, this
lead to deadlock, unless we played games with unlocking the i_sem
before calling the space allocation functions.
Instead of playing such games, we just have an extra internal
mutex, which is obtained by the garbage collection code and also
by the normal file system code _after_ allocation of space.
Ordering constraints:
1. Never attempt to allocate space or lock alloc_sem with
any f->sem held.
2. Never attempt to lock two file mutexes in one thread.
No ordering rules have been made for doing so.
3. Never lock a page cache page with f->sem held.
erase_completion_lock spinlock
------------------------------
This is used to serialise access to the eraseblock lists, to the
per-eraseblock lists of physical jffs2_raw_node_ref structures, and
(NB) the per-inode list of physical nodes. The latter is a special
case - see below.
As the MTD API no longer permits erase-completion callback functions
to be called from bottom-half (timer) context (on the basis that nobody
ever actually implemented such a thing), it's now sufficient to use
a simple spin_lock() rather than spin_lock_bh().
Note that the per-inode list of physical nodes (f->nodes) is a special
case. Any changes to _valid_ nodes (i.e. ->flash_offset & 1 == 0) in
the list are protected by the file mutex f->sem. But the erase code
may remove _obsolete_ nodes from the list while holding only the
erase_completion_lock. So you can walk the list only while holding the
erase_completion_lock, and can drop the lock temporarily mid-walk as
long as the pointer you're holding is to a _valid_ node, not an
obsolete one.
The erase_completion_lock is also used to protect the c->gc_task
pointer when the garbage collection thread exits. The code to kill the
GC thread locks it, sends the signal, then unlocks it - while the GC
thread itself locks it, zeroes c->gc_task, then unlocks on the exit path.
inocache_lock spinlock
----------------------
This spinlock protects the hashed list (c->inocache_list) of the
in-core jffs2_inode_cache objects (each inode in JFFS2 has the
correspondent jffs2_inode_cache object). So, the inocache_lock
has to be locked while walking the c->inocache_list hash buckets.
This spinlock also covers allocation of new inode numbers, which is
currently just '++->highest_ino++', but might one day get more complicated
if we need to deal with wrapping after 4 milliard inode numbers are used.
Note, the f->sem guarantees that the correspondent jffs2_inode_cache
will not be removed. So, it is allowed to access it without locking
the inocache_lock spinlock.
Ordering constraints:
If both erase_completion_lock and inocache_lock are needed, the
c->erase_completion has to be acquired first.
erase_free_sem
--------------
This mutex is only used by the erase code which frees obsolete node
references and the jffs2_garbage_collect_deletion_dirent() function.
The latter function on NAND flash must read _obsolete_ nodes to
determine whether the 'deletion dirent' under consideration can be
discarded or whether it is still required to show that an inode has
been unlinked. Because reading from the flash may sleep, the
erase_completion_lock cannot be held, so an alternative, more
heavyweight lock was required to prevent the erase code from freeing
the jffs2_raw_node_ref structures in question while the garbage
collection code is looking at them.
Suggestions for alternative solutions to this problem would be welcomed.
wbuf_sem
--------
This read/write semaphore protects against concurrent access to the
write-behind buffer ('wbuf') used for flash chips where we must write
in blocks. It protects both the contents of the wbuf and the metadata
which indicates which flash region (if any) is currently covered by
the buffer.
Ordering constraints:
Lock wbuf_sem last, after the alloc_sem or and f->sem.
c->xattr_sem
------------
This read/write semaphore protects against concurrent access to the
xattr related objects which include stuff in superblock and ic->xref.
In read-only path, write-semaphore is too much exclusion. It's enough
by read-semaphore. But you must hold write-semaphore when updating,
creating or deleting any xattr related object.
Once xattr_sem released, there would be no assurance for the existence
of those objects. Thus, a series of processes is often required to retry,
when updating such a object is necessary under holding read semaphore.
For example, do_jffs2_getxattr() holds read-semaphore to scan xref and
xdatum at first. But it retries this process with holding write-semaphore
after release read-semaphore, if it's necessary to load name/value pair
from medium.
Ordering constraints:
Lock xattr_sem last, after the alloc_sem.