Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238289 > unrolled thread

[PATCH 3.12 00/84] 3.12.49-stable review

Started byJiri Slaby <jslaby@suse.cz>
First post2015-10-02 16:00 +0200
Last post2015-10-02 18:10 +0200
Articles 10 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 3.12 00/84] 3.12.49-stable review Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
    [PATCH 3.12 01/84] PCI: Add dev_flags bit to access VPD through function 0 Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
      [PATCH 3.12 09/84] crypto: caam - fix memory corruption in ahash_final_ctx Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
      [PATCH 3.12 20/84] usb: host: ehci-sys: delete useless bus_to_hcd conversion Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
      [PATCH 3.12 02/84] PCI: Add VPD function 0 quirk for Intel Ethernet devices Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
      [PATCH 3.12 10/84] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
      [PATCH 3.12 07/84] libfc: Fix fc_fcp_cleanup_each_cmd() Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
      [PATCH 3.12 04/84] staging: comedi: usbduxsigma: don't clobber ao_timer in command test Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
    Re: [PATCH 3.12 00/84] 3.12.49-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-10-02 17:40 +0200
    Re: [PATCH 3.12 00/84] 3.12.49-stable review Guenter Roeck <linux@roeck-us.net> - 2015-10-02 18:10 +0200

#1238289 — [PATCH 3.12 00/84] 3.12.49-stable review

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 00/84] 3.12.49-stable review
Message-ID<qf92s-5aj-35@gated-at.bofh.it>
This is the start of the stable review cycle for the 3.12.49 release.
There are 84 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Tue Oct  6 15:25:04 CEST 2015.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	http://kernel.org/pub/linux/kernel/people/jirislaby/stable-review/patch-3.12.49-rc1.xz
and the diffstat can be found below.

thanks,
js

===============


Adrien Schildknecht (1):
  rtlwifi: rtl8192cu: Add new device ID

Alexey Brodkin (1):
  stmmac: troubleshoot unexpected bits in des0 & des1

Andrey Ryabinin (1):
  crypto: ghash-clmulni: specify context size for ghash async algorithm

Andy Lutomirski (3):
  x86/nmi/64: Improve nested NMI comments
  x86/nmi/64: Reorder nested NMI checks
  x86/nmi/64: Use DF to avoid userspace RSP confusing nested NMI
    detection

Aneesh Kumar K.V (1):
  powerpc/mm: Recompute hash value after a failed update

Bart Van Assche (1):
  libfc: Fix fc_fcp_cleanup_each_cmd()

Bjorn Helgaas (1):
  PCI: Fix TI816X class code quirk

Bob Copeland (1):
  mac80211: enable assoc check for mesh interfaces

Christoph Hellwig (1):
  IB/uverbs: reject invalid or unknown opcodes

Dan Carpenter (1):
  clk: versatile: off by one in clk_sp810_timerclken_of_get()

Daniel Borkmann (2):
  ipv6: fix exthdrs offload registration in out_rt path
  netlink, mmap: transform mmap skb into full skb on taps

David Daney (1):
  of/address: Don't loop forever in of_find_matching_node_by_address().

David Härdeman (1):
  rc-core: fix remove uevent generation

David Vrabel (1):
  xen/gntdev: convert priv->lock to a mutex

Davide Italiano (1):
  ext4: move check under lock scope to close a race.

Don Zickus (1):
  HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error

Eric W. Biederman (3):
  unshare: Unsharing a thread does not require unsharing a vm
  dcache: Handle escaped paths in prepend_path
  vfs: Test for and handle paths that are unreachable from their
    mnt_root

Eugene Shatokhin (1):
  usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

Filipe Manana (1):
  Btrfs: check if previous transaction aborted to avoid fs corruption

Grant Likely (1):
  drivercore: Fix unregistration path of platform devices

Guenter Roeck (1):
  regmap: regcache-rbtree: Clean new present bits on present bitmap
    resize

Helge Deller (1):
  parisc: Filter out spurious interrupts in PA-RISC irq handler

Hin-Tak Leung (2):
  hfs: fix B-tree corruption after insertion at position 0
  hfs,hfsplus: cache pages correctly between bnode_create and bnode_free

Horia Geant? (1):
  crypto: caam - fix memory corruption in ahash_final_ctx

Ian Abbott (3):
  staging: comedi: usbduxsigma: don't clobber ai_timer in command test
  staging: comedi: usbduxsigma: don't clobber ao_timer in command test
  staging: comedi: adl_pci7x3x: fix digital output on PCI-7230

Imre Deak (1):
  tty/vt: don't set font mappings on vc not supporting this

Jack Morgenstein (1):
  IB/mlx4: Forbid using sysfs to change RoCE pkeys

Jaewon Kim (1):
  vmscan: fix increasing nr_isolated incurred by putback unevictable
    pages

