Thread (24 messages) 24 messages, 2 authors, 2020-10-19

RE: [RFC v2 02/18] blkcg: Added a app identifier support for blkcg

From: Muneendra Kumar M <hidden>
Date: 2020-10-19 15:21:03
Also in: linux-nvme, linux-scsi

Hi Tejun,
Thanks for the input.
I will add it my next version.

Regards,
Muneendra.

-----Original Message-----
From: Tejun Heo [mailto:htejun@gmail.com] On Behalf Of Tejun Heo
Sent: Monday, October 19, 2020 8:50 PM
To: Muneendra Kumar M <redacted>
Cc: linux-block@vger.kernel.org; linux-scsi@vger.kernel.org;
linux-nvme@lists.infradead.org; jsmart2021@gmail.com; emilne@redhat.com;
mkumar@redhat.com; pbonzini@redhat.com
Subject: Re: [RFC v2 02/18] blkcg: Added a app identifier support for
blkcg

On Mon, Oct 19, 2020 at 08:43:05PM +0530, Muneendra Kumar M wrote:
Hi Tejun,
Thanks for the input.
quoted
quoted
+     cgrp = cgroup_get_from_kernfs_id(id);
+     if (!cgrp)
+             return -ENOENT;
+
+     css = cgroup_get_e_css(cgrp, &io_cgrp_subsys);
+     if (!css)
+             return -ENOENT;
+
+     blkcg = css_to_blkcg(css);
+     if (!blkcg)
+             return -ENOENT;
+		return -EINVAL;
+	strlcpy(blkcg->app_id, buf, len);
quoted
Shouldn't the cgrp and css be put before exit?
[Muneendra]Correct me if iam wrong.
You mean to add cgroup_put(cgrp) and css_put(css) before exit ?
Yeah, as-is it'd leak references each time the function is called.

Thanks.

-- 
tejun

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help