Kernel crash while insmod my driver

hi i was using jetson nano devkit B00 for my driver development (jp4.6) and while rmmod and modprobe my module that cause the kernel crash please refer the image

how to resolve the issue ? but the once reboot the driver works fine. again kernal crash if i rmmod and insmod my driver.

hello herethehacker97,

did you remove the module while camera in used?

besides,
since the latest JP-4 release version is JetPack 4.6.5.
may I double confirm the Jetpack release version you’re working with.
you may check release tag for confirmation, i.e. $ cat /etc/nv_tegra_release

The issue is during the rmmod and insmod the ko and we didn’t remove the camera module

we have confirmed the jetpack version is(4.6)

R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t210ref, EABI: aarch64, DATE: Mon Jul 26 19:20:30 UTC 2021

hello herethehacker97,

do you have complete logs.
the screenshot should be kernel panic reported while modprobe, right?

anyways,
is it possible for moving forward to the latest release version for verification.

yes the kernel crash is during modprobe .
the complete log for the kernel crash

Our requirement is for 4.6 .so can i get the some solution on this issues.

hello herethehacker97,

it looks device still register as a video node, although kernel panic reports, is it correct?
for instance,
[ 3060.012776] vi 54080000.vi: subdev eimx462 8-0042 bound
[ 3060.018677] eimx462 8-0042: Detected IMX462 sensor

this seems like a culprit, [ 3059.965171] eimx462 8-0042: mclk not in DT.
since the kernel panic reported by calling camera_common_mclk_enable
could you please try below to identify the issue.

diff --git a/drivers/media/platform/tegra/camera/camera_common.c 
@@ -849,6 +849,8 @@ 
 int camera_common_mclk_enable(struct camera_common_data *s_data)
 {
        int err;
+       return 0;

Hi @JerryChang i have tried the above changes in the camera_common.c still the issue there.

the changes i made are
int camera_common_mclk_enable(struct camera_common_data *s_data)
{
int err;
struct camera_common_power_rail *pw = s_data->power;
unsigned long mclk_init_rate = s_data->def_clk_freq;

return 0;


if (!pw) {
	dev_err(s_data->dev, "%s: no device power rail\n",
		__func__);
	return -ENODEV;
}

dev_dbg(s_data->dev, "%s: enable MCLK with %lu Hz\n",
	__func__, mclk_init_rate);

err = clk_set_rate(pw->mclk, mclk_init_rate);
if (!err)
	err = clk_prepare_enable(pw->mclk);

return err;

}

may I confirm this as well,

yes kernel panic and video node is registered

so, it’s the issue within the sensor driver, please contact with sensor vendor for root cause.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.