Jann Horn (1):
  fs: if a coredump already exists, unlink and recreate with O_EXCL

Jean Delvare (1):
  tg3: Fix temperature reporting

Jeff Vander Stoep (1):
  arm64: kconfig: Move LIST_POISON to a safe value

Jeffery Miller (1):
  Add radeon suspend/resume quirk for HP Compaq dc5750.

Jesse Gross (1):
  openvswitch: Zero flows on allocation.

Jialing Fu (1):
  mmc: core: fix race condition in mmc_wait_data_done

Jonathon Jongsma (1):
  drm/qxl: validate monitors config modes

Kishon Vijay Abraham I (1):
  usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512
    bytes

Lars-Peter Clausen (2):
  iio: Add inverse unit conversion macros
  iio: adis16480: Fix scale factors

Maciej S. Szmigiero (1):
  serial: 8250: don't bind to SMSC IrCC IR port

Marc Zyngier (2):
  arm64: KVM: Fix host crash when injecting a fault into a 32bit guest
  arm64: KVM: Disable virtual timer even if the guest is not using it

Marcelo Ricardo Leitner (1):
  sctp: fix race on protocol/netns initialization

Mark Rustad (2):
  PCI: Add dev_flags bit to access VPD through function 0
  PCI: Add VPD function 0 quirk for Intel Ethernet devices

Masahiro Yamada (1):
  devres: fix devres_get()

Matthijs Kooijman (1):
  USB: ftdi_sio: Added custom PID for CustomWare products

Max Filippov (2):
  xtensa: fix threadptr reload on return to userspace
  xtensa: fix kernel register spilling

Michael Ellerman (1):
  powerpc/mm: Fix pte_pagesize_index() crash on 4K w/64K hash

Mike Marciniszyn (1):
  IB/qib: Change lkey table allocation to support more MRs

Mikulas Patocka (1):
  hpfs: update ctime and mtime on directory modification

Minfei Huang (1):
  x86/mm: Initialize pmd_idx in page_table_range_init_count()

Neil Brown (1):
  md: flush ->event_work before stopping array.

NeilBrown (2):
  NFSv4: don't set SETATTR for O_RDONLY|O_EXCL
  md/raid10: always set reshape_safe when initializing reshape_position.

Noa Osherovich (1):
  IB/mlx4: Use correct SL on AH query under RoCE

Paul Mackerras (1):
  powerpc/MSI: Fix race condition in tearing down MSI interrupts

Peter Chen (1):
  usb: host: ehci-sys: delete useless bus_to_hcd conversion

Philipp Hachtmann (1):
  USB: symbolserial: Use usb_get_serial_port_data

Richard Laing (1):
  net/ipv6: Correct PIM6 mrt_lock handling

Sakari Ailus (1):
  v4l: omap3isp: Fix sub-device power management code

Stephen Chandler Paul (1):
  DRM - radeon: Don't link train DisplayPort on HPD until we get the
    dpcd

Sudip Mukherjee (1):
  auxdisplay: ks0108: fix refcount

Takashi Iwai (3):
  Input: evdev - do not report errors form flush()
  ALSA: hda - Enable headphone jack detect on old Fujitsu laptops
  ALSA: hda - Use ALC880_FIXUP_FUJITSU for FSC Amilo M1437

Thomas Huth (1):
  powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

Trond Myklebust (1):
  NFS: nfs_set_pgio_error sometimes misses errors

Vignesh R (1):
  ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP

Will Deacon (3):
  arm64: compat: fix vfp save/restore across signal handlers in
    big-endian
  arm64: head.S: initialise mdcr_el2 in el2_setup
  arm64: errata: add module build workaround for erratum #843419

Wilson Kok (1):
  fib_rules: fix fib rule dumps across multiple skbs

Xiao Guangrong (1):
  KVM: MMU: fix validation of mmio page fault

Yishai Hadas (1):
  IB/uverbs: Fix race between ib_uverbs_open and remove_one

huaibin Wang (1):
  ip6_gre: release cached dst on tunnel removal

 arch/arm/mach-omap2/clockdomains7xx_data.c        |   2 +-
 arch/arm64/Kconfig                                |  20 +++
 arch/arm64/Makefile                               |   4 +
 arch/arm64/kernel/head.S                          |   5 +
 arch/arm64/kernel/module.c                        |   2 +
 arch/arm64/kernel/signal32.c                      |  47 +++--
 arch/arm64/kvm/hyp.S                              |   5 +-
 arch/arm64/kvm/inject_fault.c                     |  12 +-
 arch/parisc/kernel/irq.c                          |   8 +-
 arch/powerpc/include/asm/pgtable-ppc64.h          |  14 +-
 arch/powerpc/include/asm/rtas.h                   |   1 +
 arch/powerpc/kernel/rtas.c                        |  17 ++
 arch/powerpc/mm/hugepage-hash64.c                 |   3 +-
 arch/powerpc/platforms/powernv/pci.c              |   5 +-
 arch/powerpc/platforms/pseries/ras.c              |   3 +-
 arch/powerpc/sysdev/fsl_msi.c                     |   5 +-
 arch/powerpc/sysdev/mpic_pasemi_msi.c             |   6 +-
 arch/powerpc/sysdev/mpic_u3msi.c                  |   5 +-
 arch/powerpc/sysdev/ppc4xx_msi.c                  |   5 +-
 arch/x86/crypto/ghash-clmulni-intel_glue.c        |   1 +
 arch/x86/kernel/entry_64.S                        | 201 +++++++++++++---------
 arch/x86/kernel/nmi.c                             |   4 +-
 arch/x86/kvm/mmu.c                                |  45 -----
 arch/x86/mm/init_32.c                             |   1 +
 arch/xtensa/include/asm/traps.h                   |  29 ++--
 arch/xtensa/kernel/entry.S                        |   7 +-
 drivers/auxdisplay/ks0108.c                       |   1 +
 drivers/base/devres.c                             |   4 +-
 drivers/base/platform.c                           |   8 +-
 drivers/base/regmap/regcache-rbtree.c             |  19 +-
 drivers/clk/versatile/clk-sp810.c                 |   4 +-
 drivers/crypto/caam/caamhash.c                    |   7 +-
 drivers/gpu/drm/qxl/qxl_display.c                 |  66 ++++---
 drivers/gpu/drm/qxl/qxl_drv.h                     |   2 +
 drivers/gpu/drm/radeon/radeon_combios.c           |   8 +
 drivers/gpu/drm/radeon/radeon_connectors.c        |   5 +
 drivers/hid/usbhid/hid-core.c                     |   2 +-
 drivers/iio/imu/adis16480.c                       |  39 ++++-
 drivers/infiniband/core/uverbs.h                  |   3 +-
 drivers/infiniband/core/uverbs_cmd.c              |  10 +-
 drivers/infiniband/core/uverbs_main.c             |  43 +++--
 drivers/infiniband/hw/mlx4/ah.c                   |   6 +-
 drivers/infiniband/hw/mlx4/sysfs.c                |   5 +-
 drivers/infiniband/hw/qib/qib_keys.c              |   4 +
 drivers/infiniband/hw/qib/qib_verbs.c             |  14 +-
 drivers/infiniband/hw/qib/qib_verbs.h             |   2 +
 drivers/input/evdev.c                             |  13 +-
 drivers/md/md.c                                   |   2 +
 drivers/md/raid10.c                               |   5 +-
 drivers/media/platform/omap3isp/isp.c             |   4 +-
 drivers/media/rc/rc-main.c                        |   3 -
 drivers/mmc/core/core.c                           |   6 +-
 drivers/net/ethernet/broadcom/tg3.c               |   2 +-
 drivers/net/ethernet/stmicro/stmmac/descs.h       |   2 +
 drivers/net/ethernet/stmicro/stmmac/enh_desc.c    |   3 +-
 drivers/net/ethernet/stmicro/stmmac/norm_desc.c   |   3 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |  44 ++---
 drivers/net/usb/usbnet.c                          |   7 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c       |   1 +
 drivers/of/address.c                              |   6 +-
 drivers/pci/access.c                              |  61 ++++++-
 drivers/pci/quirks.c                              |  18 +-
 drivers/scsi/libfc/fc_fcp.c                       |  19 +-
 drivers/staging/comedi/drivers/adl_pci7x3x.c      |  15 +-
 drivers/staging/comedi/drivers/usbduxsigma.c      |  99 +++++------
 drivers/tty/serial/8250/8250_pnp.c                |   5 +
 drivers/tty/vt/consolemap.c                       |   7 +
 drivers/usb/dwc3/ep0.c                            |  12 +-
 drivers/usb/host/ehci-sysfs.c                     |   8 +-
 drivers/usb/serial/ftdi_sio.c                     |   4 +
 drivers/usb/serial/ftdi_sio_ids.h                 |   8 +
 drivers/usb/serial/symbolserial.c                 |   6 +-
 drivers/xen/gntdev.c                              |  40 ++---
 fs/btrfs/transaction.c                            |   3 +
 fs/coredump.c                                     |  38 +++-
 fs/dcache.c                                       |   7 +
 fs/ext4/extents.c                                 |  17 +-
 fs/hfs/bnode.c                                    |   9 +-
 fs/hfs/brec.c                                     |  20 ++-
 fs/hfsplus/bnode.c                                |   3 -
 fs/hpfs/namei.c                                   |  25 ++-
 fs/namei.c                                        |  31 +++-
 fs/nfs/nfs4proc.c                                 |   2 +-
 fs/nfs/pagelist.c                                 |   4 +-
 include/linux/iio/iio.h                           |  17 ++
 include/linux/pci.h                               |   2 +
 kernel/fork.c                                     |  28 +--
 mm/vmscan.c                                       |   2 +-
 net/core/fib_rules.c                              |  14 +-
 net/ipv6/exthdrs_offload.c                        |   2 +-
 net/ipv6/ip6_gre.c                                |   1 +
 net/ipv6/ip6mr.c                                  |   2 +-
 net/mac80211/tx.c                                 |   3 -
 net/netlink/af_netlink.c                          |  30 +++-
 net/netlink/af_netlink.h                          |   9 +
 net/openvswitch/datapath.c                        |   2 +-
 net/openvswitch/flow.c                            |  21 ++-
 net/openvswitch/flow.h                            |   2 +-
 net/sctp/protocol.c                               |  64 ++++---
 sound/pci/hda/patch_realtek.c                     |   6 +-
 100 files changed, 991 insertions(+), 485 deletions(-)

