)]}'
{
  "log": [
    {
      "commit": "eed5ee1a3ab3020168cd67fdde2500452b0628c9",
      "tree": "9548c5a4851b1a1e832b7800baf1e72b33bc7a66",
      "parents": [
        "435a5aebf609624bdf7c5a9a7705c260d0076195",
        "a5880a9e5bb40fbae55de60051d69a29091053c3"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Dec 02 12:58:16 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Dec 02 12:58:16 2010 -0800"
      },
      "message": "Merge branch \u0027tty-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6\n\n* \u0027tty-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:\n  serial: mfd: adjust the baud rate setting\n  TTY: open/hangup race fixup\n  TTY: don\u0027t allow reopen when ldisc is changing\n  NET: wan/x25, fix ldisc-\u003eopen retval\n  TTY: ldisc, fix open flag handling\n  serial8250: Mark console as CON_ANYTIME\n"
    },
    {
      "commit": "acfa747baf73922021a047f2d87a2d866f5dbab5",
      "tree": "f47037d4c02341a9e4102eddd7dc6c774e6b439d",
      "parents": [
        "e2efafbf139d2bfdfe96f2901f03189fecd172e4"
      ],
      "author": {
        "name": "Jiri Slaby",
        "email": "jslaby@suse.cz",
        "time": "Mon Nov 29 10:16:54 2010 +0100"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Mon Nov 29 14:52:48 2010 -0800"
      },
      "message": "TTY: open/hangup race fixup\n\nLike in the \"TTY: don\u0027t allow reopen when ldisc is changing\" patch,\nthis one fixes a TTY WARNING as described in the option 1) there:\n1) __tty_hangup from tty_ldisc_hangup to tty_ldisc_enable. During this\nsection tty_lock is held. However tty_lock is temporarily dropped in\nthe middle of the function by tty_ldisc_hangup.\n\nThe fix is to introduce a new flag which we set during the unlocked\nwindow and check it in tty_reopen too. The flag is TTY_HUPPING and is\ncleared after TTY_HUPPED is set.\n\nWhile at it, remove duplicate TTY_HUPPED set_bit. The one after\ncalling ops-\u003ehangup seems to be more correct. But anyway, we hold\ntty_lock, so there should be no difference.\n\nAlso document the function it does that kind of crap.\n\nNicely reproducible with two forked children:\nstatic void do_work(const char *tty)\n{\n\tif (signal(SIGHUP, SIG_IGN) \u003d\u003d SIG_ERR) exit(1);\n\tsetsid();\n\twhile (1) {\n\t\tint fd \u003d open(tty, O_RDWR|O_NOCTTY);\n\t\tif (fd \u003c 0) continue;\n\t\tif (ioctl(fd, TIOCSCTTY)) continue;\n\t\tif (vhangup()) continue;\n\t\tclose(fd);\n\t}\n\texit(0);\n}\n\nSigned-off-by: Jiri Slaby \u003cjslaby@suse.cz\u003e\nReported-by: \u003cValdis.Kletnieks@vt.edu\u003e\nReported-by: Kyle McMartin \u003ckyle@mcmartin.ca\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nCc: stable \u003cstable@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "e2efafbf139d2bfdfe96f2901f03189fecd172e4",
      "tree": "252ebbb93326f159890b6e1370a909b6ced72c0a",
      "parents": [
        "6a20bd45fda271bd57e3ba41b3de3009797f4b5e"
      ],
      "author": {
        "name": "Jiri Slaby",
        "email": "jslaby@suse.cz",
        "time": "Mon Nov 29 10:16:53 2010 +0100"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Mon Nov 29 14:52:48 2010 -0800"
      },
      "message": "TTY: don\u0027t allow reopen when ldisc is changing\n\nThere are many WARNINGs like the following reported nowadays:\nWARNING: at drivers/tty/tty_io.c:1331 tty_open+0x2a2/0x49a()\nHardware name: Latitude E6500\nModules linked in:\nPid: 1207, comm: plymouthd Not tainted 2.6.37-rc3-mmotm1123 #3\nCall Trace:\n [\u003cffffffff8103b189\u003e] warn_slowpath_common+0x80/0x98\n [\u003cffffffff8103b1b6\u003e] warn_slowpath_null+0x15/0x17\n [\u003cffffffff8128a3ab\u003e] tty_open+0x2a2/0x49a\n [\u003cffffffff810fd53f\u003e] chrdev_open+0x11d/0x146\n...\n\nThis means tty_reopen is called without TTY_LDISC set. For further\nconsiderations, note tty_lock is held in tty_open. TTY_LDISC is cleared in:\n1) __tty_hangup from tty_ldisc_hangup to tty_ldisc_enable. During this\nsection tty_lock is held. However tty_lock is temporarily dropped in\nthe middle of the function by tty_ldisc_hangup.\n\n2) tty_release via tty_ldisc_release till the end of tty existence. If\ntty-\u003ecount \u003c\u003d 1, tty_lock is taken, TTY_CLOSING bit set and then\ntty_ldisc_release called. tty_reopen checks TTY_CLOSING before checking\nTTY_LDISC.\n\n3) tty_set_ldisc from tty_ldisc_halt to tty_ldisc_enable. We:\n   * take tty_lock, set TTY_LDISC_CHANGING, put tty_lock\n   * call tty_ldisc_halt (clear TTY_LDISC), tty_lock is _not_ held\n   * do some other work\n   * take tty_lock, call tty_ldisc_enable (set TTY_LDISC), put\n     tty_lock\n\nI cannot see how 2) can be a problem, as there I see no race. OTOH, 1)\nand 3) can happen without problems. This patch the case 3) by checking\nTTY_LDISC_CHANGING along with TTY_CLOSING in tty_reopen. 1) will be\nfixed in the following patch.\n\nNicely reproducible with two processes:\nwhile (1) {\n\tfd \u003d open(\"/dev/ttyS1\", O_RDWR);\n\tif (fd \u003c 0) {\n\t\twarn(\"open\");\n\t\tcontinue;\n\t}\n\tclose(fd);\n}\n--------\nwhile (1) {\n        fd \u003d open(\"/dev/ttyS1\", O_RDWR);\n        ld1 \u003d 0; ld2 \u003d 2;\n        while (1) {\n                ioctl(fd, TIOCSETD, \u0026ld1);\n                ioctl(fd, TIOCSETD, \u0026ld2);\n        }\n        close(fd);\n}\n\nSigned-off-by: Jiri Slaby \u003cjslaby@suse.cz\u003e\nReported-by: \u003cValdis.Kletnieks@vt.edu\u003e\nCc: Kyle McMartin \u003ckyle@mcmartin.ca\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nCc: stable \u003cstable@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "7f90cfc505d613f4faf096e0d84ffe99208057d9",
      "tree": "e170577d3f202680dc7907d90db5c63fa6aaaa4d",
      "parents": [
        "a80c49dbb6cd389fd5b0d79f850b56322475d00b"
      ],
      "author": {
        "name": "Jiri Slaby",
        "email": "jslaby@suse.cz",
        "time": "Thu Nov 25 00:27:54 2010 +0100"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Mon Nov 29 14:51:54 2010 -0800"
      },
      "message": "TTY: ldisc, fix open flag handling\n\nWhen a concrete ldisc open fails in tty_ldisc_open, we forget to clear\nTTY_LDISC_OPEN. This causes a false warning on the next ldisc open:\nWARNING: at drivers/char/tty_ldisc.c:445 tty_ldisc_open+0x26/0x38()\nHardware name: System Product Name\nModules linked in: ...\nPid: 5251, comm: a.out Tainted: G        W  2.6.32-5-686 #1\nCall Trace:\n [\u003cc1030321\u003e] ? warn_slowpath_common+0x5e/0x8a\n [\u003cc1030357\u003e] ? warn_slowpath_null+0xa/0xc\n [\u003cc119311c\u003e] ? tty_ldisc_open+0x26/0x38\n [\u003cc11936c5\u003e] ? tty_set_ldisc+0x218/0x304\n...\n\nSo clear the bit when failing...\n\nIntroduced in c65c9bc3efa (tty: rewrite the ldisc locking) back in\n2.6.31-rc1.\n\nSigned-off-by: Jiri Slaby \u003cjslaby@suse.cz\u003e\nCc: Alan Cox \u003calan@linux.intel.com\u003e\nReported-by: Sergey Lapin \u003cslapin@ossfans.org\u003e\nTested-by: Sergey Lapin \u003cslapin@ossfans.org\u003e\nCc: stable \u003cstable@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "864ee6cb22fd64c1f4fba8ea3f390ffd8816b563",
      "tree": "74e41ec9b5ceb47ab9d704ece42d603df390370c",
      "parents": [
        "973d168de251d46605dc00d2c7f83848a5af9fb9",
        "de391d12500ede13faa7ecadbe900a8de1f76cfa"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 19 10:31:04 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 19 10:31:04 2010 -0800"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:\n  Input: fix typo in keycode validation supporting large scancodes\n  Input: aiptek - tighten up permissions on sysfs attributes\n  Input: sysrq - pass along lone Alt + SysRq\n"
    },
    {
      "commit": "40e3465db2cffd64e069ca82ee981025554bc159",
      "tree": "4d1f8b2e9eb7a6e585c3818cafa49f5840165941",
      "parents": [
        "820e62ef3d39ba9414dd9b87dba2eedd7e403e53"
      ],
      "author": {
        "name": "Ken Mills",
        "email": "ken.k.mills@intel.com",
        "time": "Thu Nov 04 15:16:42 2010 +0000"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Thu Nov 11 11:06:09 2010 -0800"
      },
      "message": "n_gsm: Fix length handling\n\nIf the mux is configured with a large mru/mtu the existing code gets the\nbyte ordering wrong for the header.\n\nSigned-off-by: Ken Mills \u003cken.k.mills@intel.com\u003e\nSigned-off-by: Alan Cox \u003calan@linux.intel.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "820e62ef3d39ba9414dd9b87dba2eedd7e403e53",
      "tree": "f75a2b14eac42d2f9d8b06ace5236a77c08f5b7e",
      "parents": [
        "5bb06b62bc445eed66fb256c3b5f86e5911797e4"
      ],
      "author": {
        "name": "Ken Mills",
        "email": "ken.k.mills@intel.com",
        "time": "Thu Nov 04 15:16:24 2010 +0000"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Thu Nov 11 11:06:08 2010 -0800"
      },
      "message": "n_gsm: Copy n2 over when configuring via ioctl interface\n\nThe n2 field is settable but didn\u0027t get propogated\n\nSigned-off-by: Ken Mills \u003cken.k.mills@intel.com\u003e\nSigned-off-by: Alan Cox \u003calan@linux.intel.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "47c344d0bd290e04c57eefdb0a721726e53bb57e",
      "tree": "1eb43fe592f19b9269ae3cacbe28380b31b6d5da",
      "parents": [
        "37db8f91b7d9b064bc78acd1c615a410322e275d"
      ],
      "author": {
        "name": "Nicolas Pitre",
        "email": "nicolas.pitre@canonical.com",
        "time": "Wed Nov 10 01:33:12 2010 -0500"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Thu Nov 11 10:51:35 2010 -0800"
      },
      "message": "vcs: make proper usage of the poll flags\n\nKay Sievers pointed out that usage of POLLIN is well defined by POSIX,\nand the current usage here doesn\u0027t follow that definition.  So let\u0027s\nduplicate the same semantics as implemented by sysfs_poll() instead.\n\nSigned-off-by: Nicolas Pitre \u003cnicolas.pitre@canonical.com\u003e\nAcked-by: Kay Sievers \u003ckay.sievers@vrfy.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "1c95ba1e1de7edffc0c4e275e147f1a9eb1f81ae",
      "tree": "9c0db77569313d05ac0e7298984897f9c003da95",
      "parents": [
        "100eeae2c5ce23b4db93ff320ee330ef1d740151"
      ],
      "author": {
        "name": "Philippe Rétornaz",
        "email": "philippe.retornaz@epfl.ch",
        "time": "Wed Oct 27 17:13:21 2010 +0200"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Tue Nov 09 15:05:50 2010 -0800"
      },
      "message": "tty_ldisc: Fix BUG() on hangup\n\nA kernel BUG when bluetooth rfcomm connection drop while the associated\nserial port is open is sometime triggered.\n\nIt seems that the line discipline can disappear between the\ntty_ldisc_put and tty_ldisc_get. This patch fall back to the N_TTY line\ndiscipline if the previous discipline is not available anymore.\n\nSigned-off-by: Philippe Retornaz \u003cphilippe.retornaz@epfl.ch\u003e\nAcked-by: Alan Cox \u003calan@linux.intel.com\u003e\nCc: stable \u003cstable@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "100eeae2c5ce23b4db93ff320ee330ef1d740151",
      "tree": "02448f4c2cb5db6de79812f3b5a3dfebe7075afe",
      "parents": [
        "ebf7c06635fbcf21a59e60187e166c5c23c57b06"
      ],
      "author": {
        "name": "Jiri Slaby",
        "email": "jslaby@suse.cz",
        "time": "Sun Oct 31 23:17:51 2010 +0100"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Tue Nov 09 15:04:21 2010 -0800"
      },
      "message": "TTY: restore tty_ldisc_wait_idle\n\nIt was removed in 65b770468e98 (tty-ldisc: turn ldisc user count into\na proper refcount), but we need to wait for last user to quit the\nldisc before we close it in tty_set_ldisc.\n\nOtherwise weird things start to happen. There might be processes\nwaiting in tty_read-\u003en_tty_read on tty-\u003eread_wait for input to appear\nand at that moment, a change of ldisc is fatal. n_tty_close is called,\nit frees read_buf and the waiting process is still in the middle of\nreading and goes nuts after it is woken.\n\nPreviously we prevented close to happen when others are in ldisc ops\nby tty_ldisc_wait_idle in tty_set_ldisc. But the commit above removed\nthat. So revoke the change and test whether there is 1 user (\u003dwe), and\nallow the close then.\n\nWe can do that without ldisc/tty locks, because nobody else can open\nthe device due to TTY_LDISC_CHANGING bit set, so we in fact wait for\neverybody to leave.\n\nI don\u0027t understand why tty_ldisc_lock would be needed either when the\ncounter is an atomic variable, so this is a lockless\ntty_ldisc_wait_idle.\n\nOn the other hand, if we fail to wait (timeout or signal), we have to\nreenable the halted ldiscs, so we take ldisc lock and reuse the setup\npath at the end of tty_set_ldisc.\n\nSigned-off-by: Jiri Slaby \u003cjslaby@suse.cz\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nTested-by: Sebastian Andrzej Siewior \u003cbigeasy@breakpoint.cc\u003e\nLKML-Reference: \u003c20101031104136.GA511@Chamillionaire.breakpoint.cc\u003e\nLKML-Reference: \u003c1287669539-22644-1-git-send-email-jslaby@suse.cz\u003e\nCc: Alan Cox \u003calan@linux.intel.com\u003e\nCc: stable@kernel.org [32, 33, 36]\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "e045fec48970df84647a47930fcf7a22ff7229c0",
      "tree": "166eeaf241f594ab70f6cc4da80d3b194228f931",
      "parents": [
        "c9bd9d01db02319c33767da5ee310ea37afda059"
      ],
      "author": {
        "name": "Jiri Olsa",
        "email": "jolsa@redhat.com",
        "time": "Mon Nov 08 19:01:47 2010 +0100"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Tue Nov 09 15:02:02 2010 -0800"
      },
      "message": "tty: prevent DOS in the flush_to_ldisc\n\nThere\u0027s a small window inside the flush_to_ldisc function,\nwhere the tty is unlocked and calling ldisc\u0027s receive_buf\nfunction. If in this window new buffer is added to the tty,\nthe processing might never leave the flush_to_ldisc function.\n\nThis scenario will hog the cpu, causing other tty processing\nstarving, and making it impossible to interface the computer\nvia tty.\n\nI was able to exploit this via pty interface by sending only\ncontrol characters to the master input, causing the flush_to_ldisc\nto be scheduled, but never actually generate any output.\n\nTo reproduce, please run multiple instances of following code.\n\n- SNIP\n#define _XOPEN_SOURCE\n#include \u003cstdlib.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003csys/types.h\u003e\n#include \u003csys/stat.h\u003e\n#include \u003cfcntl.h\u003e\n\nint main(int argc, char **argv)\n{\n        int i, slave, master \u003d getpt();\n        char buf[8192];\n\n        sprintf(buf, \"%s\", ptsname(master));\n        grantpt(master);\n        unlockpt(master);\n\n        slave \u003d open(buf, O_RDWR);\n        if (slave \u003c 0) {\n                perror(\"open slave failed\");\n                return 1;\n        }\n\n        for(i \u003d 0; i \u003c sizeof(buf); i++)\n                buf[i] \u003d rand() % 32;\n\n        while(1) {\n                write(master, buf, sizeof(buf));\n        }\n\n        return 0;\n}\n- SNIP\n\nThe attached patch (based on -next tree) fixes this by checking on the\ntty buffer tail. Once it\u0027s reached, the current work is rescheduled\nand another could run.\n\nSigned-off-by: Jiri Olsa \u003cjolsa@redhat.com\u003e\nCc: stable \u003cstable@kernel.org\u003e\nAcked-by: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "1db01135df7aa8b456e093a781f1d7f7016ec01e",
      "tree": "709af8ca6e90d1d45aef8b3bfd469f4985ce7f13",
      "parents": [
        "60d4ae8d436b8be6a8aedb63440203d5395e9f53"
      ],
      "author": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Fri Nov 05 22:18:23 2010 -0700"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Fri Nov 05 22:18:23 2010 -0700"
      },
      "message": "TTY: move .gitignore from drivers/char/ to drivers/tty/vt/\n\nThe autogenerated files (consolemap_deftbl.c and defkeymap.c) need to\nbe ignored by git, so move the .gitignore file that was doing it to the\nproperly location now that the files have moved as well.\n\nCc: Arnd Bergmann \u003carnd@arndb.de\u003e\nCc: Jiri Slaby \u003cjslaby@suse.cz\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "60d4ae8d436b8be6a8aedb63440203d5395e9f53",
      "tree": "2e0798d278100518634b999dc6705e9f02027d9f",
      "parents": [
        "96fd7ce58ffb5c7bf376796b5525ba3ea1c9d69f"
      ],
      "author": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Thu Nov 04 12:50:47 2010 -0700"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Fri Nov 05 08:16:52 2010 -0700"
      },
      "message": "TTY: create drivers/tty/vt and move the vt code there\n\nThe vt and other related code is moved into the drivers/tty/vt directory.\n\nAcked-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nCc: Jiri Slaby \u003cjslaby@suse.cz\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "96fd7ce58ffb5c7bf376796b5525ba3ea1c9d69f",
      "tree": "aca24a6c1c0e506d5fa7b0266c4c1866786607ae",
      "parents": [
        "c8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4"
      ],
      "author": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Thu Nov 04 11:10:29 2010 -0700"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Fri Nov 05 08:10:33 2010 -0700"
      },
      "message": "TTY: create drivers/tty and move the tty core files there\n\nThe tty code should be in its own subdirectory and not in the char\ndriver with all of the cruft that is currently there.\n\nBased on work done by Arnd Bergmann \u003carnd@arndb.de\u003e\n\nAcked-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nCc: Jiri Slaby \u003cjslaby@suse.cz\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    }
  ]
}
