1. 30 Jan, 2014 23 commits
  2. 29 Jan, 2014 17 commits
    • Jan Kara's avatar
      fanotify: Fix use after free for permission events · 85816794
      Jan Kara authored
      Currently struct fanotify_event_info has been destroyed immediately
      after reporting its contents to userspace. However that is wrong for
      permission events because those need to stay around until userspace
      provides response which is filled back in fanotify_event_info. So change
      to code to free permission events only after we have got the response
      from userspace.
      Reported-and-tested-by: default avatarJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      85816794
    • Jan Kara's avatar
      fsnotify: Do not return merged event from fsnotify_add_notify_event() · 83c0e1b4
      Jan Kara authored
      The event returned from fsnotify_add_notify_event() cannot ever be used
      safely as the event may be freed by the time the function returns (after
      dropping notification_mutex). So change the prototype to just return
      whether the event was added or merged into some existing event.
      Reported-and-tested-by: default avatarJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      83c0e1b4
    • Jan Kara's avatar
      fanotify: Fix use after free in mask checking · 13116dfd
      Jan Kara authored
      We cannot use the event structure returned from
      fsnotify_add_notify_event() because that event can be freed by the time
      that function returns. Use the mask argument passed into the event
      handler directly instead. This also fixes a possible problem when we
      could unnecessarily wait for permission response for a normal fanotify
      event which got merged with a permission event.
      
      We also disallow merging of permission event with any other event so
      that we know the permission event which we just created is the one on
      which we should wait for permission response.
      Reported-and-tested-by: default avatarJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      13116dfd
    • David S. Miller's avatar
    • Eugene Crosser's avatar
      qeth: fix build of s390 allmodconfig · c044dc21
      Eugene Crosser authored
      commit 949efd1c "qeth: bridgeport support - basic control" broke
      s390 allmodconfig. This patch fixes this by eliminating one of the
      cross-module calls, and by making two other calls via function
      pointers in the qeth_discipline structure.
      Signed-off-by: default avatarEugene Crosser <Eugene.Crosser@ru.ibm.com>
      Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
      Reported-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c044dc21
    • Ding Tianhong's avatar
      bonding: fix locking in bond_loadbalance_arp_mon() · 6fde8f03
      Ding Tianhong authored
      The commit 1d3ee88a
      (bonding: add netlink attributes to slave link dev)
      has add rtmsg_ifinfo() in bond_set_active_slave() and
      bond_set_backup_slave(), so the two function need to
      called in RTNL lock, but bond_loadbalance_arp_mon()
      only calling these functions in RCU, warning message
      will occurs.
      
      fix this by add a new function bond_slave_state_change(),
      which will reset the slave's state after slave link check,
      so remove the bond_set_xxx_slave() from the cycle and only
      record the slave_state_changed, this will call the new
      function to set all slaves to new state in RTNL later.
      
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Cc: Veaceslav Falico <vfalico@redhat.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6fde8f03
    • Masatake YAMATO's avatar
      tun: add device name(iff) field to proc fdinfo entry · 93e14b6d
      Masatake YAMATO authored
      A file descriptor opened for /dev/net/tun and a tun device are
      connected with ioctl.  Though understanding the connection is
      important for trouble shooting, no way is given to a user to know
      the connected device for a given file descriptor at userland.
      
      This patch adds a new fdinfo field for the device name connected to
      a file descriptor opened for /dev/net/tun.
      
      Here is an example of the field:
      
          # lsof | grep tun
          qemu-syst 4565         qemu   25u      CHR             10,200       0t138      12921 /dev/net/tun
          ...
      
          # cat /proc/4565/fdinfo/25
          pos:	138
          flags:	0104002
          iff:	vnet0
      
          # ip link show dev vnet0
          8: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
      
      changelog:
      
          v2: indent iff just like the other fdinfo fields are.
          v3: remove unused variable.
              Both are suggested by David Miller <davem@davemloft.net>.
      Signed-off-by: default avatarMasatake YAMATO <yamato@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93e14b6d
    • David S. Miller's avatar
      Merge branch 'DT' · 52efcea5
      David S. Miller authored
      Sergei Shtylyov says:
      
      ====================
      DT: net: davinci_emac: couple more properties actually optional
      
         Though described as required, couple more properties in the DaVinci EMAC
      binding are actually optional, as the driver will happily function without them.
      The patchset is against DaveM's 'net.git' tree this time.
      
      [1/2] DT: net: davinci_emac: "ti,davinci-rmii-en" property is actually optional
      [2/2] DT: net: davinci_emac: "ti,davinci-no-bd-ram" property is actually optional
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52efcea5
    • Sergei Shtylyov's avatar
      DT: net: davinci_emac: "ti, davinci-no-bd-ram" property is actually optional · 589dcb8a
      Sergei Shtylyov authored
      The "ti,davinci-no-bd-ram" property for the DaVinci EMAC binding simply can't be
      required one, as it's boolean (which means it's absent if false).
      
      While at it, document the property better...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      589dcb8a
    • Sergei Shtylyov's avatar
      DT: net: davinci_emac: "ti, davinci-rmii-en" property is actually optional · 731ff244
      Sergei Shtylyov authored
      Though described as required, the "ti,davinci-rmii-en" property for the DaVinci
      EMAC binding seems actually optional, as the driver should happily work without
      it; the property is not specified either  in the example device node or in the
      actual EMAC device node for DA850 device tree, only AM3517 one.
      
      While at it, document the property better...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      731ff244
    • Paul Gortmaker's avatar
      sparc: don't use module_init in non-modular pci.c code · 1b925b57
      Paul Gortmaker authored
      The pci.o is built for SPARC64_PCI -- which is bool, and hence
      this code is either present or absent.  It will never be modular,
      so using module_init as an alias for __initcall can be somewhat
      misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Note that direct use of __initcall is discouraged, vs. one
      of the priority categorized subgroups.  As __initcall gets
      mapped onto device_initcall, our use of device_initcall
      directly in this change means that the runtime impact is
      zero -- it will remain at level 6 in initcall ordering.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b925b57
    • Paul Gortmaker's avatar
      sparc: delete non-required instances of include <linux/init.h> · 8b2abcbc
      Paul Gortmaker authored
      None of these files are actually using any __init type directives
      and hence don't need to include <linux/init.h>.  Most are just a
      left over from __devinit and __cpuinit removal, or simply due to
      code getting copied from one driver to the next.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b2abcbc
    • Rashika Kheria's avatar
      drivers: ide: Include appropriate header file in ide-pio-blacklist.c · 61eae5bb
      Rashika Kheria authored
      Include appropriate header file include/linux/ide.h in file
      ide-pio-blacklist.c because function ide_scan_pio_blacklist() has it's
      prototype declaration in include/linux/ide.h.
      
      This eliminates the following warning in ide-pio-blacklist.c:
      drivers/ide/ide-pio-blacklist.c:85:5: warning: no previous prototype for ‘ide_scan_pio_blacklist’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61eae5bb
    • Rashika Kheria's avatar
      drivers: ide: Include appropriate header file in ide-cd_verbose.c · dfea4aa2
      Rashika Kheria authored
      Include appropriate header file ide-cd.h in ide-cd_verbose.c because
      function ide_cd_log_error() has its prototype declaration in ide-cd.h.
      Also, include linux/ide.h because it contains certain declarations
      necessary for including ide-cd.h.
      
      This eliminates the following warnings in ide-cd_verbose.c:
      drivers/ide/ide-cd_verbose.c:251:6: warning: no previous prototype for ‘ide_cd_log_error’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dfea4aa2
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd · 0e47c969
      Linus Torvalds authored
      Pull MTD updates from Brian Norris:
       - Add me (Brian Norris) as an additional MTD maintainer (it'd be nice to get
         David's "ack" for this; I'm sure he approves, but he's been pretty silent
         lately)
       - Add Ezequiel Garcie as maintainer for the pxa3xx NAND driver
       - Last (?) round of pxa3xx improvements for supporting Armada 370/XP
       - Typical churn in driver boilerplate (OOM messages, printk()'s, devm_*, etc.)
       - Quad read mode support for SPI NOR driver (m25p80)
       - Update Davinci NAND driver to prepare for use on new platforms
       - Begin to kill off NAND_MAX_{PAGE,OOB}SIZE macros; more work is pending
       - Miscellaneous NAND device support (new IDs)
       - Add READ RETRY support for Micron MLC NAND
       - Support new GPMI NAND ECC layout device-tree binding
       - Avoid mapping stack/vmalloc() memory for GPMI NAND DMA
      
      * tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd: (151 commits)
        mtd: gpmi: add sanity check when mapping DMA for read_buf/write_buf
        mtd: gpmi: allocate a proper buffer for non ECC read/write
        mtd: m25p80: Set rx_nbits for Quad SPI transfers
        mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
        mtd: s3c2410: Merge plat/regs-nand.h into s3c2410.c
        mtd: mtdram: add missing 'const'
        mtd: m25p80: assign default read command
        mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
        mtd: plat_nand: remove redundant return value check of platform_get_resource()
        mtd: nand: add Intel manufacturer ID
        mtd: nand: add SanDisk manufacturer ID
        mtd: nand: add support for Samsung K9LCG08U0B
        mtd: nand: pxa3xx: Add support for 2048 bytes page size devices
        mtd: m25p80: Use OPCODE_QUAD_READ_4B for 4-byte addressing
        mtd: nand: don't use {read,write}_buf for 8-bit transfers
        mtd: nand: use __packed shorthand
        mtd: nand: support Micron READ RETRY
        mtd: nand: add generic READ RETRY support
        mtd: nand: add ONFI vendor block for Micron
        mtd: nand: localize ECC failures per page
        ...
      0e47c969
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds · 268943fb
      Linus Torvalds authored
      Pull LED subsystem update from Bryan Wu:
       "Basically this cycle is mostly cleanup for LED subsystem"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: s3c24xx: Remove hardware.h inclusion
        leds: replace list_for_each with list_for_each_entry
        leds: kirkwood: Cleanup in header files
        leds: pwm: Remove a warning on non-DT platforms
        leds: leds-pwm: fix duty time overflow.
        leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock
        leds: leds-mc13783: Remove duplicate field in platform data
        drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
        leds: lp5523: Support LED MUX configuration on running a pattern
        leds: lp5521/5523: Fix multiple engine usage bug
        LEDS: tca6507 - fix up some comments.
        LEDS: tca6507: add device-tree support for GPIO configuration.
        LEDS: tca6507 - fix bugs in parsing of device-tree configuration.
      268943fb
    • Linus Torvalds's avatar
      Merge tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 2ad48ee8
      Linus Torvalds authored
      Pull serial fixes from Greg KH:
       "Here are tiny and assorted serial driver fixes that have been in a
        branch in my tree for a while and somehow did not get properly merged
        into my big TTY / Serial pull request for 3.14-rc1.  Sorry about that.
      
        All have been in linux-next for a while with no issues"
      
      * tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: xuartps: Properly guard sysrq specific code
        serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
        serial: icom: dereference after free in load_code()
        serial: 8250_dw: add new ACPI IDs
        tty: serial: pch: don't crash if DMA enabled but not loaded
        serial: samsung: move clock deactivation below uart registration
      2ad48ee8