-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1238296 — [PATCH 3.12 01/84] PCI: Add dev_flags bit to access VPD through function 0

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 01/84] PCI: Add dev_flags bit to access VPD through function 0
Message-ID<qf8zn-4Bq-3@gated-at.bofh.it>
In reply to#1238289
From: Mark Rustad <mark.d.rustad@intel.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 932c435caba8a2ce473a91753bad0173269ef334 upstream.

Add a dev_flags bit, PCI_DEV_FLAGS_VPD_REF_F0, to access VPD through
function 0 to provide VPD access on other functions.  This is for hardware
devices that provide copies of the same VPD capability registers in
multiple functions.  Because the kernel expects that each function has its
own registers, both the locking and the state tracking are affected by VPD
accesses to different functions.

On such devices for example, if a VPD write is performed on function 0,
*any* later attempt to read VPD from any other function of that device will
hang.  This has to do with how the kernel tracks the expected value of the
F bit per function.

Concurrent accesses to different functions of the same device can not only
hang but also corrupt both read and write VPD data.

When hangs occur, typically the error message:

  vpd r/w failed.  This is likely a firmware bug on this device.

will be seen.

Never set this bit on function 0 or there will be an infinite recursion.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/pci/access.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/pci.h  |  2 ++
 2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 0857ca981fae..6bc9b12ba42a 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -359,6 +359,56 @@ static const struct pci_vpd_ops pci_vpd_pci22_ops = {
 	.release = pci_vpd_pci22_release,
 };
 
