drm/etnaviv: unlock on error in etnaviv_gem_get_iova()
Subsystems (3)
PATCH 1/1 drm/etnaviv: unlock on error in etnaviv_gem_get_iova()
We have to drop a lock before returning -ENOMEM here.
drivers/gpu/drm/etnaviv/etnaviv_gem.c +4 -2
@@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu, mapping =etnaviv_gem_get_vram_mapping (etnaviv_obj,NULL );if (!mapping) { mapping =kzalloc (sizeof (*mapping),GFP_KERNEL ); -if (!mapping) -return -ENOMEM ; +if (!mapping) { + ret = -ENOMEM ; + goto out; + }INIT_LIST_HEAD (&mapping->scan_node); mapping->object = etnaviv_obj;
Quoted 12 lines
We have to drop a lock before returning
-ENOMEMhere.Fixes a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver')Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/etnaviv/etnaviv_gem.c +0
-0@@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu, mapping =etnaviv_gem_get_vram_mapping (etnaviv_obj,NULL );if (!mapping) {
drivers/gpu/drm/etnaviv/etnaviv_gem.c int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu, · line 314
Quoted 10 lines
drivers/gpu/drm/etnaviv/etnaviv_gem.c +4
-2mapping =kzalloc (sizeof (*mapping),GFP_KERNEL ); -if (!mapping) -return -ENOMEM ; +if (!mapping) { + ret = -ENOMEM ; + goto out; + }INIT_LIST_HEAD (&mapping->scan_node); mapping->object = etnaviv_obj;
How do you think about to reuse the jump label "unlock" there like it is used in other source files?
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/etnaviv/etnaviv_gem.c?id¨c21a5451d831e67b7a6fb910f9ca8bc7b43554#n263
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Dan Carpenter
We have to drop a lock before returning
-ENOMEMhere.Fixes a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver')Signed-off-by Dan Carpenter <[email protected]>
diffstat missing?
In any case, the patch is correct, thanks.
Lucas,
I guess you'll be picking this patch up, or shall we ask David to take it directly?
Signature · 3 lines
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
Am Montag, den 04.01.2016, 13:54 +0000 schrieb Russell King - ARM Linux:
Quoted 10 lines · Dan Carpenter
Quoted 4 lines
We have to drop a lock before returning
-ENOMEMhere.Fixes a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver')Signed-off-by Dan Carpenter <[email protected]>diffstat missing?
In any case, the patch is correct, thanks.
Quoted 8 lines
Acked-by Russell King <[email protected]>Lucas,
I guess you'll be picking this patch up, or shall we ask David to take
it directly?
I'm still on vacation until Wednesday, but after this I'll start to sort through the outstanding etnaviv requests that need attention. I'll pick up this patch along with some other things that I need to send out for review and will issue a pull to Dave then.
Regards,
Lucas
Quoted 16 lines · Lucas Stach
Am Montag, den 04.01.2016, 13:54 +0000 schrieb Russell King - ARM Linux:
Quoted 14 lines · Dan Carpenter
Quoted 4 lines
We have to drop a lock before returning
-ENOMEMhere.Fixes a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver')Signed-off-by Dan Carpenter <[email protected]>diffstat missing?
In any case, the patch is correct, thanks.
Acked-by Russell King <[email protected]>Lucas,
Quoted 8 lines
Quoted 4 lines
I guess you'll be picking this patch up, or shall we ask David to take
it directly?I'm still on vacation until Wednesday, but after this I'll start to sort through the outstanding etnaviv requests that need attention. I'll pick up this patch along with some other things that I need to send out for review and will issue a pull to Dave then.
I'm not aware of any other changes which are outstanding for etnaviv. If we're supposed to be working together, would you mind sharing them with the other etnaviv authors?
Note that the merge window is probably opening next Sunday, and that's really tight to get development into maintainers trees, especially as the final -next prior to the merge window will involve pulling trees around midnight (GMT) on Thursday.
I also have a pile of patches, but they're development stuff, which I'm holding off until we get etnaviv merged into mainline - I'd suggest treating everything that same way at this point, and only ask David to merge changes which are fixes - exactly like this one.
Signature · 3 lines
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.