Prev: [PATCH] Staging: comedi: fix space before tabs coding style issue in adl_pci6208.c
Next: [PATCH] Driver core: don't initialize wakeup flags
From: David Rientjes on 8 Mar 2010 16:30 On Mon, 8 Mar 2010, Miao Xie wrote: > Changes from V1 to V2: > - None > Both this and patch 2/4 are already in -mm, so please rebase this series on mmotm-2010-03-04-18-05. > @@ -1381,39 +1394,46 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cont, > struct cgroup *oldcont, struct task_struct *tsk, > bool threadgroup) > { > - nodemask_t from, to; > struct mm_struct *mm; > struct cpuset *cs = cgroup_cs(cont); > struct cpuset *oldcs = cgroup_cs(oldcont); > + NODEMASK_ALLOC(nodemask_t, from, GFP_KERNEL); > + NODEMASK_ALLOC(nodemask_t, to, GFP_KERNEL); > + > + if (from == NULL || to == NULL) > + return; > You're potentially leaking one of the allocated nodemasks there if the other is -ENOMEM. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Miao Xie on 8 Mar 2010 20:30
on 2010-3-9 5:27, David Rientjes wrote: > On Mon, 8 Mar 2010, Miao Xie wrote: > >> Changes from V1 to V2: >> - None >> > > Both this and patch 2/4 are already in -mm, so please rebase this series > on mmotm-2010-03-04-18-05. ok, I'll do it. > >> @@ -1381,39 +1394,46 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cont, >> struct cgroup *oldcont, struct task_struct *tsk, >> bool threadgroup) >> { >> - nodemask_t from, to; >> struct mm_struct *mm; >> struct cpuset *cs = cgroup_cs(cont); >> struct cpuset *oldcs = cgroup_cs(oldcont); >> + NODEMASK_ALLOC(nodemask_t, from, GFP_KERNEL); >> + NODEMASK_ALLOC(nodemask_t, to, GFP_KERNEL); >> + >> + if (from == NULL || to == NULL) >> + return; >> > > You're potentially leaking one of the allocated nodemasks there if the > other is -ENOMEM. Sorry for my mistake. I'll fix it in the next version. Thanks! Miao > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |