[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100615005619.GI6666@thunk.org>
Date: Mon, 14 Jun 2010 20:56:19 -0400
From: tytso@....edu
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Salman <sqazi@...gle.com>, mingo@...e.hu,
linux-kernel@...r.kernel.org, peterz@...radead.org,
tytso@...gle.com, torvalds@...ux-foundation.org, walken@...gle.com,
Chen Liqin <liqin.chen@...plusct.com>,
Lennox Wu <lennox.wu@...il.com>
Subject: Re: [PATCH] Fix a race in pid generation that causes pids to be
reused immediately.
On Mon, Jun 14, 2010 at 04:58:51PM -0700, Andrew Morton wrote:
> Using
>
> grep -r '[ ]cmpxchg[^_]' . | grep -v /arch/
>
> I can't see any cmpxchg() callers in truly generic code. lockdep and
> kernel/trace/ring_buffer.c aren't used on the more remote
> architectures, I think.
What about:
drivers/gpu/drm/drm_lock.c: prev = cmpxchg(lock, old, new);
kernel/lockdep.c: n = cmpxchg(&nr_chain_hlocks, cn, cn + chain->de
kernel/sched_clock.c: if (cmpxchg64(&scd->clock, old_clock, clock) != old_cloc
fs/btrfs/inode.c: if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN_CLEAN
fs/ext4/inode.c: } while (cmpxchg(&ei->i_flags, old_fl, new_fl) != old_fl
The last is quite new --- I had just recently done a similar set of
research as you did before accepting the patch that added cmpxchg into
ext4 (during the last merge window), and I thought cmpxchg() had
entered the "supported by all architectures" category. It looked like
it had only recently reached state, but I had reached the conclusion
that it was safe to use.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists