Merge branch 'android11-5.4' into branch 'android11-5.4-lts'
This catches the android11-5.4-lts branch up with the recent changes that have gone into the android11-5.4 branch. Included in here are the following commits: *0acbae5b32
Merge "Merge tag 'android11-5.4.259_r00' into android11-5.4" into android11-5.4 |\ | *b40f1a5d2f
Merge tag 'android11-5.4.259_r00' into android11-5.4 * |e8f8c3db8c
ANDROID: fix up rpmsg_device ABI break * |a1f6648aa3
ANDROID: fix up platform_device ABI break * |b05d8acf42
UPSTREAM: rpmsg: Fix possible refcount leak in rpmsg_register_device_override() * |9e43c50d47
UPSTREAM: rpmsg: glink: Release driver_override * |e172d704c7
BACKPORT: rpmsg: Fix calling device_lock() on non-initialized device * |f497d3c5e8
BACKPORT: rpmsg: Fix kfree() of static memory on setting driver_override * |d0dadc2667
UPSTREAM: rpmsg: Constify local variable in field store macro * |2069521c81
UPSTREAM: driver: platform: Add helper for safer setting of driver_override * |d43ac48de2
BACKPORT: firmware_loader: Abort all upcoming firmware load request once reboot triggered * |93e172c43e
UPSTREAM: firmware_loader: Refactor kill_pending_fw_fallback_reqs() * |49de253fb4
UPSTREAM: netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c * |756378d5aa
BACKPORT: ravb: Fix use-after-free issue in ravb_tx_timeout_work() * |0d7affc8ca
UPSTREAM: ravb: Fix up dma_free_coherent() call in ravb_remove() |/ *fda8861893
UPSTREAM: netfilter: ipset: Fix race between IPSET_CMD_CREATE and IPSET_CMD_SWAP *44ed16ddf6
UPSTREAM: net: xfrm: Fix xfrm_address_filter OOB read *d5a866abc0
UPSTREAM: igb: set max size RX buffer when store bad packet is enabled *5e99400d74
UPSTREAM: netfilter: xt_sctp: validate the flag_info count *16645e28d6
UPSTREAM: netfilter: xt_u32: validate user space input *1f18bb1187
UPSTREAM: netfilter: nfnetlink_osf: avoid OOB read *72e1ceae4b
UPSTREAM: net/sched: Retire rsvp classifier *df7f160dfd
UPSTREAM: ipv4: fix null-deref in ipv4_link_failure Change-Id: Ia5ebadea7622665ef47230dac75a011b813b12a3 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
4e4cce8b5a
@ -103,7 +103,7 @@ static void fw_load_abort(struct fw_sysfs *fw_sysfs)
|
||||
|
||||
static LIST_HEAD(pending_fw_head);
|
||||
|
||||
void kill_pending_fw_fallback_reqs(bool only_kill_custom)
|
||||
void kill_pending_fw_fallback_reqs(bool kill_all)
|
||||
{
|
||||
struct fw_priv *fw_priv;
|
||||
struct fw_priv *next;
|
||||
@ -111,9 +111,13 @@ void kill_pending_fw_fallback_reqs(bool only_kill_custom)
|
||||
mutex_lock(&fw_lock);
|
||||
list_for_each_entry_safe(fw_priv, next, &pending_fw_head,
|
||||
pending_list) {
|
||||
if (!fw_priv->need_uevent || !only_kill_custom)
|
||||
if (kill_all || !fw_priv->need_uevent)
|
||||
__fw_load_abort(fw_priv);
|
||||
}
|
||||
|
||||
if (kill_all)
|
||||
fw_load_abort_all = true;
|
||||
|
||||
mutex_unlock(&fw_lock);
|
||||
}
|
||||
|
||||
@ -510,7 +514,7 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,
|
||||
}
|
||||
|
||||
mutex_lock(&fw_lock);
|
||||
if (fw_state_is_aborted(fw_priv)) {
|
||||
if (fw_load_abort_all || fw_state_is_aborted(fw_priv)) {
|
||||
mutex_unlock(&fw_lock);
|
||||
retval = -EINTR;
|
||||
goto out;
|
||||
|
@ -35,7 +35,7 @@ int firmware_fallback_sysfs(struct firmware *fw, const char *name,
|
||||
struct device *device,
|
||||
enum fw_opt opt_flags,
|
||||
int ret);
|
||||
void kill_pending_fw_fallback_reqs(bool only_kill_custom);
|
||||
void kill_pending_fw_fallback_reqs(bool kill_all);
|
||||
|
||||
void fw_fallback_set_cache_timeout(void);
|
||||
void fw_fallback_set_default_timeout(void);
|
||||
@ -52,7 +52,7 @@ static inline int firmware_fallback_sysfs(struct firmware *fw, const char *name,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void kill_pending_fw_fallback_reqs(bool only_kill_custom) { }
|
||||
static inline void kill_pending_fw_fallback_reqs(bool kill_all) { }
|
||||
static inline void fw_fallback_set_cache_timeout(void) { }
|
||||
static inline void fw_fallback_set_default_timeout(void) { }
|
||||
|
||||
|
@ -78,6 +78,7 @@ struct fw_priv {
|
||||
};
|
||||
|
||||
extern struct mutex fw_lock;
|
||||
extern bool fw_load_abort_all;
|
||||
|
||||
static inline bool __fw_state_check(struct fw_priv *fw_priv,
|
||||
enum fw_status status)
|
||||
|
@ -90,6 +90,7 @@ static inline struct fw_priv *to_fw_priv(struct kref *ref)
|
||||
DEFINE_MUTEX(fw_lock);
|
||||
|
||||
static struct firmware_cache fw_cache;
|
||||
bool fw_load_abort_all;
|
||||
|
||||
/* Builtin firmware support */
|
||||
|
||||
@ -1363,10 +1364,10 @@ static int fw_pm_notify(struct notifier_block *notify_block,
|
||||
case PM_SUSPEND_PREPARE:
|
||||
case PM_RESTORE_PREPARE:
|
||||
/*
|
||||
* kill pending fallback requests with a custom fallback
|
||||
* to avoid stalling suspend.
|
||||
* Here, kill pending fallback requests will only kill
|
||||
* non-uevent firmware request to avoid stalling suspend.
|
||||
*/
|
||||
kill_pending_fw_fallback_reqs(true);
|
||||
kill_pending_fw_fallback_reqs(false);
|
||||
device_cache_fw_images();
|
||||
break;
|
||||
|
||||
@ -1452,7 +1453,7 @@ static int fw_shutdown_notify(struct notifier_block *unused1,
|
||||
* Kill all pending fallback requests to avoid both stalling shutdown,
|
||||
* and avoid a deadlock with the usermode_lock.
|
||||
*/
|
||||
kill_pending_fw_fallback_reqs(false);
|
||||
kill_pending_fw_fallback_reqs(true);
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user