Messages in this thread | | | From | Stephen Boyd <> | Date | Mon, 10 Jan 2022 13:09:52 -0800 | Subject | Re: [PATCH v6 2/2] rpmsg: char: Fix race between the release of rpmsg_eptdev and cdev |
| |
Quoting Matthias Kaehlcke (2022-01-10 10:47:37) > struct rpmsg_eptdev contains a struct cdev. The current code frees > the rpmsg_eptdev struct in rpmsg_eptdev_destroy(), but the cdev is > a managed object, therefore its release is not predictable and the > rpmsg_eptdev could be freed before the cdev is entirely released. > > The cdev_device_add/del() API was created to address this issue > (see commit 233ed09d7fda), use it instead of cdev add/del(). > > Fixes: c0cdc19f84a4 ("rpmsg: Driver for user space endpoint interface") > Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> > ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
| |