Re: [PATCH] btrfs: Avoid BUG_ON()s because of ENOMEM caused by kmalloc() failure

2016-02-17 Thread Satoru Takeuchi
On 2016/02/18 0:11, David Sterba wrote: On Wed, Feb 17, 2016 at 02:54:23PM +0900, Satoru Takeuchi wrote: On 2016/02/16 2:53, David Sterba wrote: On Mon, Feb 15, 2016 at 02:38:09PM +0900, Satoru Takeuchi wrote: There are some BUG_ON()'s after kmalloc() as follows. = foo = kmalloc();

Re: [PATCH] btrfs: Avoid BUG_ON()s because of ENOMEM caused by kmalloc() failure

2016-02-17 Thread David Sterba
On Wed, Feb 17, 2016 at 02:54:23PM +0900, Satoru Takeuchi wrote: > On 2016/02/16 2:53, David Sterba wrote: > > On Mon, Feb 15, 2016 at 02:38:09PM +0900, Satoru Takeuchi wrote: > >> There are some BUG_ON()'s after kmalloc() as follows. > >> > >> = > >> foo = kmalloc(); > >> BUG_ON(!foo);

Re: [PATCH] btrfs: Avoid BUG_ON()s because of ENOMEM caused by kmalloc() failure

2016-02-16 Thread Satoru Takeuchi
On 2016/02/16 2:53, David Sterba wrote: On Mon, Feb 15, 2016 at 02:38:09PM +0900, Satoru Takeuchi wrote: There are some BUG_ON()'s after kmalloc() as follows. = foo = kmalloc(); BUG_ON(!foo); /* -ENOMEM case */ = A Docker + memory cgroup user hit these BUG_ON()s.

Re: [PATCH] btrfs: Avoid BUG_ON()s because of ENOMEM caused by kmalloc() failure

2016-02-15 Thread David Sterba
On Mon, Feb 15, 2016 at 02:38:09PM +0900, Satoru Takeuchi wrote: > There are some BUG_ON()'s after kmalloc() as follows. > > = > foo = kmalloc(); > BUG_ON(!foo); /* -ENOMEM case */ > = > > A Docker + memory cgroup user hit these BUG_ON()s. > >

[PATCH] btrfs: Avoid BUG_ON()s because of ENOMEM caused by kmalloc() failure

2016-02-14 Thread Satoru Takeuchi
There are some BUG_ON()'s after kmalloc() as follows. = foo = kmalloc(); BUG_ON(!foo); /* -ENOMEM case */ = A Docker + memory cgroup user hit these BUG_ON()s. https://bugzilla.kernel.org/show_bug.cgi?id=112101 Since it's very hard to handle these ENOMEMs properly, preventing these