)]}'
{
  "commit": "1aaad49e856ce41adc07d8ae0c8ef35fc4483245",
  "tree": "0f5b0ef305ad1b2c79132729d44ffbad72a84b84",
  "parents": [
    "8259cf4342029aad37660e524178c8858f48b0ab"
  ],
  "author": {
    "name": "Frans Pop",
    "email": "elendil@planet.nl",
    "time": "Mon Jul 06 13:31:48 2009 +0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Fri Jul 10 16:02:23 2009 +0200"
  },
  "message": "printk: Restore previous console_loglevel when re-enabling logging\n\nWhen logging to console is disabled from userspace using klogctl()\nand later re-enabled, console_loglevel gets set to the default\nlog level instead to the previous value.\n\nThis means that if the kernel was booted with \u0027quiet\u0027, the boot is\nsuddenly no longer quiet after logging to console gets re-enabled.\n\nSave the current console_loglevel when logging is disabled and\nrestore to that value. If the log level is set to a specific value\nwhile disabled, this is interpreted as an implicit re-enabling of\nthe logging.\n\nThe problem that prompted this patch is described in:\n\n    http://lkml.org/lkml/2009/6/28/234\n\nThere are two variations possible on the patch below:\n\n 1) If klogctl(7) is called while logging is not disabled, then set level\n    to default (partially preserving current functionality):\n  \tcase 7:\t\t/* Enable logging to console */\n -\t\tconsole_loglevel \u003d default_console_loglevel;\n +\t\tif (saved_console_loglevel \u003d\u003d -1)\n +\t\t\tconsole_loglevel \u003d default_console_loglevel;\n +\t\telse {\n +\t\t\tconsole_loglevel \u003d saved_console_loglevel;\n +\t\t\tsaved_console_loglevel \u003d -1;\n +\t\t}\n\n 2) If klogctl(8) is called while logging is disabled, then don\u0027t enable\n    logging, but remember the requested value for when logging does get\n    enabled again:\n  \tcase 8:\t\t/* Set level of messages printed to console */\n [...]\n - \t\tconsole_loglevel \u003d len;\n +\t\tif (saved_console_loglevel \u003d\u003d -1)\n +\t\t\tconsole_loglevel \u003d len;\n +\t\telse\n +\t\t\tsaved_console_loglevel \u003d len;\n\nYet another option would be to ignore the request.\n\nSigned-off-by: Frans Pop \u003celendil@planet.nl\u003e\nCc: cryptsetup@packages.debian.org\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nLKML-Reference: \u003c200907061331.49930.elendil@planet.nl\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "668df351e6a9270c72b000b375bfa8b47bd5f8e7",
      "old_mode": 33188,
      "old_path": "kernel/printk.c",
      "new_id": "e0daaf57985a279a7fffec4c2969b4945a0048f2",
      "new_mode": 33188,
      "new_path": "kernel/printk.c"
    }
  ]
}
