Kernel Newbies archive on
 help / color / Atom feed
From: Greg KH <>
To: "孙世龙 sunshilong" <>
Cc: "Valdis Klētnieks" <>,
Subject: Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instead of kmalloc()?
Date: Sat, 27 Jun 2020 09:05:03 +0200
Message-ID: <> (raw)
In-Reply-To: <>

On Sat, Jun 27, 2020 at 02:00:50PM +0800, 孙世龙 sunshilong wrote:
> Hi, Greg KH
> Thank you for your patience and your help.
> >What code is causing that failure by asking for memory that you do not
> >have?  Please fix that up, the core kernel should be fine.
> >Then fix your broken driver that is asking for so much memory on a
> >system that does not have it.  Do you have a pointer to your driver
> >anywhere so we can review it?
> >Applications do not allocate kernel memory at all, that's up to a kernel
> >driver.  Userspace does things in totally different ways.
> Not at the driver load time, but the load time of the real-time
> process(i.e. **before the entry of the main() function**).It invokes
> a systemcall which internally invokes kmalloc().  I'd show you the
> related code and the call trace info below.


> Kzalloc() is invoked by xnheap_init() in the xenomai source code(see

Hah, cobalt, that's your problem.

Seriously, that's a crazy architecture, one that turned out not to
really work well compared to what ended up getting merged upstream.

As you are really messing with how Linux works with this add-on, I
strongly suggest you get support from the Xenomai developers as they are
the only ones that can support you.  The Linux kernel community can't,

Best of luck!

greg k-h

Kernelnewbies mailing list

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26  8:30 孙世龙 sunshilong
2020-06-26 14:13 ` Greg KH
2020-06-26 15:36   ` 孙世龙 sunshilong
2020-06-26 17:22     ` Valdis Klētnieks
2020-06-27  5:16       ` 孙世龙 sunshilong
2020-06-27  5:23         ` Greg KH
2020-06-27  6:00           ` 孙世龙 sunshilong
2020-06-27  7:05             ` Greg KH [this message]
2020-06-27  5:05     ` Greg KH

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:

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

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on

Archives are clonable:
	git clone --mirror kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ \
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone