Giter Club home page Giter Club logo

Comments (4)

 avatar commented on July 17, 2024

@lgirdwood
I added test code like this below in the function sof_route_load()

	sroute->route.source = kstrdup(route->source, GFP_KERNEL);
	if (!sroute->route.source) {
		dev_err(sdev->dev, "==wzg: route soure malloc fail %s\n",sroute->route.source);
		goto err;
	}

	sroute->route.sink = kstrdup(route->sink, GFP_KERNEL);
	if (!sroute->route.sink) {
		dev_err(sdev->dev, "==wzg: route sink malloc fail %s\n",sroute->route.source);
		kfree(sroute->route.source);
		goto err;
	}

	sroute->route.control = kstrdup(route->control, GFP_KERNEL);
	if (!sroute->route.control) {
		dev_err(sdev->dev, "==wzg: route control malloc fail %s\n",sroute->route.source);
		kfree(sroute->route.source);
		kfree(sroute->route.sink);
		goto err;
	}

I got the log: "route control malloc fail .....".
It is strange. I do not know why this would happen.
It seems it failed many times.

from linux.

 avatar commented on July 17, 2024

@lgirdwood
I found the root cause of this PR #80
I will send another fix for this issue.

from linux.

 avatar commented on July 17, 2024

@lgirdwood
The root cause is: the upper function will sometimes set the route->control pointer = NULL.
then in the sof_route_load() function, it will malloc failure. the error will happen. the route is not added
into the list. the IPC error will happen.

from linux.

 avatar commented on July 17, 2024

fixed by the PR #99

from linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.