linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
Cc: yong w <yongw.pur@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, nico@fluxnic.net,
	wang.yong12@zte.com.cn
Subject: Re: Re: [BUG] ramfs system panic when using dd to create files
Date: Wed, 14 Jul 2021 16:36:47 +0200	[thread overview]
Message-ID: <YO72fy49hqaqDtME@dhcp22.suse.cz> (raw)
In-Reply-To: <7074179d.c3fd.17aa3f148cc.Coremail.wuzhouhui14@mails.ucas.ac.cn>

On Wed 14-07-21 15:35:36, wuzhouhui wrote:
> &gt; -----Original Messages-----
> &gt; From: "yong w" <yongw.pur@gmail.com>
> &gt; Sent Time: 2021-07-14 08:24:23 (Wednesday)
> &gt; To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, nico@fluxnic.net, wang.yong12@zte.com.cn
> &gt; Cc: 
> &gt; Subject: Re: [BUG] ramfs system panic when using dd to create files
> &gt; 
> &gt; Hello, is there any solution, or how to avoid this problem when using ramfs?
> 
> Limit max size of ramfs.
> 
> &gt; 
> &gt; yong w <yongw.pur@gmail.com> 于2021年7月7日周三 下午5:58写道:
> &gt; &gt;
> &gt; &gt; When I  use dd to create files multiple times under the ramfs file
> &gt; &gt; system,Panic appears, indicating that there is no process to kill.
> &gt; &gt; I learn that ramfs will automatically grow space due to data writing,
> &gt; &gt; causing all the system memory to run out,  but i think it shouldn't
> &gt; &gt; cause the system to panic.
> 
> The comments already explains why kernel should panic on this situation:
>             /*
>              * If we got here due to an actual allocation at the
>              * system level, we cannot survive this and will enter
>              * an endless loop in the allocator. Bail out now.
>              */

That is the oom side of the things. And that is way too late to do
anything more reasonable. It is suspicious that the ramfs can consume
arbitrary amount of memory. I would be looking there.

-- 
Michal Hocko
SUSE Labs


      parent reply	other threads:[~2021-07-14 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  9:58 yong w
2021-07-14  0:24 ` yong w
2021-07-14  7:35   ` wuzhouhui
2021-07-14 14:30     ` yong w
2021-07-15 11:44       ` Mel Gorman
2021-07-14 14:36     ` Michal Hocko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YO72fy49hqaqDtME@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nico@fluxnic.net \
    --cc=wang.yong12@zte.com.cn \
    --cc=wuzhouhui14@mails.ucas.ac.cn \
    --cc=yongw.pur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox