mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Daniel Walker <dwalker@mvista.com>, Ingo Molnar <mingo@elte.hu>,
	Richard Knutsson <ricknu-0@student.ltu.se>,
	Andi Kleen <andi@firstfloor.org>,
	Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 4/4] kmemcheck v4
Date: Thu, 14 Feb 2008 22:12:20 +0200	[thread overview]
Message-ID: <47B4A0A4.90404@cs.helsinki.fi> (raw)
In-Reply-To: <47B49E71.4040900@gmail.com>

Hi,

Vegard Nossum wrote:
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 412672a..7bdb37f 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -1294,7 +1294,11 @@ static inline void __skb_queue_purge(struct 
> sk_buff_head *list)
>  static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
>                            gfp_t gfp_mask)
>  {
> -    struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
> +    struct sk_buff *skb;
> +#ifdef CONFIG_KMEMCHECK
> +    gfp_mask |= __GFP_ZERO;
> +#endif

Use __GFP_NOTRACK here (no need to wrap it in CONFIG_KMEMCHECK either).

> +    skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
>      if (likely(skb))
>          skb_reserve(skb, NET_SKB_PAD);
>      return skb;

> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index f865731..87b1b0f 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -201,9 +201,13 @@ static int __init do_mount_root(char *name, char 
> *fs, int flags, void *data)
>      return 0;
>  }
> 
> +#if PAGE_SIZE < PATH_MAX
> +# error increase the fs_names allocation size here
> +#endif
> +
>  void __init mount_block_root(char *name, int flags)
>  {
> -    char *fs_names = __getname();
> +    char *fs_names = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 1);
>      char *p;
>  #ifdef CONFIG_BLOCK
>      char b[BDEVNAME_SIZE];
> @@ -251,7 +255,7 @@ retry:
>  #endif
>      panic("VFS: Unable to mount root fs on %s", b);
>  out:
> -    putname(fs_names);
> +    free_pages((unsigned long)fs_names, 1);

As discussed before, I don't think kmemcheck should be complaining about 
this (even though this is a potential bug). Have you tried with the 
current patches to see if it still triggers? Could have been one of the 
kmemcheck bugs, no?

> @@ -255,6 +258,9 @@ struct sk_buff *__netdev_alloc_skb(struct net_device 
> *dev,
>      int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
>      struct sk_buff *skb;
> 
> +#ifdef CONFIG_KMEMCHECK
> +    gfp_mask |= __GFP_ZERO;
> +#endif

__GFP_NOTRACK here

			Pekka

  reply	other threads:[~2008-02-14 20:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14 19:59 [PATCH 1/4] " Vegard Nossum
2008-02-14 20:01 ` [PATCH 2/4] " Vegard Nossum
2008-02-14 20:02 ` [PATCH 3/4] " Vegard Nossum
2008-02-14 20:18   ` Pekka Enberg
2008-02-14 20:02 ` [PATCH 4/4] " Vegard Nossum
2008-02-14 20:12   ` Pekka Enberg [this message]
2008-02-14 20:31     ` Vegard Nossum
2008-02-14 21:49   ` Andi Kleen
2008-02-15 19:18     ` Vegard Nossum
2008-02-14 20:45 ` [PATCH 1/4] " Pekka Enberg
2008-02-14 21:05 ` Randy Dunlap

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=47B4A0A4.90404@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=andi@firstfloor.org \
    --cc=clameter@sgi.com \
    --cc=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ricknu-0@student.ltu.se \
    --cc=vegard.nossum@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

Powered by JetHome