mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
media: ipu-bridge: Keep the clock-noncontinuous property name out of rodata
The software nodes ipu-bridge registers on a successful init are never
unregistered. There is no module_exit and no remove hook, and every
software_node_unregister_node_group() call sits on an error unwind label
inside ipu_bridge_init(), so on success the nodes stay registered and
readable after the module is unloaded, which a later rebind relies on.
Nothing reachable from a registered node may therefore point into the
module image. PROPERTY_ENTRY_BOOL() stores a pointer to its name, so the
"clock-noncontinuous" string literal leaves the surviving node carrying a
dangling property name once ipu-bridge is gone.
Add the name to struct ipu_property_names, which is copied by value into
each struct ipu_sensor, and use that copy, as every other endpoint
property name already does.
Fixes: 8e3def7bf4 ("media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6")
Reported-by: D. Manresa <dmanresa@gmail.com>
Closes: https://lore.kernel.org/linux-media/20260905211307.542810-1-dmanresa@gmail.com/
Signed-off-by: Fernando Rimoli <fernandorimoli11@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
This commit is contained in:
parent
d38c344454
commit
a20c843c9b
|
|
@ -258,6 +258,7 @@ static const struct ipu_property_names prop_names = {
|
|||
.data_lanes = "data-lanes",
|
||||
.remote_endpoint = "remote-endpoint",
|
||||
.link_frequencies = "link-frequencies",
|
||||
.clock_noncontinuous = "clock-noncontinuous",
|
||||
};
|
||||
|
||||
static const char * const ipu_vcm_types[] = {
|
||||
|
|
@ -612,7 +613,7 @@ static void ipu_bridge_create_fwnode_properties(
|
|||
|
||||
if (cfg->flags & IPU_BR_FL_CSI2_CLK_NONCONTINUOUS)
|
||||
sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_CLOCK_NONCONTINUOUS)] =
|
||||
PROPERTY_ENTRY_BOOL("clock-noncontinuous");
|
||||
PROPERTY_ENTRY_BOOL(names->clock_noncontinuous);
|
||||
|
||||
sensor->ipu_properties[0] = PROPERTY_ENTRY_U32_ARRAY_LEN(
|
||||
sensor->prop_names.data_lanes,
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ struct ipu_property_names {
|
|||
char data_lanes[11];
|
||||
char remote_endpoint[16];
|
||||
char link_frequencies[17];
|
||||
char clock_noncontinuous[20];
|
||||
};
|
||||
|
||||
struct ipu_node_names {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user