diff options
author | Dave Gerlach <d-gerlach@ti.com> | 2016-05-25 23:41:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-20 19:09:20 +0300 |
commit | 3633bd8220a778e41de3e75930aa21f8a51a1629 (patch) | |
tree | 310d66bed2eb3eeab644a0a9f997304160e9e7c7 /block/blk-mq.c | |
parent | 54c4ddcbab7396c58e1fc745663417ad7e872137 (diff) | |
download | linux-3633bd8220a778e41de3e75930aa21f8a51a1629.tar.xz |
remoteproc: Fix potential race condition in rproc_add
commit d2e12e66a939c54ed84e5f1b6947f0c45f6c56eb upstream.
rproc_add adds the newly created remoteproc to a list for use by
rproc_get_by_phandle and then does some additional processing to finish
adding the remoteproc. This leaves a small window of time in which the
rproc is available in the list but not yet fully initialized, so if
another driver comes along and gets a handle to the rproc, it will be
invalid. Rearrange the code in rproc_add to make sure the rproc is added
to the list only after it has been successfuly initialized.
Fixes: fec47d863587 ("remoteproc: introduce rproc_get_by_phandle API")
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-mq.c')
0 files changed, 0 insertions, 0 deletions