Thread (59 messages) 59 messages, 10 authors, 2012-11-21

Re: mpol_to_str revisited.

From: KOSAKI Motohiro <hidden>
Date: 2012-10-17 01:34:16
Also in: lkml

On Tue, Oct 16, 2012 at 8:12 PM, David Rientjes [off-list ref] wrote:
On Tue, 16 Oct 2012, KOSAKI Motohiro wrote:
quoted
quoted
quoted
Even though 80de7c3138ee9fd86a98696fd2cf7ad89b995d0a itself is simple. It bring
to caller complex. That's not good and have no worth.
Before: the kernel panics, all workloads cease.
After: the file shows garbage, all workloads continue.

This is better, in my opinion, but at best it's only a judgment call and
has no effect on anything.
Kernel panics help to find our serious mistake.
Kernel panics are not your little debugging tool to let users suffer
through for non-fatal issues.
use after free is fatal, no doubt.
quoted
quoted
I agree it would be better to respect the return value of mpol_to_str()
since there are other possible error conditions other than a freed
mempolicy, but let's not consider reverting 80de7c3138.  It is obviously
not a full solution to the problem, though, and we need to serialize with
task_lock().
Sorry no. I will have to revert it.
Feel free to revert anything you wish in your own tree, I couldn't care
less.  If you try to propose it upstream, Andrew will surely ask you to
justify the BUG(), good luck on that.
Yeah.
I'm ok just remove both BUG() and EINVAL, but current situation (i.e. ignoring
EINVAL by caller) is surely bad. So, just revert is best IMHO.

I'll reply to this message with the fix that I think is best.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help