On Mon, 21 Feb 2011, Li Zefan wrote:
Unfortunately, as I looked into the code again I found cpuset_change_nodemask()
is called by other functions that use the global cpuset_mems, so I
think we'd better check the refcnt of cpuset_mems.
How about this:
[PATCH 3/4] cpuset: Fix unchecked calls to NODEMASK_ALLOC()
Those functions that use NODEMASK_ALLOC() can't propogate errno
to users, so might fail silently.
Based on the fact that all of them are called with cgroup_mutex
held, we fix this by using a global nodemask.
If all of the functions that require a nodemask are protected by
cgroup_mutex, then I think it would be much better to just statically
allocate them within the function and avoid any nodemask in file scope.
cpuset_mems cannot be shared so introducing it with a refcount would
probably just be confusing.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>