diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-08-21 13:29:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-24 07:57:48 +0200 |
commit | d880f3294d0576e79dfab4e2cd5a2eb62fe188f0 (patch) | |
tree | a36fc7837df60ae8d004524f42c3fd0924c5ee75 /drivers/misc/mei/main.c | |
parent | mei: add me client remove functions (diff) | |
download | linux-d880f3294d0576e79dfab4e2cd5a2eb62fe188f0.tar.xz linux-d880f3294d0576e79dfab4e2cd5a2eb62fe188f0.zip |
mei: add mei_me_cl_by_uuid_id function
When handling dynamic clients there might be a race
scenario in which two me clients with the same me
address would be linked in the me clients list,
therefore we need to search by both uuid and me address.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r-- | drivers/misc/mei/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index a65b7cc4a877..957f44aaa97a 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -321,7 +321,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf, goto out; } - me_cl = mei_me_cl_by_id(dev, cl->me_client_id); + me_cl = mei_me_cl_by_uuid_id(dev, &cl->cl_uuid, cl->me_client_id); if (!me_cl) { rets = -ENOTTY; goto out; @@ -459,6 +459,7 @@ static int mei_ioctl_connect_client(struct file *file, } cl->me_client_id = me_cl->client_id; + cl->cl_uuid = me_cl->props.protocol_name; dev_dbg(&dev->pdev->dev, "Connect to FW Client ID = %d\n", cl->me_client_id); |