+ printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update.patch added to -mm tree

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

 



The patch titled
     Subject: printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update
has been added to the -mm tree.  Its filename is
     printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Borislav Petkov <bp@xxxxxxx>
Subject: printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update

Thanks for catching this, here's an updated 2/2 patch with the above
integrated and the SYSTEM_BOOTING check removed because we set
system_state to SYSTEM_RUNNING before we start init.

Link: http://lkml.kernel.org/r/20160719072344.GC25563@xxxxxxxxxxx
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Cc: Dave Young <dyoung@xxxxxxxxxx>
Cc: Franck Bui <fbui@xxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/printk/printk.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff -puN kernel/printk/printk.c~printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update kernel/printk/printk.c
--- a/kernel/printk/printk.c~printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update
+++ a/kernel/printk/printk.c
@@ -117,8 +117,7 @@ static int __control_devkmsg(char *str)
 		devkmsg_log = DEVKMSG_LOG_MASK_DEFAULT;
 		return 9;
 	}
-	else
-		return -EINVAL;
+	return -EINVAL;
 }
 
 static int __init control_devkmsg(char *str)
@@ -741,8 +740,8 @@ static ssize_t devkmsg_write(struct kioc
 	if (devkmsg_log & DEVKMSG_LOG_MASK_OFF)
 		return len;
 
-	/* Ratelimit when not explicitly enabled or when we're not booting. */
-	if ((system_state != SYSTEM_BOOTING) && !(devkmsg_log & DEVKMSG_LOG_MASK_ON)) {
+	/* Ratelimit when not explicitly enabled. */
+	if (!(devkmsg_log & DEVKMSG_LOG_MASK_ON)) {
 		if (!___ratelimit(&user->rs, current->comm))
 			return ret;
 	}
_

Patches currently in -mm which might be from bp@xxxxxxx are

ratelimit-extend-to-print-suppressed-messages-on-release.patch
printk-add-kernel-parameter-to-control-writes-to-dev-kmsg.patch
printk-add-kernel-parameter-to-control-writes-to-dev-kmsg-update.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 Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]
  Powered by Linux