lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 May 2010 23:09:48 +0200 (CEST)
From:	Julia Lawall <>
To:	Eric Dumazet <>
Cc:	"David S. Miller" <>,
	Alexey Kuznetsov <>,
	"Pekka Savola (ipv6)" <>,
	James Morris <>,
	Hideaki YOSHIFUJI <>,
	Patrick McHardy <>,,,
Subject: Re: Subject: [PATCH] net/ipv6: Use GFP_ATOMIC when a lock is held

On Sun, 30 May 2010, Eric Dumazet wrote:

> Le dimanche 30 mai 2010 à 22:50 +0200, Julia Lawall a écrit :
> > I think the proposed patch does not work, because the for loop overwrites 
> > p.  That use of p looks like it is completely local to the for loop, so 
> > perhaps a new variable p1 could be added to be used there?
> Please do so.
> I just wanted to tell you changing GFP_KERNEL to GFP_ATOMIC is not an
> appropriate way to solve this kind of problems. My patch was to get an
> idea, not a full and tested patch :)

Looking at it again, there is still a problem, because in the original 
code, the loop:

        for (p = t->prl; p; p = p->next) {
                if (p->addr == a->addr) {
                        if (chg) {
                                p->flags = a->flags;
                                goto out;
                        err = -EEXIST;
                        goto out;

could exit with success without the kzalloc ever being called.  If the 
kzalloc is moved up, it could fail and then it returns immediately without 
executing the loop.  A solution could be to leave the NULL test on p where 
it is, and only move up the kzalloc.  Or perhaps the change in behavior 
doesn't matter?


Powered by blists - more mailing lists