[PATCH 2/7] genalloc: selftest

From
Igor Stoppa <hidden>
Date
2018-02-26 18:00:26
Also in
linux-mm, lkml
Reply to
J Freyensee, 2018-02-26

On 26/02/18 19:46, J Freyensee wrote:

On 2/26/18 4:11 AM, Igor Stoppa wrote:
quoted
On 24/02/18 00:42, J Freyensee wrote:
quoted
quoted
+	locations[action->location] = gen_pool_alloc(pool, action->size);
+	BUG_ON(!locations[action->location]);
Again, I'd think it through if you really want to use BUG_ON() or not:

https://lwn.net/Articles/13183/
https://lkml.org/lkml/2016/10/4/1
Is it acceptable to display only a WARNing, in case of risking damaging
a mounted filesystem?
That's a good question.? Based upon those articles, 'yes'.? But it seems 
like a 'darned-if-you-do, darned-if-you-don't' question as couldn't you 
also corrupt a mounted filesystem by crashing the kernel, yes/no?
The idea is to do it very early in the boot phase, before early init,
when the kernel has not gotten even close to any storage device.
If you really want a system crash, maybe just do a panic() like 
filesystems also use?
ok, if that's a more acceptable way to halt the kernel, I do not mind.

--
igor
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (32 messages) 32 messages, 4 authors, last reply 2018-03-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help