1. 05 3月, 2015 4 次提交
    • P
      netfilter: nf_tables: fix error handling of rule replacement · 59900e0a
      Pablo Neira Ayuso 提交于
      In general, if a transaction object is added to the list successfully,
      we can rely on the abort path to undo what we've done. This allows us to
      simplify the error handling of the rule replacement path in
      nf_tables_newrule().
      
      This implicitly fixes an unnecessary removal of the old rule, which
      needs to be left in place if we fail to replace.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      59900e0a
    • P
      netfilter: nf_tables: fix userdata length overflow · 86f1ec32
      Patrick McHardy 提交于
      The NFT_USERDATA_MAXLEN is defined to 256, however we only have a u8
      to store its size. Introduce a struct nft_userdata which contains a
      length field and indicate its presence using a single bit in the rule.
      
      The length field of struct nft_userdata is also a u8, however we don't
      store zero sized data, so the actual length is udata->len + 1.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      86f1ec32
    • P
      netfilter: nf_tables: check for overflow of rule dlen field · 9889840f
      Patrick McHardy 提交于
      Check that the space required for the expressions doesn't exceed the
      size of the dlen field, which would lead to the iterators crashing.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      9889840f
    • P
      netfilter: nf_tables: fix transaction race condition · 8670c3a5
      Patrick McHardy 提交于
      A race condition exists in the rule transaction code for rules that
      get added and removed within the same transaction.
      
      The new rule starts out as inactive in the current and active in the
      next generation and is inserted into the ruleset. When it is deleted,
      it is additionally set to inactive in the next generation as well.
      
      On commit the next generation is begun, then the actions are finalized.
      For the new rule this would mean clearing out the inactive bit for
      the previously current, now next generation.
      
      However nft_rule_clear() clears out the bits for *both* generations,
      activating the rule in the current generation, where it should be
      deactivated due to being deleted. The rule will thus be active until
      the deletion is finalized, removing the rule from the ruleset.
      
      Similarly, when aborting a transaction for the same case, the undo
      of insertion will remove it from the RCU protected rule list, the
      deletion will clear out all bits. However until the next RCU
      synchronization after all operations have been undone, the rule is
      active on CPUs which can still see the rule on the list.
      
      Generally, there may never be any modifications of the current
      generations' inactive bit since this defeats the entire purpose of
      atomicity. Change nft_rule_clear() to only touch the next generations
      bit to fix this.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      8670c3a5
  2. 25 2月, 2015 1 次提交
  3. 23 2月, 2015 3 次提交
    • J
      ipvs: add missing ip_vs_pe_put in sync code · 528c943f
      Julian Anastasov 提交于
      ip_vs_conn_fill_param_sync() gets in param.pe a module
      reference for persistence engine from __ip_vs_pe_getbyname()
      but forgets to put it. Problem occurs in backup for
      sync protocol v1 (2.6.39).
      
      Also, pe_data usually comes in sync messages for
      connection templates and ip_vs_conn_new() copies
      the pointer only in this case. Make sure pe_data
      is not leaked if it comes unexpectedly for normal
      connections. Leak can happen only if bogus messages
      are sent to backup server.
      
      Fixes: fe5e7a1e ("IPVS: Backup, Adding Version 1 receive capability")
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      528c943f
    • P
      netfilter: nf_tables: fix addition/deletion of elements from commit/abort · 02263db0
      Pablo Neira Ayuso 提交于
      We have several problems in this path:
      
      1) There is a use-after-free when removing individual elements from
         the commit path.
      
      2) We have to uninit() the data part of the element from the abort
         path to avoid a chain refcount leak.
      
      3) We have to check for set->flags to see if there's a mapping, instead
         of the element flags.
      
      4) We have to check for !(flags & NFT_SET_ELEM_INTERVAL_END) to skip
         elements that are part of the interval that have no data part, so
         they don't need to be uninit().
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      02263db0
    • A
      netfilter: nft_compat: don't truncate ethernet protocol type to u8 · 2156d321
      Arturo Borrero 提交于
      Use u16 for protocol and then cast it to __be16
      
      >> net/netfilter/nft_compat.c:140:37: sparse: incorrect type in assignment (different base types)
         net/netfilter/nft_compat.c:140:37:    expected restricted __be16 [usertype] ethproto
         net/netfilter/nft_compat.c:140:37:    got unsigned char [unsigned] [usertype] proto
      >> net/netfilter/nft_compat.c:351:37: sparse: incorrect type in assignment (different base types)
         net/netfilter/nft_compat.c:351:37:    expected restricted __be16 [usertype] ethproto
         net/netfilter/nft_compat.c:351:37:    got unsigned char [unsigned] [usertype] proto
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      2156d321
  4. 22 2月, 2015 3 次提交
  5. 21 2月, 2015 20 次提交
  6. 20 2月, 2015 2 次提交
  7. 19 2月, 2015 6 次提交
    • L
      Merge tag 'mfd-for-linus-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 5c277007
      Linus Torvalds 提交于
      Pull MFD updates from Lee Jones:
       "Changes to existing drivers:
         - fixr platform device collision; da9052, wm8994-core
         - regmap configuration amendments; tps65218
         - fix runtime PM deadlock; rtsx_usb
         - remove unused/superfluous code; db8500-prcmu, omap-usb-host
         - enable watchdog timer; lpc_sch
         - add start/stop RX URBs helpers; dln2
         - remove platform device (DT only); max77686, max77802
         - support suspend and resume; dln2
         - add Device Tree support; da9063
         - extra error checking; intel_soc_pmic
         - const'ify all the things; 88pm860x, hi6421-pmic, intel_soc_pmic,
                                     max77686, lm3533, retu, pcf50633,
                                     davinci_voicecodec, smsc-ece1099,
                                     tps65218, mc13xxx, tps65217, twl-core,
                                     twl6040
      
        New drivers/supported devices:
         - new driver for Richtek RT5033
         - new driver for DA9150 Charger and FuelGauge
         - new driver for Qualcomm Resource Power Manager (RPM)
         - add support for the ir-clk into sun6i-prcm
         - add support for FuelGauge into axp20x"
      
      * tag 'mfd-for-linus-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (32 commits)
        mfd: intel_soc_pmic: Add missing error check for devm_kzalloc
        mfd: rtsx_usb: Defer autosuspend while card exists
        mfd: devicetree: Add bindings for DA9063
        mfd: da9063: Add device tree support
        regulator: qcom-rpm: Add missing state flag in call to RPM
        mfd: qcom-rpm: Driver for the Qualcomm RPM
        mfd: devicetree: bindings: Add Qualcomm RPM DT binding
        mfd: max77686/802: Remove support for board files
        mfd: omap-usb-host: Remove some unused functions
        mfd: twl6040: Constify struct regmap_config and reg_default array
        mfd: twl-core: Constify struct regmap_config and reg_default array
        mfd: tps65217: Constify struct regmap_config
        mfd: mc13xxx: i2c/spi: Constify struct regmap_config
        mfd: tps65218: Constify struct regmap_config
        mfd: smsc-ece1099: Constify struct regmap_config
        mfd: davinci_voicecodec: Constify struct regmap_config
        mfd: pcf50633: Constify struct regmap_config
        mfd: retu: Constify struct regmap_config
        mfd: lm3533: Constify struct regmap_config
        mfd: max77686: Constify struct regmap_config
        ...
      5c277007
    • L
      Merge tag 'pwm/for-3.20-rc1' of... · 9a8b2aa5
      Linus Torvalds 提交于
      Merge tag 'pwm/for-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This contains two new drivers, one for Allwinner SoCs and the other
        for Imagination Technologies' Pistachio SoC.
      
        Complementing this are a couple of fixes to the Atmel HLCDC PWM and
        STi PWM drivers as well as minor cleanups to the core and the Tegra
        driver"
      
      * tag 'pwm/for-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: tegra: Use NSEC_PER_SEC
        pwm: Remove unnecessary check before of_node_put()
        pwm: Add device tree binding document for IMG PWM DAC
        pwm: Imagination Technologies PWM DAC driver
        pwm: sti: Maintain a bitmap of configured devices
        pwm: sunxi: document OF bindings
        pwm: Add Allwinner SoC support
        pwm: atmel-hlcdc: Prevent division by zero
        pwm: atmel-hlcdc: Depend on HAVE_CLK
      9a8b2aa5
    • L
      Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma · ce1d3fde
      Linus Torvalds 提交于
      Pull dmaengine updates from Vinod Koul:
       "This update brings:
      
         - the big cleanup up by Maxime for device control and slave
           capabilities.  This makes the API much cleaner.
      
         - new IMG MDC driver by Andrew
      
         - new Renesas R-Car Gen2 DMA Controller driver by Laurent along with
           bunch of fixes on rcar drivers
      
         - odd fixes and updates spread over driver"
      
      * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (130 commits)
        dmaengine: pl330: add DMA_PAUSE feature
        dmaengine: pl330: improve pl330_tx_status() function
        dmaengine: rcar-dmac: Disable channel 0 when using IOMMU
        dmaengine: rcar-dmac: Work around descriptor mode IOMMU errata
        dmaengine: rcar-dmac: Allocate hardware descriptors with DMAC device
        dmaengine: rcar-dmac: Fix oops due to unintialized list in error ISR
        dmaengine: rcar-dmac: Fix spinlock issues in interrupt
        dmaenegine: edma: fix sparse warnings
        dmaengine: rcar-dmac: Fix uninitialized variable usage
        dmaengine: shdmac: extend PM methods
        dmaengine: shdmac: use SET_RUNTIME_PM_OPS()
        dmaengine: pl330: fix bug that cause start the same descs in cyclic
        dmaengine: at_xdmac: allow muliple dwidths when doing slave transfers
        dmaengine: at_xdmac: simplify channel configuration stuff
        dmaengine: at_xdmac: introduce save_cc field
        dmaengine: at_xdmac: wait for in-progress transaction to complete after pausing a channel
        ioat: fail self-test if wait_for_completion times out
        dmaengine: dw: define DW_DMA_MAX_NR_MASTERS
        dmaengine: dw: amend description of dma_dev field
        dmatest: move src_off, dst_off, len inside loop
        ...
      ce1d3fde
    • L
      Merge git://www.linux-watchdog.org/linux-watchdog · 928fce2f
      Linus Torvalds 提交于
      Pull watchdog updates from Wim Van Sebroeck:
       "This adds the following new drivers:
      
         - ImgTec PDC Watchdog Timer Driver,
         - Mediatek SoC integrated watchdog
      
        Add support for BCM5301X, IT8783, NCT6791 and NCT6792 WDT's
      
        Add bcm47xx_wdt and da9063 restart handlers and contains overall
        improvements and fixes"
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: bcm47xx_wdt.c: allow enabling on BCM5301X arch
        watchdog: jz4740: Add DT support
        dt: watchdog: Add DT binding documentation for jz4740 watchdog timer
        watchdog: dw_wdt: Try to get a 30 second watchdog by default
        watchdog: dw_wdt: pat the watchdog before enabling it
        watchdog: w83627hf_wdt: Add support for NCT6791 and NCT6792
        watchdog: bcm47xx_wdt.c: add restart handler support
        watchdog: gpio_wdt: Add "always_running" feature to GPIO watchdog
        watchdog: da9063: Add restart handler support
        ARM: mediatek: dts: Add bindings for watchdog
        watchdog: Add driver for Mediatek watchdog
        watchdog: Fix omap watchdogs to enable the magic close bit
        watchdog: rt2880_wdt: minor clean up
        watchdog: hpwdt: Fix initialization message in hpwdt.c
        watchdog: it87_wdt: add IT8783 ID
        watchdog: imx2: Constify struct regmap_config and watchdog_ops
        DT: watchdog: Add ImgTec PDC Watchdog Timer binding documentation
        watchdog: ImgTec PDC Watchdog Timer Driver
      928fce2f
    • L
      Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 · a5ac1fb1
      Linus Torvalds 提交于
      Pull fireware updates from Stefan Richter:
       "IEEE 1394 subsystem updates:
      
         - Replace made-up, unallocated Vendor and Model values of
           firewire-core's Configuration ROM register root directory by
           properly registered IDs.  (These IDs are visible to peer nodes on
           the bus and locally via sysfs, but they are not involved in
           protocol matching or driver matching, nor are they used in stock
           udev rules)
      
         - Remove some unneccessary code"
      
      * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
        firewire: core: use correct vendor/model IDs
        firewire: sbp2: remove redundant check for bidi command
        firewire: ohci: Remove unused function
      a5ac1fb1
    • L
      Merge tag 'for-linus-20150216' of git://git.infradead.org/linux-mtd · 402521b8
      Linus Torvalds 提交于
      Pull MTD updates from Brian Norris:
       "NAND:
      
         - Add new Hisilicon NAND driver for Hip04
         - Add default reboot handler, to ensure all outstanding erase
           transactions complete in time
         - jz4740: convert to use GPIO descriptor API
         - Atmel: add support for sama5d4
         - Change default bitflip threshold to 75% of correction strength
         - Miscellaneous cleanups and bugfixes
      
        SPI NOR:
      
         - Freescale QuadSPI:
         - Fix a few probe() and remove() issues
         - Add a MAINTAINERS entry for this driver
         - Tweak transfer size to increase read performance
         - Add suspend/resume support
         - Add Micron quad I/O support
         - ST FSM SPI: miscellaneous fixes
      
        JFFS2:
      
         - gracefully handle corrupted 'offset' field found on flash
      
        Other:
      
         - bcm47xxpart: add tweaks for a few new devices
         - mtdconcat: set return lengths properly for mtd_write_oob()
         - map_ram: enable use with mtdoops
         - maps: support fallback to ROM/UBI for write-protected NOR flash"
      
      * tag 'for-linus-20150216' of git://git.infradead.org/linux-mtd: (46 commits)
        mtd: hisilicon: && vs & typo
        jffs2: fix handling of corrupted summary length
        mtd: hisilicon: add device tree binding documentation
        mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc
        mtd: avoid registering reboot notifier twice
        mtd: concat: set the return lengths properly
        mtd: kconfig: replace PPC_OF with PPC
        mtd: denali: remove unnecessary stubs
        mtd: nand: remove redundant local variable
        MAINTAINERS: add maintainer entry for FREESCALE QUAD SPI driver
        mtd: fsl-quadspi: improve read performance by increase AHB transfer size
        mtd: fsl-quadspi: Remove unnecessary 'map_failed' label
        mtd: fsl-quadspi: Remove unneeded success/error messages
        mtd: fsl-quadspi: Fix the error paths
        mtd: nand: omap: drop condition with no effect
        mtd: nand: jz4740: Convert to GPIO descriptor API
        mtd: nand: Request strength instead of bytes for soft BCH
        mtd: nand: default bitflip-reporting threshold to 75% of correction strength
        mtd: atmel_nand: introduce a new compatible string for sama5d4 chip
        mtd: atmel_nand: return max bitflips in all sectors in pmecc_correction()
        ...
      402521b8
  8. 18 2月, 2015 1 次提交