1. 30 1月, 2014 24 次提交
  2. 29 1月, 2014 16 次提交
    • J
      fanotify: Fix use after free for permission events · 85816794
      Jan Kara 提交于
      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: NJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: NDave Jones <davej@fedoraproject.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      85816794
    • J
      fsnotify: Do not return merged event from fsnotify_add_notify_event() · 83c0e1b4
      Jan Kara 提交于
      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: NJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: NDave Jones <davej@fedoraproject.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      83c0e1b4
    • J
      fanotify: Fix use after free in mask checking · 13116dfd
      Jan Kara 提交于
      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: NJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: NDave Jones <davej@fedoraproject.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      13116dfd
    • D
      a54983ae
    • E
      qeth: fix build of s390 allmodconfig · c044dc21
      Eugene Crosser 提交于
      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: NEugene Crosser <Eugene.Crosser@ru.ibm.com>
      Signed-off-by: NFrank Blaschka <frank.blaschka@de.ibm.com>
      Reported-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c044dc21
    • D
      bonding: fix locking in bond_loadbalance_arp_mon() · 6fde8f03
      Ding Tianhong 提交于
      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: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fde8f03
    • M
      tun: add device name(iff) field to proc fdinfo entry · 93e14b6d
      Masatake YAMATO 提交于
      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: NMasatake YAMATO <yamato@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93e14b6d
    • D
      Merge branch 'DT' · 52efcea5
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      52efcea5
    • S
      DT: net: davinci_emac: "ti, davinci-no-bd-ram" property is actually optional · 589dcb8a
      Sergei Shtylyov 提交于
      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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      589dcb8a
    • S
      DT: net: davinci_emac: "ti, davinci-rmii-en" property is actually optional · 731ff244
      Sergei Shtylyov 提交于
      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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      731ff244
    • P
      sparc: don't use module_init in non-modular pci.c code · 1b925b57
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b925b57
    • P
      sparc: delete non-required instances of include <linux/init.h> · 8b2abcbc
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b2abcbc
    • R
      drivers: ide: Include appropriate header file in ide-pio-blacklist.c · 61eae5bb
      Rashika Kheria 提交于
      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: NRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61eae5bb
    • R
      drivers: ide: Include appropriate header file in ide-cd_verbose.c · dfea4aa2
      Rashika Kheria 提交于
      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: NRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dfea4aa2
    • L
      Merge tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd · 0e47c969
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds · 268943fb
      Linus Torvalds 提交于
      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