This is needed for ABI compatibility
Bug: 153905799
Change-Id: Idd802feeb29652e9f575faff8a0770af5697eedb
Signed-off-by: Saravana Kannan <saravanak@google.com>
Some vendors use this. So enable it.
Bug: 153905799
Change-Id: Ia7de7437c2921ac6a60d2b3e255146251fb1d4a3
Signed-off-by: Saravana Kannan <saravanak@google.com>
Without these changes, the user will be prompted for config changes.
Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153934356
Test: BUILD_CONFIG=common/build.config.allmodconfig.aarch64 build/build.sh
Change-Id: Ib9ef72b217d1e0d78edf136cfe560058e3126d18
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
'struct pglist_data at mmzone.h:639:1' changed:
type size changed from 31232 to 30208 (in bits)
there are data member changes:
'zone pglist_data::node_zones[2]' size changed from 25600 to 24576 (in bits) (by -1024 bits)
'zonelist pglist_data::node_zonelists[1]' offset changed from 25600 to 24576 (in bits) (by -1024 bits)
'int pglist_data::nr_zones' offset changed from 25984 to 24960 (in bits) (by -1024 bits)
'unsigned long int pglist_data::node_start_pfn' offset changed from 26048 to 25024 (in bits) (by -1024 bits)
'unsigned long int pglist_data::node_present_pages' offset changed from 26112 to 25088 (in bits) (by -1024 bits)
'unsigned long int pglist_data::node_spanned_pages' offset changed from 26176 to 25152 (in bits) (by -1024 bits)
'int pglist_data::node_id' offset changed from 26240 to 25216 (in bits) (by -1024 bits)
'wait_queue_head_t pglist_data::kswapd_wait' offset changed from 26304 to 25280 (in bits) (by -1024 bits)
'wait_queue_head_t pglist_data::pfmemalloc_wait' offset changed from 26496 to 25472 (in bits) (by -1024 bits)
'task_struct* pglist_data::kswapd' offset changed from 26688 to 25664 (in bits) (by -1024 bits)
'int pglist_data::kswapd_order' offset changed from 26752 to 25728 (in bits) (by -1024 bits)
'zone_type pglist_data::kswapd_classzone_idx' offset changed from 26784 to 25760 (in bits) (by -1024 bits)
'int pglist_data::kswapd_failures' offset changed from 26816 to 25792 (in bits) (by -1024 bits)
'int pglist_data::kcompactd_max_order' offset changed from 26848 to 25824 (in bits) (by -1024 bits)
'zone_type pglist_data::kcompactd_classzone_idx' offset changed from 26880 to 25856 (in bits) (by -1024 bits)
'wait_queue_head_t pglist_data::kcompactd_wait' offset changed from 26944 to 25920 (in bits) (by -1024 bits)
'task_struct* pglist_data::kcompactd' offset changed from 27136 to 26112 (in bits) (by -1024 bits)
'unsigned long int pglist_data::totalreserve_pages' offset changed from 27200 to 26176 (in bits) (by -1024 bits)
'zone_padding pglist_data::_pad1_' offset changed from 27648 to 26624 (in bits) (by -1024 bits)
'spinlock_t pglist_data::lru_lock' offset changed from 27648 to 26624 (in bits) (by -1024 bits)
'lruvec pglist_data::lruvec' offset changed from 27712 to 26688 (in bits) (by -1024 bits)
'unsigned long int pglist_data::flags' offset changed from 28800 to 27776 (in bits) (by -1024 bits)
'zone_padding pglist_data::_pad2_' offset changed from 29184 to 28160 (in bits) (by -1024 bits)
'per_cpu_nodestat* pglist_data::per_cpu_nodestats' offset changed from 29184 to 28160 (in bits) (by -1024 bits)
'atomic_long_t pglist_data::vm_stat[30]' offset changed from 29248 to 28224 (in bits) (by -1024 bits)
548 impacted interfaces
'struct zone at mmzone.h:367:1' changed:
type size changed from 12800 to 12288 (in bits)
3 data member deletions:
'unsigned long int zone::watermark_boost', at offset 192 (in bits) at mmzone.h:372:1
'unsigned long int zone::compact_init_migrate_pfn', at offset 11520 (in bits) at mmzone.h:498:1
'unsigned long int zone::compact_init_free_pfn', at offset 11584 (in bits) at mmzone.h:499:1
there are data member changes:
'unsigned long int zone::nr_reserved_highatomic' offset changed from 256 to 192 (in bits) (by -64 bits)
'long int zone::lowmem_reserve[2]' offset changed from 320 to 256 (in bits) (by -64 bits)
'pglist_data* zone::zone_pgdat' offset changed from 448 to 384 (in bits) (by -64 bits)
'per_cpu_pageset* zone::pageset' offset changed from 512 to 448 (in bits) (by -64 bits)
'bool zone::cma_alloc' offset changed from 576 to 512 (in bits) (by -64 bits)
'unsigned long int zone::zone_start_pfn' offset changed from 640 to 576 (in bits) (by -64 bits)
'unsigned long int zone::managed_pages' offset changed from 704 to 640 (in bits) (by -64 bits)
'unsigned long int zone::spanned_pages' offset changed from 768 to 704 (in bits) (by -64 bits)
'unsigned long int zone::present_pages' offset changed from 832 to 768 (in bits) (by -64 bits)
'const char* zone::name' offset changed from 896 to 832 (in bits) (by -64 bits)
'unsigned long int zone::nr_isolate_pageblock' offset changed from 960 to 896 (in bits) (by -64 bits)
'int zone::initialized' offset changed from 1024 to 960 (in bits) (by -64 bits)
'zone_padding zone::_pad1_' offset changed from 1536 to 1024 (in bits) (by -512 bits)
'free_area zone::free_area[11]' offset changed from 1536 to 1024 (in bits) (by -512 bits)
'unsigned long int zone::flags' offset changed from 10688 to 10176 (in bits) (by -512 bits)
'spinlock_t zone::lock' offset changed from 10752 to 10240 (in bits) (by -512 bits)
'zone_padding zone::_pad2_' offset changed from 11264 to 10752 (in bits) (by -512 bits)
'unsigned long int zone::percpu_drift_mark' offset changed from 11264 to 10752 (in bits) (by -512 bits)
'unsigned long int zone::compact_cached_free_pfn' offset changed from 11328 to 10816 (in bits) (by -512 bits)
'unsigned long int zone::compact_cached_migrate_pfn[2]' offset changed from 11392 to 10880 (in bits) (by -512 bits)
'unsigned int zone::compact_considered' offset changed from 11648 to 11008 (in bits) (by -640 bits)
'unsigned int zone::compact_defer_shift' offset changed from 11680 to 11040 (in bits) (by -640 bits)
'int zone::compact_order_failed' offset changed from 11712 to 11072 (in bits) (by -640 bits)
'bool zone::compact_blockskip_flush' offset changed from 11744 to 11104 (in bits) (by -640 bits)
'bool zone::contiguous' offset changed from 11752 to 11112 (in bits) (by -640 bits)
'zone_padding zone::_pad3_' offset changed from 11776 to 11264 (in bits) (by -512 bits)
'atomic_long_t zone::vm_stat[14]' offset changed from 11776 to 11264 (in bits) (by -512 bits)
'atomic_long_t zone::vm_numa_stat[]' offset changed from 12672 to 12160 (in bits) (by -512 bits)
548 impacted interfaces
Bug: 140544941
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I85847dc52c3e002f8978d020d1e4ccf8a638d5ba
Signed-off-by: Martin Liu <liumartin@google.com>
Each vendor might want to implement some debug code when the kernel
panics. So, add a vendor_panic_cb callback for vendors to implement.
Bug: 149258398
Test: compile
Change-Id: I7a374b0089f72c2511db6fe3b8cdd18f41a1eb6c
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from commit 911d9c70c2c50b0383ed0b652bb84ca8832e4a2b)
Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: only pulled in the ABI diffs]
...because it can be, the buffer is strlcpy'd into a local buffer in a
thermal struct member.
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit f991de53a8)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I3c9f18f4459890cc2ebcbf9bc6f9e6e3da339dfb
Partial cherry picked from
commit 6c1ddabbd1d51b8f1704c682fa0c7a8695cbad12
("thermal: Create softlink by name for thermal_zone and cooling device")
Bug: 139859938
Bug: 118439547
Test: tz and cdev softlink can be created at
sys/devices/virtual/thermal and sys/class/thermal.
Signed-off-by: TeYuan Wang <kamewang@google.com>
Signed-off-by: davidchao <davidchao@google.com>
(cherry picked from commit 6c1ddabbd1d51b8f1704c682fa0c7a8695cbad12)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: Ic2d265dcec4caba228b4e86dc1163c13952d8d3b
Add APIs to find the DDR device rank and Highest
Bank Bit (HBB) information from their respective
memory nodes.
Bug: 153905290
Test: compile
Change-Id: Iae94efc681daf2cf0a531dceb8d2acdcf3484388
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
(cherry picked from commit 789ad9a7a829c6c423125eac3490967916c46ba9)
Signed-off-by: Will McVicker <willmcvicker@google.com>
These symbols are needed by some vendor drivers. So add stubs symbols to
please those drivers.
Bug: 153902877
Test: compile
Signed-off-by: Rick Adams <rgadams@codeaurora.org>
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
[willmcvicker: Squashed the following commits but only took ABI diffs:
f699c92b61 msm: 8x55: put reason for boot in procfs from SMEM
ee67650037 sysctl: add cold_boot sysctl entry
de98b0ac25 sysctl: add boot_reason and cold_boot sysctl entries for arm64]
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I1c3eb7bcf9fb2ccae870a3fb4b9e31138609cf46
Adds new member skip_resume to struct usb_bus to resolve ABI diff.
This patch also adds the capability to skip device resume during
system resume. It allows xHC to remain in low power mode and not
resume the bus when system wide resume happens.
Instead, the controller comes out of low power mode only
when usb device issues a remote wakeup or if there is
host initiated bus resume.
Test: build
Bug: 153445212
Change-Id: I96cdcb9e3642906b4afa08d9bde07e123d9b3977
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 567a7ba0cc8c96d8b01ea290417c8397d1acd078)
[hridya: partial cherry-pick]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Also, adds function usb_gsi_ep_op and resolves ABI diff for
struct usb_ep_ops by adding new member gsi_ep_ops. Also
resolves ABI diff for struct usb_request by adding member udc_priv.
Test: build
Bug: 153676200
Change-Id: I04a59f7a2670fb80afa5822b79ea488bc94abdfe
(cherry picked from commit 62523500193e11a8837d4c76ef4a42be2ca4ea0f)
[hridya: EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL, cherry-picked only the ABI
diff, added some null pointer checks and documentation]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
ABI resolution for a series of v4l2 functions.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I90dff74d8ec85857e6fc31dfbc83a2e737ac13d6
Run the script,
$ ../build/gki/add_EXPORT_SYMBOL_GPL < abi_gki_aarch64_qcom_whitelist
This will export all the required symbols that are in this kernel.
Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153886473
Test: compile
Change-Id: I703509d75104cd86f472481346e3efbd235121ab
Bug: 153560805
Test: incfs_test passes on qemu and Pixel 4
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I1b55341e4e4247a74f3f539b9d190fef0ca409b8
Read log buffer can have multiple threads doing any of these
operations simultaneously:
- Polling for changes
- Reading log records
- Adding new log records
- Updating log buffer size, or enabling/disabling it completely
As we don't control the userspace, and it turns out that they
all currently originate from different processes, code needs to
be safe against parallel access to a read buffer and a request
for reallocating it.
This CL add an r/w spinlock to protect the buffer and its size.
Each remount takes the write lock, while everything else takes
a read lock. Remount makes sure it doesn't take too long by
preallocating and precalculating all updates, while other
operations don't care much about their critical section size -
they all can still run together.
Bug: 152633648
Test: manual remount + reading
Signed-off-by: Yurii Zubrytskyi <zyy@google.com>
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I7271b4cb89f1ae2cbee6e5b073758f344c4ba66a
This led to a 20x speed improvement on QEMU. 512 is somewhat
arbitrary - most of the gains are already there reading 64 records
at a time, but since the record size is 10 bytes, 512 is just over
a page and seems a good choice.
Bug: 153170997
Test: incfs_test passes. Adding logging to incfs_get_filled_blocks
to measure performance shows a 20x improvement
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ifb2da77cfd8c9d653c7047ba1eb7f39d795fa1c2
Found by sparse
Bug: 153174547
Test: make C=2 fs/incfs/incrementalfs.ko no errors, incfs_test pass
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I9ff4f4f35975fe09936724488b96cd8bdeeb719e
* aosp/upstream-f2fs-stable-linux-4.19.y:
f2fs: keep inline_data when compression conversion
f2fs: fix to disable compression on directory
f2fs: add missing CONFIG_F2FS_FS_COMPRESSION
f2fs: switch discard_policy.timeout to bool type
f2fs: fix to verify tpage before releasing in f2fs_free_dic()
f2fs: show compression in statx
f2fs: clean up dic->tpages assignment
f2fs: compress: support zstd compress algorithm
f2fs: compress: add .{init,destroy}_decompress_ctx callback
f2fs: compress: fix to call missing destroy_compress_ctx()
f2fs: change default compression algorithm
f2fs: clean up {cic,dic}.ref handling
f2fs: fix to use f2fs_readpage_limit() in f2fs_read_multi_pages()
f2fs: xattr.h: Make stub helpers inline
f2fs: fix to avoid double unlock
f2fs: fix potential .flags overflow on 32bit architecture
f2fs: fix NULL pointer dereference in f2fs_verity_work()
f2fs: fix to clear PG_error if fsverity failed
f2fs: don't call fscrypt_get_encryption_info() explicitly in f2fs_tmpfile()
f2fs: don't trigger data flush in foreground operation
f2fs: fix NULL pointer dereference in f2fs_write_begin()
f2fs: clean up f2fs_may_encrypt()
f2fs: fix to avoid potential deadlock
f2fs: don't change inode status under page lock
f2fs: fix potential deadlock on compressed quota file
f2fs: delete DIO read lock
f2fs: don't mark compressed inode dirty during f2fs_iget()
f2fs: fix to account compressed blocks in f2fs_compressed_blocks()
f2fs: xattr.h: Replace zero-length array with flexible-array member
f2fs: fix to update f2fs_super_block fields under sb_lock
f2fs: Add a new CP flag to help fsck fix resize SPO issues
f2fs: Fix mount failure due to SPO after a successful online resize FS
f2fs: use kmem_cache pool during inline xattr lookups
f2fs: skip migration only when BG_GC is called
f2fs: fix to show tracepoint correctly
f2fs: avoid __GFP_NOFAIL in f2fs_bio_alloc
f2fs: introduce F2FS_IOC_GET_COMPRESS_BLOCKS
f2fs: fix to avoid triggering IO in write path
f2fs: add prefix for f2fs slab cache name
f2fs: introduce DEFAULT_IO_TIMEOUT
f2fs: skip GC when section is full
f2fs: add migration count iff migration happens
f2fs: clean up bggc mount option
f2fs: clean up lfs/adaptive mount option
f2fs: fix to show norecovery mount option
f2fs: clean up parameter of macro XATTR_SIZE()
f2fs: clean up codes with {f2fs_,}data_blkaddr()
f2fs: show mounted time
f2fs: Use scnprintf() for avoiding potential buffer overflow
f2fs: allow to clear F2FS_COMPR_FL flag
f2fs: fix to check dirty pages during compressed inode conversion
f2fs: fix to account compressed inode correctly
f2fs: fix wrong check on F2FS_IOC_FSSETXATTR
f2fs: fix to avoid use-after-free in f2fs_write_multi_pages()
f2fs: fix to avoid using uninitialized variable
f2fs: fix inconsistent comments
f2fs: remove i_sem lock coverage in f2fs_setxattr()
f2fs: cover last_disk_size update with spinlock
f2fs: fix to check i_compr_blocks correctly
f2fs: fix to avoid potential deadlock
f2fs: add missing function name in kernel message
f2fs: recycle unused compress_data.chksum feild
f2fs: fix to avoid NULL pointer dereference
f2fs: fix leaking uninitialized memory in compressed clusters
f2fs: fix the panic in do_checkpoint()
f2fs: fix to wait all node page writeback
mm/swapfile.c: move inode_lock out of claim_swapfile
fscrypt: don't evict dirty inodes after removing key
Conflicts:
fs/f2fs/file.c
Bug: 151226003
Change-Id: I86ee3579255cf2f37cf1a1d00ee4af90e973242a
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Changes in 4.19.115
ipv4: fix a RCU-list lock in fib_triestat_seq_show
net, ip_tunnel: fix interface lookup with no key
sctp: fix refcount bug in sctp_wfree
sctp: fix possibly using a bad saddr with a given dst
nvme-rdma: Avoid double freeing of async event data
drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
drm/bochs: downgrade pci_request_region failure from error to warning
initramfs: restore default compression behavior
drm/amdgpu: fix typo for vcn1 idle check
tools/power turbostat: Fix gcc build warnings
tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks
drm/etnaviv: replace MMU flush marker with flush sequence
media: rc: IR signal for Panasonic air conditioner too long
misc: rtsx: set correct pcr_ops for rts522A
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
coresight: do not use the BIT() macro in the UAPI header
mei: me: add cedar fork device ids
extcon: axp288: Add wakeup support
power: supply: axp288_charger: Add special handling for HP Pavilion x2 10
ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
rxrpc: Fix sendmsg(MSG_WAITALL) handling
net: Fix Tx hash bound checking
padata: always acquire cpu_hotplug_lock before pinst->lock
bitops: protect variables in set_mask_bits() macro
include/linux/notifier.h: SRCU: fix ctags
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
ipv6: don't auto-add link-local address to lag ports
net: dsa: bcm_sf2: Do not register slave MDIO bus with OF
net: dsa: bcm_sf2: Ensure correct sub-node is parsed
net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
slcan: Don't transmit uninitialized stack data in padding
mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
random: always use batched entropy for get_random_u{32,64}
usb: dwc3: gadget: Wrap around when skip TRBs
tools/accounting/getdelays.c: fix netlink attribute length
hwrng: imx-rngc - fix an error path
ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
IB/hfi1: Fix memory leaks in sysfs registration and unregistration
ceph: remove the extra slashes in the server path
ceph: canonicalize server path in place
RDMA/ucma: Put a lock around every call to the rdma_cm layer
RDMA/cma: Teach lockdep about the order of rtnl and lock
Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
fbcon: fix null-ptr-deref in fbcon_switch
clk: qcom: rcg: Return failure for RCG update
drm/msm: stop abusing dma_map/unmap for cache
arm64: Fix size of __early_cpu_boot_status
rpmsg: glink: Remove chunk size word align warning
usb: dwc3: don't set gadget->is_otg flag
drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
drm/msm: Use the correct dma_sync calls in msm_gem
Linux 4.19.115
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idc17d8aa387491167efc60df0a9764b82e4344da
commit c09b73cfac upstream.
This reverts
commit 6a4290cc28 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")
We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
and are not setting gadget->otg_caps, so don't set gadget->is_otg
flag.
If we do then we end up publishing a OTG1.0 descriptor in
the gadget descriptor which causes device enumeration to fail
if we are connected to a host with CONFIG_USB_OTG enabled.
Host side log without this patch
[ 96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 96.901391] usb 1-1: Dual-Role OTG device on non-HNP port
[ 96.907552] usb 1-1: set a_alt_hnp_support failed: -32
[ 97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 97.241378] usb 1-1: Dual-Role OTG device on non-HNP port
[ 97.247536] usb 1-1: set a_alt_hnp_support failed: -32
[ 97.253606] usb usb1-port1: attempt power cycle
[ 97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[ 98.141383] usb 1-1: Dual-Role OTG device on non-HNP port
[ 98.147540] usb 1-1: set a_alt_hnp_support failed: -32
[ 98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd
[ 98.481391] usb 1-1: Dual-Role OTG device on non-HNP port
[ 98.487545] usb 1-1: set a_alt_hnp_support failed: -32
[ 98.493532] usb usb1-port1: unable to enumerate USB device
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit f0beb4ba9b upstream.
It is possible for the chunk sizes coming from the non RPM remote procs
to not be word aligned. Remove the alignment warning and continue to
read from the FIFO so execution is not stalled.
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit b27a939e83 upstream.
syzbot reported that 4fbc0c711b ("ceph: remove the extra slashes in
the server path") had caused a regression where an allocation could be
done under a spinlock -- compare_mount_options() is called by sget_fc()
with sb_lock held.
We don't really need the supplied server path, so canonicalize it
in place and compare it directly. To make this work, the leading
slash is kept around and the logic in ceph_real_mount() to skip it
is restored. CEPH_MSG_CLIENT_SESSION now reports the same (i.e.
canonicalized) path, with the leading slash of course.
Fixes: 4fbc0c711b ("ceph: remove the extra slashes in the server path")
Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 4fbc0c711b upstream.
It's possible to pass the mount helper a server path that has more
than one contiguous slash character. For example:
$ mount -t ceph 192.168.195.165:40176:/// /mnt/cephfs/
In the MDS server side the extra slashes of the server path will be
treated as snap dir, and then we can get the following debug logs:
ceph: mount opening path //
ceph: open_root_inode opening '//'
ceph: fill_trace 0000000059b8a3bc is_dentry 0 is_target 1
ceph: alloc_inode 00000000dc4ca00b
ceph: get_inode created new inode 00000000dc4ca00b 1.ffffffffffffffff ino 1
ceph: get_inode on 1=1.ffffffffffffffff got 00000000dc4ca00b
And then when creating any new file or directory under the mount
point, we can hit the following BUG_ON in ceph_fill_trace():
BUG_ON(ceph_snap(dir) != dvino.snap);
Have the client ignore the extra slashes in the server path when
mounting. This will also canonicalize the path, so that identical mounts
can be consilidated.
1) "//mydir1///mydir//"
2) "/mydir1/mydir"
3) "/mydir1/mydir/"
Regardless of the internal treatment of these paths, the kernel still
stores the original string including the leading '/' for presentation
to userland.
URL: https://tracker.ceph.com/issues/42771
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 5c15abc432 upstream.
When the hfi1 driver is unloaded, kmemleak will report the following
issue:
unreferenced object 0xffff8888461a4c08 (size 8):
comm "kworker/0:0", pid 5, jiffies 4298601264 (age 2047.134s)
hex dump (first 8 bytes):
73 64 6d 61 30 00 ff ff sdma0...
backtrace:
[<00000000311a6ef5>] kvasprintf+0x62/0xd0
[<00000000ade94d9f>] kobject_set_name_vargs+0x1c/0x90
[<0000000060657dbb>] kobject_init_and_add+0x5d/0xb0
[<00000000346fe72b>] 0xffffffffa0c5ecba
[<000000006cfc5819>] 0xffffffffa0c866b9
[<0000000031c65580>] 0xffffffffa0c38e87
[<00000000e9739b3f>] local_pci_probe+0x41/0x80
[<000000006c69911d>] work_for_cpu_fn+0x16/0x20
[<00000000601267b5>] process_one_work+0x171/0x380
[<0000000049a0eefa>] worker_thread+0x1d1/0x3f0
[<00000000909cf2b9>] kthread+0xf8/0x130
[<0000000058f5f874>] ret_from_fork+0x35/0x40
This patch fixes the issue by:
- Releasing dd->per_sdma[i].kobject in hfi1_unregister_sysfs().
- This will fix the memory leak.
- Calling kobject_put() to unwind operations only for those entries in
dd->per_sdma[] whose operations have succeeded (including the current
one that has just failed) in hfi1_verbs_register_sysfs().
Cc: <stable@vger.kernel.org>
Fixes: 0cb2aa690c ("IB/hfi1: Add sysfs interface for affinity setup")
Link: https://lore.kernel.org/r/20200326163807.21129.27371.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 47a1f8e8b3 upstream.
Make sure that the rngc interrupt is masked if the rngc self test fails.
Self test failure means that probe fails as well. Interrupts should be
masked in this case, regardless of the error.
Cc: stable@vger.kernel.org
Fixes: 1d5449445b ("hwrng: mx-rngc - add a driver for Freescale RNGC")
Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>