* [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova()
@ 2016-01-04 13:10 Dan Carpenter
2016-01-04 13:48 ` SF Markus Elfring
2016-01-04 13:54 ` Russell King - ARM Linux
0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2016-01-04 13:10 UTC (permalink / raw)
To: Lucas Stach; +Cc: Russell King, kernel-janitors, dri-devel
We have to drop a lock before returning -ENOMEM here.
Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 8d6f859..9f77c3b 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -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;
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() 2016-01-04 13:10 [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() Dan Carpenter @ 2016-01-04 13:48 ` SF Markus Elfring 2016-01-04 13:54 ` Russell King - ARM Linux 1 sibling, 0 replies; 5+ messages in thread From: SF Markus Elfring @ 2016-01-04 13:48 UTC (permalink / raw) To: Dan Carpenter, Lucas Stach; +Cc: Russell King, kernel-janitors, dri-devel > We have to drop a lock before returning -ENOMEM here. > > Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver') > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c > index 8d6f859..9f77c3b 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c > @@ -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; 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() 2016-01-04 13:10 [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() Dan Carpenter 2016-01-04 13:48 ` SF Markus Elfring @ 2016-01-04 13:54 ` Russell King - ARM Linux 2016-01-04 14:13 ` Lucas Stach 1 sibling, 1 reply; 5+ messages in thread From: Russell King - ARM Linux @ 2016-01-04 13:54 UTC (permalink / raw) To: Dan Carpenter, Lucas Stach Cc: Christian Gmeiner, David Airlie, dri-devel, kernel-janitors On Mon, Jan 04, 2016 at 04:10:24PM +0300, Dan Carpenter wrote: > We have to drop a lock before returning -ENOMEM here. > > Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver') > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diffstat missing? In any case, the patch is correct, thanks. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Lucas, I guess you'll be picking this patch up, or shall we ask David to take it directly? -- 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() 2016-01-04 13:54 ` Russell King - ARM Linux @ 2016-01-04 14:13 ` Lucas Stach 2016-01-04 14:34 ` Russell King - ARM Linux 0 siblings, 1 reply; 5+ messages in thread From: Lucas Stach @ 2016-01-04 14:13 UTC (permalink / raw) To: Russell King - ARM Linux, Dan Carpenter; +Cc: kernel-janitors, dri-devel Am Montag, den 04.01.2016, 13:54 +0000 schrieb Russell King - ARM Linux: > On Mon, Jan 04, 2016 at 04:10:24PM +0300, Dan Carpenter wrote: > > We have to drop a lock before returning -ENOMEM here. > > > > Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver') > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diffstat missing? > > In any case, the patch is correct, thanks. > > Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> > > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() 2016-01-04 14:13 ` Lucas Stach @ 2016-01-04 14:34 ` Russell King - ARM Linux 0 siblings, 0 replies; 5+ messages in thread From: Russell King - ARM Linux @ 2016-01-04 14:34 UTC (permalink / raw) To: Lucas Stach; +Cc: Dan Carpenter, kernel-janitors, dri-devel On Mon, Jan 04, 2016 at 03:13:22PM +0100, Lucas Stach wrote: > Am Montag, den 04.01.2016, 13:54 +0000 schrieb Russell King - ARM > Linux: > > On Mon, Jan 04, 2016 at 04:10:24PM +0300, Dan Carpenter wrote: > > > We have to drop a lock before returning -ENOMEM here. > > > > > > Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver') > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > diffstat missing? > > > > In any case, the patch is correct, thanks. > > > > Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> > > > > 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. 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. -- 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-04 14:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-04 13:10 [patch] drm/etnaviv: unlock on error in etnaviv_gem_get_iova() Dan Carpenter 2016-01-04 13:48 ` SF Markus Elfring 2016-01-04 13:54 ` Russell King - ARM Linux 2016-01-04 14:13 ` Lucas Stach 2016-01-04 14:34 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox