Re: [PATCH] Detect and warn on atomic_inc/atomic_dec wrapping around

Andrew Morton
2009-05-01T05:09:38Z

On Fri, 1 May 2009 10:27:46 +0530 Nikanth Karthikesan <knikanth@novell.com> wrote:

> I tried with linux/bug.h. But it creates a cyclic dependency. linux/bug.h
> pulls in linux/module.h => linux/spinlock.h => asm/spinlock.h (which uses
> atomic_inc) => asm/atomic.h,.

And why on earth does bug.h need module.h?

int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
struct module *);

The ever-smelly Elf_Ehdr and Elf_Shdr.

Probably the module_bug_finalize/module_bug_cleanup declarations and
definitions should be in module.h.