+static ssize_t pci_vpd_f0_read(struct pci_dev *dev, loff_t pos, size_t count,
+			       void *arg)
+{
+	struct pci_dev *tdev = pci_get_slot(dev->bus, PCI_SLOT(dev->devfn));
+	ssize_t ret;
+
+	if (!tdev)
+		return -ENODEV;
+
+	ret = pci_read_vpd(tdev, pos, count, arg);
+	pci_dev_put(tdev);
+	return ret;
+}
+
+static ssize_t pci_vpd_f0_write(struct pci_dev *dev, loff_t pos, size_t count,
+				const void *arg)
+{
+	struct pci_dev *tdev = pci_get_slot(dev->bus, PCI_SLOT(dev->devfn));
+	ssize_t ret;
+
+	if (!tdev)
+		return -ENODEV;
+
+	ret = pci_write_vpd(tdev, pos, count, arg);
+	pci_dev_put(tdev);
+	return ret;
+}
+
+static const struct pci_vpd_ops pci_vpd_f0_ops = {
+	.read = pci_vpd_f0_read,
+	.write = pci_vpd_f0_write,
+	.release = pci_vpd_pci22_release,
+};
+
+static int pci_vpd_f0_dev_check(struct pci_dev *dev)
+{
+	struct pci_dev *tdev = pci_get_slot(dev->bus, PCI_SLOT(dev->devfn));
+	int ret = 0;
+
+	if (!tdev)
+		return -ENODEV;
+	if (!tdev->vpd || !tdev->multifunction ||
+	    dev->class != tdev->class || dev->vendor != tdev->vendor ||
+	    dev->device != tdev->device)
+		ret = -ENODEV;
+
+	pci_dev_put(tdev);
+	return ret;
+}
+
 int pci_vpd_pci22_init(struct pci_dev *dev)
 {
 	struct pci_vpd_pci22 *vpd;
@@ -367,12 +417,21 @@ int pci_vpd_pci22_init(struct pci_dev *dev)
 	cap = pci_find_capability(dev, PCI_CAP_ID_VPD);
 	if (!cap)
 		return -ENODEV;
+	if (dev->dev_flags & PCI_DEV_FLAGS_VPD_REF_F0) {
+		int ret = pci_vpd_f0_dev_check(dev);
+
+		if (ret)
+			return ret;
+	}
 	vpd = kzalloc(sizeof(*vpd), GFP_ATOMIC);
 	if (!vpd)
 		return -ENOMEM;
 
 	vpd->base.len = PCI_VPD_PCI22_SIZE;
-	vpd->base.ops = &pci_vpd_pci22_ops;
+	if (dev->dev_flags & PCI_DEV_FLAGS_VPD_REF_F0)
+		vpd->base.ops = &pci_vpd_f0_ops;
+	else
+		vpd->base.ops = &pci_vpd_pci22_ops;
 	mutex_init(&vpd->lock);
 	vpd->cap = cap;
 	vpd->busy = false;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 573c04929bd1..b11e6e280f15 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -170,6 +170,8 @@ enum pci_dev_flags {
 	PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
 	/* Provide indication device is assigned by a Virtual Machine Manager */
 	PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4,
+	/* Get VPD from function 0 VPD */
+	PCI_DEV_FLAGS_VPD_REF_F0 = (__force pci_dev_flags_t) (1 << 8),
 };
 
 enum pci_irq_reroute_variant {
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238297 — [PATCH 3.12 09/84] crypto: caam - fix memory corruption in ahash_final_ctx

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 09/84] crypto: caam - fix memory corruption in ahash_final_ctx
Message-ID<qf92s-5aj-55@gated-at.bofh.it>
In reply to#1238296
From: Horia Geant? <horia.geanta@freescale.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit b310c178e6d897f82abb9da3af1cd7c02b09f592 upstream.

When doing pointer operation for accessing the HW S/G table,
a value representing number of entries (and not number of bytes)
must be used.

Fixes: 045e36780f115 ("crypto: caam - ahash hmac support")
Signed-off-by: Horia Geant? <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/crypto/caam/caamhash.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index af351f478b14..92d2116bf1ad 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -897,13 +897,14 @@ static int ahash_final_ctx(struct ahash_request *req)
 			  state->buflen_1;
 	u32 *sh_desc = ctx->sh_desc_fin, *desc;
 	dma_addr_t ptr = ctx->sh_desc_fin_dma;
-	int sec4_sg_bytes;
+	int sec4_sg_bytes, sec4_sg_src_index;
 	int digestsize = crypto_ahash_digestsize(ahash);
 	struct ahash_edesc *edesc;
 	int ret = 0;
 	int sh_len;
 
-	sec4_sg_bytes = (1 + (buflen ? 1 : 0)) * sizeof(struct sec4_sg_entry);
+	sec4_sg_src_index = 1 + (buflen ? 1 : 0);
+	sec4_sg_bytes = sec4_sg_src_index * sizeof(struct sec4_sg_entry);
 
 	/* allocate space for base edesc and hw desc commands, link tables */
 	edesc = kmalloc(sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN +
@@ -930,7 +931,7 @@ static int ahash_final_ctx(struct ahash_request *req)
 	state->buf_dma = try_buf_map_to_sec4_sg(jrdev, edesc->sec4_sg + 1,
 						buf, state->buf_dma, buflen,
 						last_buflen);
-	(edesc->sec4_sg + sec4_sg_bytes - 1)->len |= SEC4_SG_LEN_FIN;
+	(edesc->sec4_sg + sec4_sg_src_index - 1)->len |= SEC4_SG_LEN_FIN;
 
 	append_seq_in_ptr(desc, edesc->sec4_sg_dma, ctx->ctx_len + buflen,
 			  LDST_SGF);
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238298 — [PATCH 3.12 20/84] usb: host: ehci-sys: delete useless bus_to_hcd conversion

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 20/84] usb: host: ehci-sys: delete useless bus_to_hcd conversion
Message-ID<qf92t-5aj-63@gated-at.bofh.it>
In reply to#1238296
From: Peter Chen <peter.chen@freescale.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 0521cfd06e1ebcd575e7ae36aab068b38df23850 upstream.

The ehci platform device's drvdata is the pointer of struct usb_hcd
already, so we doesn't need to call bus_to_hcd conversion again.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/usb/host/ehci-sysfs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-sysfs.c b/drivers/usb/host/ehci-sysfs.c
index 14ced00ba220..0659024290af 100644
--- a/drivers/usb/host/ehci-sysfs.c
+++ b/drivers/usb/host/ehci-sysfs.c
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,
 	int			count = PAGE_SIZE;
 	char			*ptr = buf;
 
-	ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+	ehci = hcd_to_ehci(dev_get_drvdata(dev));
 	nports = HCS_N_PORTS(ehci->hcs_params);
 
 	for (index = 0; index < nports; ++index) {
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,
 	struct ehci_hcd		*ehci;
 	int			portnum, new_owner;
 
-	ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+	ehci = hcd_to_ehci(dev_get_drvdata(dev));
 	new_owner = PORT_OWNER;		/* Owned by companion */
 	if (sscanf(buf, "%d", &portnum) != 1)
 		return -EINVAL;
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,
 	struct ehci_hcd		*ehci;
 	int			n;
 
-	ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+	ehci = hcd_to_ehci(dev_get_drvdata(dev));
 	n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max);
 	return n;
 }
@@ -102,7 +102,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,
 	unsigned long		flags;
 	ssize_t			ret;
 
-	ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+	ehci = hcd_to_ehci(dev_get_drvdata(dev));
 	if (kstrtouint(buf, 0, &uframe_periodic_max) < 0)
 		return -EINVAL;
 
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238299 — [PATCH 3.12 02/84] PCI: Add VPD function 0 quirk for Intel Ethernet devices

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 02/84] PCI: Add VPD function 0 quirk for Intel Ethernet devices
Message-ID<qf92t-5aj-65@gated-at.bofh.it>
In reply to#1238296
From: Mark Rustad <mark.d.rustad@intel.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 7aa6ca4d39edf01f997b9e02cf6d2fdeb224f351 upstream.

Set the PCI_DEV_FLAGS_VPD_REF_F0 flag on all Intel Ethernet device
functions other than function 0, so that on multi-function devices, we will
always read VPD from function 0 instead of from the other functions.

[bhelgaas: changelog]
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/pci/quirks.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index a7b7eeaf35e8..877bfbb4e55c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1849,6 +1849,15 @@ static void quirk_netmos(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID,
 			 PCI_CLASS_COMMUNICATION_SERIAL, 8, quirk_netmos);
 
+static void quirk_f0_vpd_link(struct pci_dev *dev)
+{
+	if (!dev->multifunction || !PCI_FUNC(dev->devfn))
+		return;
+	dev->dev_flags |= PCI_DEV_FLAGS_VPD_REF_F0;
+}
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
+			      PCI_CLASS_NETWORK_ETHERNET, 8, quirk_f0_vpd_link);
+
 static void quirk_e100_interrupt(struct pci_dev *dev)
 {
 	u16 command, pmcsr;
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238302 — [PATCH 3.12 10/84] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 10/84] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest
Message-ID<qf92t-5aj-67@gated-at.bofh.it>
In reply to#1238296
From: Marc Zyngier <marc.zyngier@arm.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 126c69a0bd0e441bf6766a5d9bf20de011be9f68 upstream.

When injecting a fault into a misbehaving 32bit guest, it seems
rather idiotic to also inject a 64bit fault that is only going
to corrupt the guest state. This leads to a situation where we
perform an illegal exception return at EL2 causing the host
to crash instead of killing the guest.

