lkml.org 
[lkml]   [2006]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch 2/8] use hlist_move_head()
On Monday April 10, akpm@osdl.org wrote:
> Akinobu Mita <mita@miraclelinux.com> wrote:
> >
> > This patch converts the combination of hlist_del(A) and hlist_add_head(A, B)
> > to hlist_move_head(A, B).
> >
> > ...
> >
> > --- 2.6-git.orig/fs/nfsd/nfscache.c
> > +++ 2.6-git/fs/nfsd/nfscache.c
> > @@ -113,8 +113,7 @@ lru_put_end(struct svc_cacherep *rp)
> > static void
> > hash_refile(struct svc_cacherep *rp)
> > {
> > - hlist_del_init(&rp->c_hash);
> > - hlist_add_head(&rp->c_hash, hash_list + REQHASH(rp->c_xid));
> > + hlist_move_head(&rp->c_hash, hash_list + REQHASH(rp->c_xid));
> > }
>
> Just got an oops here.

Hmmm:
static inline void hlist_del_init(struct hlist_node *n)
{
if (n->pprev) {
__hlist_del(n);
INIT_HLIST_NODE(n);
}
}
.....

static inline void hlist_move_head(struct hlist_node *n, struct hlist_head *h)
{
__hlist_del(n);
hlist_add_head(n, h);
}

I guess n->pprev was NULL

NeilBrown

>
> BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
^^^^^^^^
Yep!

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-10 11:56    [W:0.117 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site