Skip to content

Commit

Permalink
modules: do not depend on kconfig to set 'modules' option to symbol M…
Browse files Browse the repository at this point in the history
…ODULES

Currently, the MODULES symbol is special-cased in different places in the
kconfig language. For example, if no symbol is defined to enable tristates,
then kconfig looks up for a symbol named 'MODULES', and forces the 'modules'
option onto that symbol.

This causes problems as such:
  - since MODULES is special-cased, reading the configuration with
    KCONFIG_ALLCONFIG set will forcibly set MODULES to be 'valid' (ie.
    it has a valid value), when no such value was previously set. So
    MODULES defaults to 'n' unless it is present in KCONFIG_ALLCONFIG
  - other third-party projects may decide that 'MODULES' plays a different
    role for them

This has been exposed by cset #cfa98f2e:
    kconfig: do not override symbols already set
and reported by Stephen in:
    http://marc.info/?l=linux-next&m=137592137915234&w=2

As suggested by Sam, we explicitly define the MODULES symbol to be the
tristate-enabler. This will allow us to drop special-casing of MODULES
in the kconfig language, later.

(Note: this patch is not a fix to Stephen's issue, just a first step).

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: [email protected]
Cc: Stephen Rothwell <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: [email protected]
Cc: Theodore Ts'o <[email protected]>
  • Loading branch information
yann-morin-1998 committed Aug 15, 2013
1 parent 04b19b7 commit 11097a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1666,6 +1666,7 @@ config BASE_SMALL

menuconfig MODULES
bool "Enable loadable module support"
option modules
help
Kernel modules are small pieces of compiled code which can
be inserted in the running kernel, rather than being
Expand Down

0 comments on commit 11097a0

Please sign in to comment.