+ uml-mmapper-remove-just-added-but-wrong-const-attribute.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     uml: mmapper - remove just added but wrong "const" attribute

has been added to the -mm tree.  Its filename is

     uml-mmapper-remove-just-added-but-wrong-const-attribute.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: uml: mmapper - remove just added but wrong "const" attribute
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>

When enabling the mmapper driver I got warnings because this "const"
miscdevice structure is passed to function as non-const pointer; unlike struct
tty_operations, however, I verified that misc_{de,}register _do_ modify their
parameter, so this const attribute must be removed.

Since the purpose of the change was to guarantee that no lock was needed, add
a comment to prove this differently.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>
Cc: Jeff Dike <jdike@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/um/drivers/mmapper_kern.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/um/drivers/mmapper_kern.c~uml-mmapper-remove-just-added-but-wrong-const-attribute arch/um/drivers/mmapper_kern.c
--- a/arch/um/drivers/mmapper_kern.c~uml-mmapper-remove-just-added-but-wrong-const-attribute
+++ a/arch/um/drivers/mmapper_kern.c
@@ -95,7 +95,8 @@ static const struct file_operations mmap
 	.release	= mmapper_release,
 };
 
-static const struct miscdevice mmapper_dev = {
+/* No locking needed - only used (and modified) by below initcall and exitcall. */
+static struct miscdevice mmapper_dev = {
 	.minor		= MISC_DYNAMIC_MINOR,
 	.name		= "mmapper",
 	.fops		= &mmapper_fops
_

Patches currently in -mm which might be from blaisorblade@xxxxxxxx are

uml-mode_tt-is-bust.patch
fix-typo-in-memory-barrier-docs.patch
uml-remove-some-leftover-ppc-code.patch
uml-split-memory-allocation-prototypes-out-of-userh.patch
uml-fix-prototypes.patch
uml-make-execvp-safe-for-our-usage.patch
uml-code-convention-cleanup-of-a-file.patch
uml-reenable-compilation-of-enable_timer-disabled-by-mistake.patch
uml-use-defconfig_list-to-avoid-reading-hosts-config.patch
uml-cleanup-run_helper-api-to-fix-a-leak.patch
uml-kconfig-silence-warning.patch
uml-mmapper-remove-just-added-but-wrong-const-attribute.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux