mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
This is the 5.4.142 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmEcr3MACgkQONu9yGCS
aT6eag//f6COc7PQMKCJU7hcw0Xe4pIPmUUj+EpkwztzfX45dCzWxbhHxRiOqtKa
ReSUXZ8mJLzYJgyHRr6FfsUqENWzKGqHby15yZ2h0rEyJns/V054NiBjz1aWoQZ4
axpF1SYaLfLglfobslLc/3+JbyTfxBK/+m6XnZRJXqMMFnJ+hljJJxXuCryEQnU6
KtAlrS2ITpbEyAECAE02oErxGDGCnTDzGpQvlSeJWqJVlisrsGIvGowjFliy6ONf
YDjsejKlNUlQwnplXErefuXf7uhT/36sN0DnxCy5yXJ8SJwnzja3eYDz1yG9apG0
ZR7KM3dN3L8viuRx2GEOubh8EMbirErD9DrhaPyaNhEPKHI2cHxHdG2prj5WkBzZ
OjXcW32FDWzw6/kfnHEOBl0OrmhsEIY1/pP8jegape8lDrj/szN0ViJe0rzElba1
6pb0D/ASFPYtYwR1O2/qZiPqqzHQEAFfDyDMKEKzogbNAHUbfvaE6g3qYafwQgS6
o+g/BBxtrGNaIWtMtQ75aeoqFA4mkE9MrLJ1SzEFpw/PvHCHtFItCyEcUwaNvEz8
OdwceDSIkT4Bn0GzEwuxKxcFyZ1R3rIABPIUGbid8Q3w6ZgM/vr2BPR3vkUY0zl+
g9DPae9S4K8A+kYGwyeYzZ0dPC6otb8h01RtiGJyQgyiPAeTutk=
=QJcB
-----END PGP SIGNATURE-----
Merge 5.4.142 into android11-5.4-lts
Changes in 5.4.142
iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels
iio: humidity: hdc100x: Add margin to the conversion time
iio: adc: Fix incorrect exit of for-loop
ASoC: xilinx: Fix reference to PCM buffer address
ASoC: intel: atom: Fix reference to PCM buffer address
i2c: dev: zero out array used for i2c reads from userspace
ceph: reduce contention in ceph_check_delayed_caps()
ACPI: NFIT: Fix support for virtual SPA ranges
libnvdimm/region: Fix label activation vs errors
ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
ieee802154: hwsim: fix GPF in hwsim_new_edge_nl
ASoC: cs42l42: Correct definition of ADC Volume control
ASoC: cs42l42: Don't allow SND_SOC_DAIFMT_LEFT_J
ASoC: cs42l42: Fix inversion of ADC Notch Switch control
ASoC: cs42l42: Remove duplicate control for WNF filter frequency
netfilter: nf_conntrack_bridge: Fix memory leak when error
ASoC: cs42l42: Fix LRCLK frame start edge
net: dsa: mt7530: add the missing RxUnicast MIB counter
platform/x86: pcengines-apuv2: revert wiring up simswitch GPIO as LED
platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables
net: phy: micrel: Fix link detection on ksz87xx switch"
ppp: Fix generating ifname when empty IFLA_IFNAME is specified
net: sched: act_mirred: Reset ct info when mirror/redirect skb
iavf: Set RSS LUT and key in reset handle path
psample: Add a fwd declaration for skbuff
net/mlx5: Fix return value from tracer initialization
drm/meson: fix colour distortion from HDR set during vendor u-boot
net: dsa: microchip: Fix ksz_read64()
net: Fix memory leak in ieee802154_raw_deliver
net: igmp: fix data-race in igmp_ifc_timer_expire()
net: dsa: lan9303: fix broken backpressure in .port_fdb_dump
net: dsa: lantiq: fix broken backpressure in .port_fdb_dump
net: dsa: sja1105: fix broken backpressure in .port_fdb_dump
net: bridge: fix memleak in br_add_if()
net: linkwatch: fix failure to restore device state across suspend/resume
tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets
net: igmp: increase size of mr_ifc_count
xen/events: Fix race in set_evtchn_to_irq
vsock/virtio: avoid potential deadlock when vsock device remove
nbd: Aovid double completion of a request
powerpc/kprobes: Fix kprobe Oops happens in booke
x86/tools: Fix objdump version check again
genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP
x86/msi: Force affinity setup before startup
x86/ioapic: Force affinity setup before startup
x86/resctrl: Fix default monitoring groups reporting
genirq/msi: Ensure deactivation on teardown
genirq/timings: Prevent potential array overflow in __irq_timings_store()
PCI/MSI: Enable and mask MSI-X early
PCI/MSI: Mask all unused MSI-X entries
PCI/MSI: Enforce that MSI-X table entry is masked for update
PCI/MSI: Enforce MSI[X] entry updates to be visible
PCI/MSI: Do not set invalid bits in MSI mask
PCI/MSI: Correct misleading comments
PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown()
PCI/MSI: Protect msi_desc::masked for multi-MSI
KVM: VMX: Use current VMCS to query WAITPKG support for MSR emulation
ceph: add some lockdep assertions around snaprealm handling
ceph: clean up locking annotation for ceph_get_snap_realm and __lookup_snap_realm
ceph: take snap_empty_lock atomically with snaprealm refcount change
vmlinux.lds.h: Handle clang's module.{c,d}tor sections
iommu/vt-d: Fix agaw for a supported 48 bit guest address width
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)
Linux 5.4.142
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: I7df2f917694a7f6d1eefb220b57271612b026443
This commit is contained in:
commit
5395faca89
57 changed files with 394 additions and 225 deletions
|
|
@ -4053,12 +4053,20 @@ bad:
|
|||
|
||||
/*
|
||||
* Delayed work handler to process end of delayed cap release LRU list.
|
||||
*
|
||||
* If new caps are added to the list while processing it, these won't get
|
||||
* processed in this run. In this case, the ci->i_hold_caps_max will be
|
||||
* returned so that the work can be scheduled accordingly.
|
||||
*/
|
||||
void ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
|
||||
unsigned long ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct ceph_inode_info *ci;
|
||||
int flags = CHECK_CAPS_NODELAY;
|
||||
struct ceph_mount_options *opt = mdsc->fsc->mount_options;
|
||||
unsigned long delay_max = opt->caps_wanted_delay_max * HZ;
|
||||
unsigned long loop_start = jiffies;
|
||||
unsigned long delay = 0;
|
||||
|
||||
dout("check_delayed_caps\n");
|
||||
while (1) {
|
||||
|
|
@ -4068,6 +4076,11 @@ void ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
|
|||
ci = list_first_entry(&mdsc->cap_delay_list,
|
||||
struct ceph_inode_info,
|
||||
i_cap_delay_list);
|
||||
if (time_before(loop_start, ci->i_hold_caps_max - delay_max)) {
|
||||
dout("%s caps added recently. Exiting loop", __func__);
|
||||
delay = ci->i_hold_caps_max;
|
||||
break;
|
||||
}
|
||||
if ((ci->i_ceph_flags & CEPH_I_FLUSH) == 0 &&
|
||||
time_before(jiffies, ci->i_hold_caps_max))
|
||||
break;
|
||||
|
|
@ -4084,6 +4097,8 @@ void ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
|
|||
}
|
||||
}
|
||||
spin_unlock(&mdsc->cap_delay_lock);
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4049,22 +4049,29 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)
|
|||
}
|
||||
|
||||
/*
|
||||
* delayed work -- periodically trim expired leases, renew caps with mds
|
||||
* delayed work -- periodically trim expired leases, renew caps with mds. If
|
||||
* the @delay parameter is set to 0 or if it's more than 5 secs, the default
|
||||
* workqueue delay value of 5 secs will be used.
|
||||
*/
|
||||
static void schedule_delayed(struct ceph_mds_client *mdsc)
|
||||
static void schedule_delayed(struct ceph_mds_client *mdsc, unsigned long delay)
|
||||
{
|
||||
int delay = 5;
|
||||
unsigned hz = round_jiffies_relative(HZ * delay);
|
||||
schedule_delayed_work(&mdsc->delayed_work, hz);
|
||||
unsigned long max_delay = HZ * 5;
|
||||
|
||||
/* 5 secs default delay */
|
||||
if (!delay || (delay > max_delay))
|
||||
delay = max_delay;
|
||||
schedule_delayed_work(&mdsc->delayed_work,
|
||||
round_jiffies_relative(delay));
|
||||
}
|
||||
|
||||
static void delayed_work(struct work_struct *work)
|
||||
{
|
||||
int i;
|
||||
struct ceph_mds_client *mdsc =
|
||||
container_of(work, struct ceph_mds_client, delayed_work.work);
|
||||
unsigned long delay;
|
||||
int renew_interval;
|
||||
int renew_caps;
|
||||
int i;
|
||||
|
||||
dout("mdsc delayed_work\n");
|
||||
|
||||
|
|
@ -4119,7 +4126,7 @@ static void delayed_work(struct work_struct *work)
|
|||
}
|
||||
mutex_unlock(&mdsc->mutex);
|
||||
|
||||
ceph_check_delayed_caps(mdsc);
|
||||
delay = ceph_check_delayed_caps(mdsc);
|
||||
|
||||
ceph_queue_cap_reclaim_work(mdsc);
|
||||
|
||||
|
|
@ -4127,7 +4134,7 @@ static void delayed_work(struct work_struct *work)
|
|||
|
||||
maybe_recover_session(mdsc);
|
||||
|
||||
schedule_delayed(mdsc);
|
||||
schedule_delayed(mdsc, delay);
|
||||
}
|
||||
|
||||
int ceph_mdsc_init(struct ceph_fs_client *fsc)
|
||||
|
|
@ -4600,7 +4607,7 @@ void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
|
|||
mdsc->mdsmap->m_epoch);
|
||||
|
||||
mutex_unlock(&mdsc->mutex);
|
||||
schedule_delayed(mdsc);
|
||||
schedule_delayed(mdsc, 0);
|
||||
return;
|
||||
|
||||
bad_unlock:
|
||||
|
|
|
|||
|
|
@ -60,24 +60,26 @@
|
|||
/*
|
||||
* increase ref count for the realm
|
||||
*
|
||||
* caller must hold snap_rwsem for write.
|
||||
* caller must hold snap_rwsem.
|
||||
*/
|
||||
void ceph_get_snap_realm(struct ceph_mds_client *mdsc,
|
||||
struct ceph_snap_realm *realm)
|
||||
{
|
||||
dout("get_realm %p %d -> %d\n", realm,
|
||||
atomic_read(&realm->nref), atomic_read(&realm->nref)+1);
|
||||
lockdep_assert_held(&mdsc->snap_rwsem);
|
||||
|
||||
/*
|
||||
* since we _only_ increment realm refs or empty the empty
|
||||
* list with snap_rwsem held, adjusting the empty list here is
|
||||
* safe. we do need to protect against concurrent empty list
|
||||
* additions, however.
|
||||
* The 0->1 and 1->0 transitions must take the snap_empty_lock
|
||||
* atomically with the refcount change. Go ahead and bump the
|
||||
* nref here, unless it's 0, in which case we take the spinlock
|
||||
* and then do the increment and remove it from the list.
|
||||
*/
|
||||
if (atomic_inc_return(&realm->nref) == 1) {
|
||||
spin_lock(&mdsc->snap_empty_lock);
|
||||
if (atomic_inc_not_zero(&realm->nref))
|
||||
return;
|
||||
|
||||
spin_lock(&mdsc->snap_empty_lock);
|
||||
if (atomic_inc_return(&realm->nref) == 1)
|
||||
list_del_init(&realm->empty_item);
|
||||
spin_unlock(&mdsc->snap_empty_lock);
|
||||
}
|
||||
spin_unlock(&mdsc->snap_empty_lock);
|
||||
}
|
||||
|
||||
static void __insert_snap_realm(struct rb_root *root,
|
||||
|
|
@ -113,6 +115,8 @@ static struct ceph_snap_realm *ceph_create_snap_realm(
|
|||
{
|
||||
struct ceph_snap_realm *realm;
|
||||
|
||||
lockdep_assert_held_write(&mdsc->snap_rwsem);
|
||||
|
||||
realm = kzalloc(sizeof(*realm), GFP_NOFS);
|
||||
if (!realm)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
@ -135,7 +139,7 @@ static struct ceph_snap_realm *ceph_create_snap_realm(
|
|||
/*
|
||||
* lookup the realm rooted at @ino.
|
||||
*
|
||||
* caller must hold snap_rwsem for write.
|
||||
* caller must hold snap_rwsem.
|
||||
*/
|
||||
static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc,
|
||||
u64 ino)
|
||||
|
|
@ -143,6 +147,8 @@ static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc,
|
|||
struct rb_node *n = mdsc->snap_realms.rb_node;
|
||||
struct ceph_snap_realm *r;
|
||||
|
||||
lockdep_assert_held(&mdsc->snap_rwsem);
|
||||
|
||||
while (n) {
|
||||
r = rb_entry(n, struct ceph_snap_realm, node);
|
||||
if (ino < r->ino)
|
||||
|
|
@ -176,6 +182,8 @@ static void __put_snap_realm(struct ceph_mds_client *mdsc,
|
|||
static void __destroy_snap_realm(struct ceph_mds_client *mdsc,
|
||||
struct ceph_snap_realm *realm)
|
||||
{
|
||||
lockdep_assert_held_write(&mdsc->snap_rwsem);
|
||||
|
||||
dout("__destroy_snap_realm %p %llx\n", realm, realm->ino);
|
||||
|
||||
rb_erase(&realm->node, &mdsc->snap_realms);
|
||||
|
|
@ -198,28 +206,30 @@ static void __destroy_snap_realm(struct ceph_mds_client *mdsc,
|
|||
static void __put_snap_realm(struct ceph_mds_client *mdsc,
|
||||
struct ceph_snap_realm *realm)
|
||||
{
|
||||
dout("__put_snap_realm %llx %p %d -> %d\n", realm->ino, realm,
|
||||
atomic_read(&realm->nref), atomic_read(&realm->nref)-1);
|
||||
lockdep_assert_held_write(&mdsc->snap_rwsem);
|
||||
|
||||
/*
|
||||
* We do not require the snap_empty_lock here, as any caller that
|
||||
* increments the value must hold the snap_rwsem.
|
||||
*/
|
||||
if (atomic_dec_and_test(&realm->nref))
|
||||
__destroy_snap_realm(mdsc, realm);
|
||||
}
|
||||
|
||||
/*
|
||||
* caller needn't hold any locks
|
||||
* See comments in ceph_get_snap_realm. Caller needn't hold any locks.
|
||||
*/
|
||||
void ceph_put_snap_realm(struct ceph_mds_client *mdsc,
|
||||
struct ceph_snap_realm *realm)
|
||||
{
|
||||
dout("put_snap_realm %llx %p %d -> %d\n", realm->ino, realm,
|
||||
atomic_read(&realm->nref), atomic_read(&realm->nref)-1);
|
||||
if (!atomic_dec_and_test(&realm->nref))
|
||||
if (!atomic_dec_and_lock(&realm->nref, &mdsc->snap_empty_lock))
|
||||
return;
|
||||
|
||||
if (down_write_trylock(&mdsc->snap_rwsem)) {
|
||||
spin_unlock(&mdsc->snap_empty_lock);
|
||||
__destroy_snap_realm(mdsc, realm);
|
||||
up_write(&mdsc->snap_rwsem);
|
||||
} else {
|
||||
spin_lock(&mdsc->snap_empty_lock);
|
||||
list_add(&realm->empty_item, &mdsc->snap_empty);
|
||||
spin_unlock(&mdsc->snap_empty_lock);
|
||||
}
|
||||
|
|
@ -236,6 +246,8 @@ static void __cleanup_empty_realms(struct ceph_mds_client *mdsc)
|
|||
{
|
||||
struct ceph_snap_realm *realm;
|
||||
|
||||
lockdep_assert_held_write(&mdsc->snap_rwsem);
|
||||
|
||||
spin_lock(&mdsc->snap_empty_lock);
|
||||
while (!list_empty(&mdsc->snap_empty)) {
|
||||
realm = list_first_entry(&mdsc->snap_empty,
|
||||
|
|
@ -269,6 +281,8 @@ static int adjust_snap_realm_parent(struct ceph_mds_client *mdsc,
|
|||
{
|
||||
struct ceph_snap_realm *parent;
|
||||
|
||||
lockdep_assert_held_write(&mdsc->snap_rwsem);
|
||||
|
||||
if (realm->parent_ino == parentino)
|
||||
return 0;
|
||||
|
||||
|
|
@ -686,6 +700,8 @@ int ceph_update_snap_trace(struct ceph_mds_client *mdsc,
|
|||
int err = -ENOMEM;
|
||||
LIST_HEAD(dirty_realms);
|
||||
|
||||
lockdep_assert_held_write(&mdsc->snap_rwsem);
|
||||
|
||||
dout("update_snap_trace deletion=%d\n", deletion);
|
||||
more:
|
||||
ceph_decode_need(&p, e, sizeof(*ri), bad);
|
||||
|
|
|
|||
|
|
@ -1064,7 +1064,7 @@ extern void ceph_flush_snaps(struct ceph_inode_info *ci,
|
|||
extern bool __ceph_should_report_size(struct ceph_inode_info *ci);
|
||||
extern void ceph_check_caps(struct ceph_inode_info *ci, int flags,
|
||||
struct ceph_mds_session *session);
|
||||
extern void ceph_check_delayed_caps(struct ceph_mds_client *mdsc);
|
||||
extern unsigned long ceph_check_delayed_caps(struct ceph_mds_client *mdsc);
|
||||
extern void ceph_flush_dirty_caps(struct ceph_mds_client *mdsc);
|
||||
extern int ceph_drop_caps_for_unlink(struct inode *inode);
|
||||
extern int ceph_encode_inode_release(void **p, struct inode *inode,
|
||||
|
|
|
|||
Loading…
Reference in a new issue