From: "Andi Kleen" <ak@suse.de>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [3/3] {PREFIX:-x86_64}: Remove near all BUGs in mm/mempolicy.c
Date: Sat, 10 Sep 2005 13:58:49 +0200 [thread overview]
Message-ID: <4322CA79.mailAO7119H91@suse.de> (raw)
Remove near all BUGs in mm/mempolicy.c
Most of them can never be triggered and were only for development.
Index: linux-2.6.13-work/mm/mempolicy.c
===================================================================
--- linux-2.6.13-work.orig/mm/mempolicy.c
+++ linux-2.6.13-work/mm/mempolicy.c
@@ -185,7 +185,6 @@ static struct zonelist *bind_zonelist(no
policy_zone = k;
}
}
- BUG_ON(num >= max);
zl->zones[num] = NULL;
return zl;
}
@@ -708,7 +707,6 @@ static unsigned interleave_nodes(struct
struct task_struct *me = current;
nid = me->il_next;
- BUG_ON(nid >= MAX_NUMNODES);
next = next_node(1+nid, policy->v.nodes);
if (next >= MAX_NUMNODES)
next = first_node(policy->v.nodes);
@@ -730,7 +728,6 @@ static unsigned offset_il_node(struct me
nid = next_node(nid+1, pol->v.nodes);
c++;
} while (c <= target);
- BUG_ON(nid >= MAX_NUMNODES);
return nid;
}
@@ -741,7 +738,6 @@ static struct page *alloc_page_interleav
struct zonelist *zl;
struct page *page;
- BUG_ON(!node_online(nid));
zl = NODE_DATA(nid)->node_zonelists + (gfp & GFP_ZONEMASK);
page = __alloc_pages(gfp, order, zl);
if (page && page_zone(page) == zl->zones[0]) {
@@ -784,8 +780,6 @@ alloc_page_vma(unsigned int __nocast gfp
unsigned nid;
if (vma) {
unsigned long off;
- BUG_ON(addr >= vma->vm_end);
- BUG_ON(addr < vma->vm_start);
off = vma->vm_pgoff;
off += (addr - vma->vm_start) >> PAGE_SHIFT;
nid = offset_il_node(pol, vma, off);
reply other threads:[~2005-09-10 11:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4322CA79.mailAO7119H91@suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.