summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRoy Pledge <Roy.Pledge@freescale.com>2014-03-05 19:57:45 (GMT)
committerJose Rivera <German.Rivera@freescale.com>2014-03-06 04:02:10 (GMT)
commit30abf3c138247ef7780caef4b35a54df19ebc858 (patch)
treea708b720b6d97f8dacffb2fe25e54be78b05a414 /drivers
parente522e216e31ee67b3c7894188d55a201b5e224e7 (diff)
downloadlinux-fsl-qoriq-30abf3c138247ef7780caef4b35a54df19ebc858.tar.xz
Only initalize fragment owner when fragement is first created
When a USDPAA memory fragment is mapped into a user space process the owner should only be initialized if the fragment has just been created. Failure to do this will cause an error if another process is using the fragment when the mapping is done. Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Change-Id: I0fdeb195f5d1910ec70f6f56d772dd2b8cedab4c Reviewed-on: http://git.am.freescale.net:8181/9427 Reviewed-by: Haiying Wang <Haiying.Wang@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/fsl_qbman/fsl_usdpaa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa.c b/drivers/staging/fsl_qbman/fsl_usdpaa.c
index 5f72120..11b2a8d 100644
--- a/drivers/staging/fsl_qbman/fsl_usdpaa.c
+++ b/drivers/staging/fsl_qbman/fsl_usdpaa.c
@@ -976,7 +976,8 @@ do_map:
strncpy(start_frag->name, i->name, USDPAA_DMA_NAME_MAX);
start_frag->has_locking = i->has_locking;
init_waitqueue_head(&start_frag->wq);
- start_frag->owner = NULL;
+ if (i->did_create == 1)
+ start_frag->owner = NULL;
/* Setup the map entry */
map->root_frag = start_frag;