Just fix the stupid bug that has been there from day 1.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/arm64/kvm/inject_fault.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c
index 81a02a8762b0..86825f8883de 100644
--- a/arch/arm64/kvm/inject_fault.c
+++ b/arch/arm64/kvm/inject_fault.c
@@ -168,8 +168,8 @@ void kvm_inject_dabt(struct kvm_vcpu *vcpu, unsigned long addr)
 {
 	if (!(vcpu->arch.hcr_el2 & HCR_RW))
 		inject_abt32(vcpu, false, addr);
-
-	inject_abt64(vcpu, false, addr);
+	else
+		inject_abt64(vcpu, false, addr);
 }
 
 /**
@@ -184,8 +184,8 @@ void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr)
 {
 	if (!(vcpu->arch.hcr_el2 & HCR_RW))
 		inject_abt32(vcpu, true, addr);
-
-	inject_abt64(vcpu, true, addr);
+	else
+		inject_abt64(vcpu, true, addr);
 }
 
 /**
@@ -198,6 +198,6 @@ void kvm_inject_undefined(struct kvm_vcpu *vcpu)
 {
 	if (!(vcpu->arch.hcr_el2 & HCR_RW))
 		inject_undef32(vcpu);
-
-	inject_undef64(vcpu);
+	else
+		inject_undef64(vcpu);
 }
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238303 — [PATCH 3.12 07/84] libfc: Fix fc_fcp_cleanup_each_cmd()

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 07/84] libfc: Fix fc_fcp_cleanup_each_cmd()
Message-ID<qf92t-5aj-73@gated-at.bofh.it>
In reply to#1238296
From: Bart Van Assche <bart.vanassche@sandisk.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 8f2777f53e3d5ad8ef2a176a4463a5c8e1a16431 upstream.

Since fc_fcp_cleanup_cmd() can sleep this function must not
be called while holding a spinlock. This patch avoids that
fc_fcp_cleanup_each_cmd() triggers the following bug:

BUG: scheduling while atomic: sg_reset/1512/0x00000202
1 lock held by sg_reset/1512:
 #0:  (&(&fsp->scsi_pkt_lock)->rlock){+.-...}, at: [<ffffffffc0225cd5>] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
Preemption disabled at:[<ffffffffc0225cd5>] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
Call Trace:
 [<ffffffff816c612c>] dump_stack+0x4f/0x7b
 [<ffffffff810828bc>] __schedule_bug+0x6c/0xd0
 [<ffffffff816c87aa>] __schedule+0x71a/0xa10
 [<ffffffff816c8ad2>] schedule+0x32/0x80
 [<ffffffffc0217eac>] fc_seq_set_resp+0xac/0x100 [libfc]
 [<ffffffffc0218b11>] fc_exch_done+0x41/0x60 [libfc]
 [<ffffffffc0225cff>] fc_fcp_cleanup_each_cmd.isra.21+0xcf/0x150 [libfc]
 [<ffffffffc0225f43>] fc_eh_device_reset+0x1c3/0x270 [libfc]
 [<ffffffff814a2cc9>] scsi_try_bus_device_reset+0x29/0x60
 [<ffffffff814a3908>] scsi_ioctl_reset+0x258/0x2d0
 [<ffffffff814a2650>] scsi_ioctl+0x150/0x440
 [<ffffffff814b3a9d>] sd_ioctl+0xad/0x120
 [<ffffffff8132f266>] blkdev_ioctl+0x1b6/0x810
 [<ffffffff811da608>] block_ioctl+0x38/0x40
 [<ffffffff811b4e08>] do_vfs_ioctl+0x2f8/0x530
 [<ffffffff811b50c1>] SyS_ioctl+0x81/0xa0
 [<ffffffff816cf8b2>] system_call_fastpath+0x16/0x7a

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/scsi/libfc/fc_fcp.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 5fd0f1fbe586..5fec5db1e329 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1039,11 +1039,26 @@ restart:
 		fc_fcp_pkt_hold(fsp);
 		spin_unlock_irqrestore(&si->scsi_queue_lock, flags);
 
-		if (!fc_fcp_lock_pkt(fsp)) {
+		spin_lock_bh(&fsp->scsi_pkt_lock);
+		if (!(fsp->state & FC_SRB_COMPL)) {
+			fsp->state |= FC_SRB_COMPL;
+			/*
+			 * TODO: dropping scsi_pkt_lock and then reacquiring
+			 * again around fc_fcp_cleanup_cmd() is required,
+			 * since fc_fcp_cleanup_cmd() calls into
+			 * fc_seq_set_resp() and that func preempts cpu using
+			 * schedule. May be schedule and related code should be
+			 * removed instead of unlocking here to avoid scheduling
+			 * while atomic bug.
+			 */
+			spin_unlock_bh(&fsp->scsi_pkt_lock);
+
 			fc_fcp_cleanup_cmd(fsp, error);
+
+			spin_lock_bh(&fsp->scsi_pkt_lock);
 			fc_io_compl(fsp);
-			fc_fcp_unlock_pkt(fsp);
 		}
+		spin_unlock_bh(&fsp->scsi_pkt_lock);
 
 		fc_fcp_pkt_release(fsp);
 		spin_lock_irqsave(&si->scsi_queue_lock, flags);
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238304 — [PATCH 3.12 04/84] staging: comedi: usbduxsigma: don't clobber ao_timer in command test

FromJiri Slaby <jslaby@suse.cz>
Date2015-10-02 16:00 +0200
Subject[PATCH 3.12 04/84] staging: comedi: usbduxsigma: don't clobber ao_timer in command test
Message-ID<qf92t-5aj-75@gated-at.bofh.it>
In reply to#1238296
From: Ian Abbott <abbotti@mev.co.uk>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit c04a1f17803e0d3eeada586ca34a6b436959bc20 upstream

`devpriv->ao_timer` is used while an asynchronous command is running on
the AO subdevice.  It also gets modified by the subdevice's `cmdtest`
handler for checking new asynchronous commands,
`usbduxsigma_ao_cmdtest()`, which is not correct as it's allowed to
check new commands while an old command is still running.  Fix it by
moving the code which sets up `devpriv->ao_timer` into the subdevice's
`cmd` handler, `usbduxsigma_ao_cmd()`.

** This backported patch also moves the code that sets up
`devpriv->ao_sample_count` and `devpriv->ao_continuous` from
`usbduxsigma_ao_cmdtest()` to `usbduxsigma_ao_cmd()` for the same reason
as above.  (This was not needed in the upstream commit.) **

