commit d315777b32a4696feb86f2a0c9e9f39c94683649 Merge: 5a05a6d 1765e3a Author: Linus Torvalds Date: Mon Jan 24 19:58:39 2011 +1000 Merge branch 'BUG_ON' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'BUG_ON' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: Remove MAYBE_BUILD_BUG_ON BUILD_BUG_ON: make it handle more cases commit 5a05a6d7a51bcc47c5c6f0ed68e433f9a01afd89 Merge: d20761a 577d6a7 Author: Linus Torvalds Date: Mon Jan 24 19:57:43 2011 +1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: module: fix missing semicolons in MODULE macro usage param: add null statement to compiled-in module params module: fix linker error for MODULE_VERSION when !MODULE and CONFIG_SYSFS=n module: show version information for built-in modules in sysfs commit d20761a7995773dfae4a54fdd26a7857b861adb5 Merge: ff5fdb6 3ac285f Author: Linus Torvalds Date: Mon Jan 24 19:56:47 2011 +1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: selinux: return -ENOMEM when memory allocation fails tpm: fix panic caused by "tpm: Autodetect itpm devices" TPM: Long default timeout fix trusted keys: Fix a memory leak in trusted_update(). keys: add trusted and encrypted maintainers encrypted-keys: rename encrypted_defined files to encrypted trusted-keys: rename trusted_defined files to trusted commit 1765e3a4933ea0870fabd755feffc5473c4363ce Author: Rusty Russell Date: Mon Jan 24 14:45:10 2011 -0600 Remove MAYBE_BUILD_BUG_ON Now BUILD_BUG_ON() can handle optimizable constants, we don't need MAYBE_BUILD_BUG_ON any more. Signed-off-by: Rusty Russell commit 7ef88ad561457c0346355dfd1f53e503ddfde719 Author: Rusty Russell Date: Mon Jan 24 14:45:10 2011 -0600 BUILD_BUG_ON: make it handle more cases BUILD_BUG_ON used to use the optimizer to do code elimination or fail at link time; it was changed to first the size of a negative array (a nicer compile time error), then (in 8c87df457cb58fe75b9b893007917cf8095660a0) to a bitfield. This forced us to change some non-constant cases to MAYBE_BUILD_BUG_ON(); as Jan points out in that commit, it didn't work as intended anyway. bitfields: needs a literal constant at parse time, and can't be put under "if (__builtin_constant_p(x))" for example. negative array: can handle anything, but if the compiler can't tell it's a constant, silently has no effect. link time: breaks link if the compiler can't determine the value, but the linker output is not usually as informative as a compiler error. If we use the negative-array-size method *and* the link time trick, we get the ability to use BUILD_BUG_ON() under __builtin_constant_p() branches, and maximal ability for the compiler to detect errors at build time. We also document it thoroughly. Signed-off-by: Rusty Russell Cc: Jan Beulich Acked-by: Hollis Blanchard commit 577d6a7c3a0e273e115c65a148b71be6c1950f69 Author: Rusty Russell Date: Mon Jan 24 14:32:52 2011 -0600 module: fix missing semicolons in MODULE macro usage You always needed them when you were a module, but the builtin versions of the macros used to be more lenient. Reported-by: Stephen Rothwell Signed-off-by: Rusty Russell commit b75be4204e7871869b2c268c00783703197aaa7d Author: Linus Walleij Date: Wed Jan 5 13:27:04 2011 +0100 param: add null statement to compiled-in module params Add an unused struct declaration statement requiring a terminating semicolon to the compile-in case to provoke an error if __MODULE_INFO() is used without the terminating semicolon. Previously MODULE_ALIAS("foo") (no semicolon) compiled fine if MODULE was not selected. Cc: Dan Carpenter Signed-off-by: Linus Walleij Signed-off-by: Rusty Russell commit 3b90a5b292321b2acac3921f77046ae195aef53f Author: Rusty Russell Date: Mon Jan 24 14:32:51 2011 -0600 module: fix linker error for MODULE_VERSION when !MODULE and CONFIG_SYSFS=n lib/built-in.o:(__modver+0x8): undefined reference to `__modver_version_show' lib/built-in.o:(__modver+0x2c): undefined reference to `__modver_version_show' Simplest to just not emit anything: if they've disabled SYSFS they probably want the smallest kernel possible. Reported-by: Randy Dunlap Signed-off-by: Rusty Russell commit e94965ed5beb23c6fabf7ed31f625e66d7ff28de Author: Dmitry Torokhov Date: Wed Dec 15 14:00:19 2010 -0800 module: show version information for built-in modules in sysfs Currently only drivers that are built as modules have their versions shown in /sys/module//version, but this information might also be useful for built-in drivers as well. This especially important for drivers that do not define any parameters - such drivers, if built-in, are completely invisible from userspace. This patch changes MODULE_VERSION() macro so that in case when we are compiling built-in module, version information is stored in a separate section. Kernel then uses this data to create 'version' sysfs attribute in the same fashion it creates attributes for module parameters. Signed-off-by: Dmitry Torokhov Signed-off-by: Rusty Russell commit 3ac285ff23cd6e1bc402b6db836521bce006eb89 Author: Davidlohr Bueso Date: Fri Jan 21 12:28:04 2011 -0300 selinux: return -ENOMEM when memory allocation fails Return -ENOMEM when memory allocation fails in cond_init_bool_indexes, correctly propagating error code to caller. Signed-off-by: Davidlohr Bueso Signed-off-by: James Morris commit e5cce6c13c25d9ac56955a3ae2fd562719848172 Author: Olof Johansson Date: Thu Jan 6 21:24:01 2011 -0600 tpm: fix panic caused by "tpm: Autodetect itpm devices" commit 3f0d3d016d89a5efb8b926d4707eb21fa13f3d27 adds a check for PNP device id to the common tpm_tis_init() function, which in some cases (force=1) will be called without the device being a member of a pnp_dev. Oopsing and panics ensue. Move the test up to before the call to tpm_tis_init(), since it just modifies a global variable anyway. Signed-off-by: Olof Johansson Acked-by: Rajiv Andrade Signed-off-by: James Morris commit c4ff4b829ef9e6353c0b133b7adb564a68054979 Author: Rajiv Andrade Date: Fri Nov 12 22:30:02 2010 +0100 TPM: Long default timeout fix If duration variable value is 0 at this point, it's because chip->vendor.duration wasn't filled by tpm_get_timeouts() yet. This patch sets then the lowest timeout just to give enough time for tpm_get_timeouts() to further succeed. This fix avoids long boot times in case another entity attempts to send commands to the TPM when the TPM isn't accessible. Signed-off-by: Rajiv Andrade Signed-off-by: James Morris commit 5403110943a2dcf1f96416d7a412a8b46895facd Author: Jesper Juhl Date: Sun Jan 23 22:40:42 2011 +0100 trusted keys: Fix a memory leak in trusted_update(). One failure path in security/keys/trusted.c::trusted_update() does not free 'new_p' while the others do. This patch makes sure we also free it in the remaining path (if datablob_parse() returns different from Opt_update). Signed-off-by: Jesper Juhl Signed-off-by: James Morris commit 7f3c68bee977ab872827e44de017216736fe21d7 Author: Mimi Zohar Date: Tue Jan 18 09:07:13 2011 -0500 keys: add trusted and encrypted maintainers Add myself and David Safford as maintainers for trusted/encrypted keys. Signed-off-by: Mimi Zohar Acked-by: David Howells Signed-off-by: James Morris commit b9703449347603289cac0bd04e574ac2e777275d Author: Mimi Zohar Date: Tue Jan 18 09:07:12 2011 -0500 encrypted-keys: rename encrypted_defined files to encrypted Rename encrypted_defined.c and encrypted_defined.h files to encrypted.c and encrypted.h, respectively. Based on request from David Howells. Signed-off-by: Mimi Zohar Acked-by: David Howells Signed-off-by: James Morris commit 4b174b6d281f5c87234fc65bafc02877f565c5cf Author: Mimi Zohar Date: Tue Jan 18 09:07:11 2011 -0500 trusted-keys: rename trusted_defined files to trusted Rename trusted_defined.c and trusted_defined.h files to trusted.c and trusted.h, respectively. Based on request from David Howells. Signed-off-by: Mimi Zohar Acked-by: David Howells Signed-off-by: James Morris commit ff5fdb61493d95332945630fcae249f896098652 Author: Randy Dunlap Date: Sat Jan 22 20:16:06 2011 -0800 fs: fix new dcache.c kernel-doc warnings Fix new fs/dcache.c kernel-doc warnings: Warning(fs/dcache.c:184): No description found for parameter 'dentry' Warning(fs/dcache.c:296): No description found for parameter 'parent' Warning(fs/dcache.c:1985): No description found for parameter 'dparent' Warning(fs/dcache.c:1985): Excess function parameter 'parent' description in 'd_validate' Signed-off-by: Randy Dunlap Cc: Alexander Viro Cc: Nick Piggin Signed-off-by: Linus Torvalds commit 9b310acc335cb0da7d743e2b60f999587beb6496 Author: Randy Dunlap Date: Sat Jan 22 20:16:12 2011 -0800 rapidio: fix new kernel-doc warnings Fix new rapidio kernel-doc warnings: Warning(drivers/rapidio/rio-scan.c:953): No description found for parameter 'prev' Warning(drivers/rapidio/rio-scan.c:953): No description found for parameter 'prev_port' Signed-off-by: Randy Dunlap Cc: Alexandre Bounine Cc: Matt Porter Signed-off-by: Linus Torvalds commit fcf285643433c6f6663182e9f4b3c9169fa22e3e Author: Randy Dunlap Date: Sat Jan 22 19:50:03 2011 -0800 docbook: fix broken serial to tty/serial movement Fix move of drivers/serial/ to drivers/tty/, where it broke one of the docbook files: docproc: drivers/serial/serial_core.c: No such file or directory Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds