mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
It looks element length declared in servreg_loc_pfr_req_ei for reason
not matching servreg_loc_pfr_req's reason field due which we could
observe decoding error on PD crash.
qmi_decode_string_elem: String len 81 >= Max Len 65
Fix this by matching with servreg_loc_pfr_req's reason field.
Fixes: 1ebcde047c ("soc: qcom: add pd-mapper implementation")
Signed-off-by: Mukesh Ojha <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Tested-by: Nikita Travkin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
31 lines
845 B
C
31 lines
845 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __QCOM_PDR_HELPER__
|
|
#define __QCOM_PDR_HELPER__
|
|
|
|
#include <linux/soc/qcom/qmi.h>
|
|
|
|
#define SERVREG_NAME_LENGTH 64
|
|
#define SERVREG_PFR_LENGTH 256
|
|
|
|
struct pdr_service;
|
|
struct pdr_handle;
|
|
|
|
enum servreg_service_state {
|
|
SERVREG_LOCATOR_ERR = 0x1,
|
|
SERVREG_SERVICE_STATE_DOWN = 0x0FFFFFFF,
|
|
SERVREG_SERVICE_STATE_UP = 0x1FFFFFFF,
|
|
SERVREG_SERVICE_STATE_EARLY_DOWN = 0x2FFFFFFF,
|
|
SERVREG_SERVICE_STATE_UNINIT = 0x7FFFFFFF,
|
|
};
|
|
|
|
struct pdr_handle *pdr_handle_alloc(void (*status)(int state,
|
|
char *service_path,
|
|
void *priv), void *priv);
|
|
struct pdr_service *pdr_add_lookup(struct pdr_handle *pdr,
|
|
const char *service_name,
|
|
const char *service_path);
|
|
int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds);
|
|
void pdr_handle_release(struct pdr_handle *pdr);
|
|
|
|
#endif
|