Note that the removed code in `usbduxsigma_ao_cmdtest()` checked that
`devpriv->ao_timer` did not end up less that 1, but that could not
happen due because `cmd->scan_begin_arg` or `cmd->convert_arg` had
already been range-checked.

Also note that we tested the `high_speed` variable in the old code, but
that is currently always 0 and means that we always use "scan" timing
(`cmd->scan_begin_src == TRIG_TIMER` and `cmd->convert_src == TRIG_NOW`)
and never "convert" (individual sample) timing (`cmd->scan_begin_src ==
TRIG_FOLLOW` and `cmd->convert_src == TRIG_TIMER`).  The moved code
tests `cmd->convert_src` instead to decide whether "scan" or "convert"
timing is being used, although currently only "scan" timing is
supported.

Fixes: fb1ef622e7a3 ("staging: comedi: usbduxsigma: tidy up analog output command support")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/staging/comedi/drivers/usbduxsigma.c | 41 ++++++++++++----------------
 1 file changed, 17 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c
index c61a1b9d7cd8..580c1358eb84 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -950,10 +950,24 @@ static int usbduxsigma_ao_cmdtest(struct comedi_device *dev,
 	if (err)
 		return 3;
 
-	/* Step 4: fix up any arguments */
+	return 0;
+}
+
+static int usbduxsigma_ao_cmd(struct comedi_device *dev,
+			      struct comedi_subdevice *s)
+{
+	struct usbduxsigma_private *devpriv = dev->private;
+	struct comedi_cmd *cmd = &s->async->cmd;
+	int ret;
+	int i;
+
+	down(&devpriv->sem);
+
+	/* set current channel of the running acquisition to zero */
+	s->async->cur_chan = 0;
 
 	/* we count in timer steps */
-	if (high_speed) {
+	if (cmd->convert_src == TRIG_TIMER) {
 		/* timing of the conversion itself: every 125 us */
 		devpriv->ao_timer = cmd->convert_arg / 125000;
 	} else {
@@ -963,12 +977,9 @@ static int usbduxsigma_ao_cmdtest(struct comedi_device *dev,
 		 */
 		devpriv->ao_timer = cmd->scan_begin_arg / 1000000;
 	}
-	if (devpriv->ao_timer < 1)
-		err |= -EINVAL;
-
 	if (cmd->stop_src == TRIG_COUNT) {
 		/* not continuous, use counter */
-		if (high_speed) {
+		if (cmd->convert_src == TRIG_TIMER) {
 			/* high speed also scans everything at once */
 			devpriv->ao_sample_count = cmd->stop_arg *
 						   cmd->scan_end_arg;
@@ -987,24 +998,6 @@ static int usbduxsigma_ao_cmdtest(struct comedi_device *dev,
 		devpriv->ao_sample_count = 0;
 	}
 
-	if (err)
-		return 4;
-
-	return 0;
-}
-
-static int usbduxsigma_ao_cmd(struct comedi_device *dev,
-			      struct comedi_subdevice *s)
-{
-	struct usbduxsigma_private *devpriv = dev->private;
-	struct comedi_cmd *cmd = &s->async->cmd;
-	int ret;
-	int i;
-
-	down(&devpriv->sem);
-
-	/* set current channel of the running acquisition to zero */
-	s->async->cur_chan = 0;
 	for (i = 0; i < cmd->chanlist_len; ++i)
 		devpriv->ao_chanlist[i] = CR_CHAN(cmd->chanlist[i]);
 
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238367

FromShuah Khan <shuahkh@osg.samsung.com>
Date2015-10-02 17:40 +0200
Message-ID<qfaBc-7ua-5@gated-at.bofh.it>
In reply to#1238289
On 10/02/2015 07:25 AM, Jiri Slaby wrote:
> This is the start of the stable review cycle for the 3.12.49 release.
> There are 84 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Tue Oct  6 15:25:04 CEST 2015.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	http://kernel.org/pub/linux/kernel/people/jirislaby/stable-review/patch-3.12.49-rc1.xz
> and the diffstat can be found below.
> 

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238383

FromGuenter Roeck <linux@roeck-us.net>
Date2015-10-02 18:10 +0200
Message-ID<qfb4d-8hp-15@gated-at.bofh.it>
In reply to#1238289
On 10/02/2015 06:25 AM, Jiri Slaby wrote:
> This is the start of the stable review cycle for the 3.12.49 release.
> There are 84 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue Oct  6 15:25:04 CEST 2015.
> Anything received after that time might be too late.
>

Build results:
	total: 123 pass: 123 fail: 0
Qemu test results:
	total: 76 pass: 76 fail: 0

Details are available at http://server.roeck-us.net:8010/builders.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web