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


Groups > linux.kernel > #1636580 > unrolled thread

[PATCH 4.4 00/20] 4.4.67-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-05-05 20:40 +0200
Last post2017-05-08 00:10 +0200
Articles 12 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.4 00/20] 4.4.67-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 10/20] scsi: cxlflash: Improve EEH recovery time Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 19/20] nfsd4: minor NFSv2/v3 write decoding cleanup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 12/20] netlink: Allow direct reclaim for fallback allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 14/20] IB/ehca: fix maybe-uninitialized warnings Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 13/20] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 17/20] ext4 crypto: use dget_parent() in ext4_d_revalidate() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 18/20] ext4/fscrypto: avoid RCU lookup in d_revalidate Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    [PATCH 4.4 03/20] ASoC: intel: Fix PM and non-atomic crash in bytcr drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
    Re: [PATCH 4.4 00/20] 4.4.67-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-05-06 04:00 +0200
      Re: [PATCH 4.4 00/20] 4.4.67-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-06 05:50 +0200
    Re: [PATCH 4.4 00/20] 4.4.67-stable review Guenter Roeck <linux@roeck-us.net> - 2017-05-08 00:10 +0200

#1636580 — [PATCH 4.4 00/20] 4.4.67-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 00/20] 4.4.67-stable review
Message-ID<tDQiZ-5qv-3@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.4.67 release.
There are 20 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 Sun May  7 18:32:22 UTC 2017.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.67-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.4.67-rc1

J. Bruce Fields <bfields@redhat.com>
    nfsd: stricter decoding of write-like NFSv2/v3 ops

J. Bruce Fields <bfields@redhat.com>
    nfsd4: minor NFSv2/v3 write decoding cleanup

Jaegeuk Kim <jaegeuk@kernel.org>
    ext4/fscrypto: avoid RCU lookup in d_revalidate

Theodore Ts'o <tytso@mit.edu>
    ext4 crypto: use dget_parent() in ext4_d_revalidate()

Theodore Ts'o <tytso@mit.edu>
    ext4 crypto: revalidate dentry after adding or removing the key

Richard Weinberger <richard@nod.at>
    ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY

Arnd Bergmann <arnd@arndb.de>
    IB/ehca: fix maybe-uninitialized warnings

Arnd Bergmann <arnd@arndb.de>
    IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE

Ross Lagerwall <ross.lagerwall@citrix.com>
    netlink: Allow direct reclaim for fallback allocation

Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
    8250_pci: Fix potential use-after-free in error path

Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
    scsi: cxlflash: Improve EEH recovery time

Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
    scsi: cxlflash: Fix to avoid EEH and host reset collisions

Uma Krishnan <ukrishn@linux.vnet.ibm.com>
    scsi: cxlflash: Scan host only after the port is ready for I/O

Arnd Bergmann <arnd@arndb.de>
    net: tg3: avoid uninitialized variable warning

Arnd Bergmann <arnd@arndb.de>
    mtd: avoid stack overflow in MTD CFI code

Lars Ellenberg <lars.ellenberg@linbit.com>
    drbd: avoid redefinition of BITS_PER_PAGE

Arnd Bergmann <arnd@arndb.de>
    ALSA: ppc/awacs: shut up maybe-uninitialized warning

Takashi Iwai <tiwai@suse.de>
    ASoC: intel: Fix PM and non-atomic crash in bytcr drivers

Sachin Prabhu <sprabhu@redhat.com>
    Handle mismatched open calls

Thomas Gleixner <tglx@linutronix.de>
    timerfd: Protect the might cancel mechanism proper


-------------

Diffstat:

 Makefile                              |  4 +--
 drivers/block/drbd/drbd_bitmap.c      |  6 ++++
 drivers/infiniband/hw/qib/qib_qp.c    | 18 +++++------
 drivers/mtd/chips/Kconfig             |  1 +
 drivers/net/ethernet/broadcom/tg3.c   |  2 +-
 drivers/scsi/cxlflash/main.c          | 23 ++++++++++++--
 drivers/staging/rdma/ehca/ehca_mrmw.c |  3 +-
 drivers/tty/serial/8250/8250_pci.c    | 12 +++----
 fs/cifs/cifsglob.h                    | 11 +++++++
 fs/cifs/cifssmb.c                     |  4 +++
 fs/cifs/connect.c                     | 13 ++++++--
 fs/cifs/smb2misc.c                    | 44 ++++++++++++++++++++++++++
 fs/cifs/smb2ops.c                     |  4 +++
 fs/cifs/smb2proto.h                   |  7 +++++
 fs/cifs/smb2transport.c               | 58 ++++++++++++++++++++++++++++++----
 fs/cifs/transport.c                   |  2 ++
 fs/ext4/crypto.c                      | 59 +++++++++++++++++++++++++++++++++++
 fs/ext4/dir.c                         |  6 ++++
 fs/ext4/ext4.h                        |  1 +
 fs/ext4/ioctl.c                       |  3 ++
 fs/ext4/namei.c                       | 18 +++++++++++
 fs/nfsd/nfs3xdr.c                     | 12 ++++---
 fs/nfsd/nfsxdr.c                      | 10 +++---
 fs/timerfd.c                          | 17 ++++++++--
 include/linux/mtd/map.h               | 19 +++++------
 net/netlink/af_netlink.c              |  2 +-
 sound/ppc/awacs.c                     |  1 +
 sound/soc/intel/boards/bytcr_rt5640.c |  3 +-
 28 files changed, 307 insertions(+), 56 deletions(-)

[toc] | [next] | [standalone]


#1636583 — [PATCH 4.4 10/20] scsi: cxlflash: Improve EEH recovery time

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 10/20] scsi: cxlflash: Improve EEH recovery time
Message-ID<tDQj2-5qv-63@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>

commit 05dab43230fdc0d14ca885b473a2740fe017ecb1 upstream.

When an EEH occurs during device initialization, the port timeout logic
can cause excessive delays as MMIO reads will fail. Depending on where
they are experienced, these delays can lead to a prolonged reset,
causing an unnecessary triggering of other timeout logic in the SCSI
stack or user applications.

To expedite recovery, the port timeout logic is updated to decay the
timeout at a much faster rate when in the presence of a likely EEH
frozen event.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Acked-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/cxlflash/main.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -996,6 +996,8 @@ static int wait_port_online(__be64 __iom
 	do {
 		msleep(delay_us / 1000);
 		status = readq_be(&fc_regs[FC_MTIP_STATUS / 8]);
+		if (status == U64_MAX)
+			nretry /= 2;
 	} while ((status & FC_MTIP_STATUS_MASK) != FC_MTIP_STATUS_ONLINE &&
 		 nretry--);
 
@@ -1027,6 +1029,8 @@ static int wait_port_offline(__be64 __io
 	do {
 		msleep(delay_us / 1000);
 		status = readq_be(&fc_regs[FC_MTIP_STATUS / 8]);
+		if (status == U64_MAX)
+			nretry /= 2;
 	} while ((status & FC_MTIP_STATUS_MASK) != FC_MTIP_STATUS_OFFLINE &&
 		 nretry--);
 

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


#1636584 — [PATCH 4.4 19/20] nfsd4: minor NFSv2/v3 write decoding cleanup

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 19/20] nfsd4: minor NFSv2/v3 write decoding cleanup
Message-ID<tDQj2-5qv-65@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: J. Bruce Fields <bfields@redhat.com>

commit db44bac41bbfc0c0d9dd943092d8bded3c9db19b upstream.

Use a couple shortcuts that will simplify a following bugfix.

(Minor backporting required to account for a change from f34b95689d2c
"The NFSv2/NFSv3 server does not handle zero length WRITE requests
correctly".)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 fs/nfsd/nfs3xdr.c |    8 ++++----
 fs/nfsd/nfsxdr.c  |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -358,6 +358,7 @@ nfs3svc_decode_writeargs(struct svc_rqst
 {
 	unsigned int len, v, hdr, dlen;
 	u32 max_blocksize = svc_max_payload(rqstp);
+	struct kvec *head = rqstp->rq_arg.head;
 
 	p = decode_fh(p, &args->fh);
 	if (!p)
@@ -377,9 +378,8 @@ nfs3svc_decode_writeargs(struct svc_rqst
 	 * Check to make sure that we got the right number of
 	 * bytes.
 	 */
-	hdr = (void*)p - rqstp->rq_arg.head[0].iov_base;
-	dlen = rqstp->rq_arg.head[0].iov_len + rqstp->rq_arg.page_len
-		- hdr;
+	hdr = (void*)p - head->iov_base;
+	dlen = head->iov_len + rqstp->rq_arg.page_len - hdr;
 	/*
 	 * Round the length of the data which was specified up to
 	 * the next multiple of XDR units and then compare that
@@ -396,7 +396,7 @@ nfs3svc_decode_writeargs(struct svc_rqst
 		len = args->len = max_blocksize;
 	}
 	rqstp->rq_vec[0].iov_base = (void*)p;
-	rqstp->rq_vec[0].iov_len = rqstp->rq_arg.head[0].iov_len - hdr;
+	rqstp->rq_vec[0].iov_len = head->iov_len - hdr;
 	v = 0;
 	while (len > rqstp->rq_vec[v].iov_len) {
 		len -= rqstp->rq_vec[v].iov_len;
--- a/fs/nfsd/nfsxdr.c
+++ b/fs/nfsd/nfsxdr.c
@@ -280,6 +280,7 @@ nfssvc_decode_writeargs(struct svc_rqst
 					struct nfsd_writeargs *args)
 {
 	unsigned int len, hdr, dlen;
+	struct kvec *head = rqstp->rq_arg.head;
 	int v;
 
 	p = decode_fh(p, &args->fh);
@@ -300,9 +301,8 @@ nfssvc_decode_writeargs(struct svc_rqst
 	 * Check to make sure that we got the right number of
 	 * bytes.
 	 */
-	hdr = (void*)p - rqstp->rq_arg.head[0].iov_base;
-	dlen = rqstp->rq_arg.head[0].iov_len + rqstp->rq_arg.page_len
-		- hdr;
+	hdr = (void*)p - head->iov_base;
+	dlen = head->iov_len + rqstp->rq_arg.page_len - hdr;
 
 	/*
 	 * Round the length of the data which was specified up to
@@ -316,7 +316,7 @@ nfssvc_decode_writeargs(struct svc_rqst
 		return 0;
 
 	rqstp->rq_vec[0].iov_base = (void*)p;
-	rqstp->rq_vec[0].iov_len = rqstp->rq_arg.head[0].iov_len - hdr;
+	rqstp->rq_vec[0].iov_len = head->iov_len - hdr;
 	v = 0;
 	while (len > rqstp->rq_vec[v].iov_len) {
 		len -= rqstp->rq_vec[v].iov_len;

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


#1636585 — [PATCH 4.4 12/20] netlink: Allow direct reclaim for fallback allocation

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 12/20] netlink: Allow direct reclaim for fallback allocation
Message-ID<tDQj2-5qv-71@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ross Lagerwall <ross.lagerwall@citrix.com>

The backport of d35c99ff77ec ("netlink: do not enter direct reclaim from
netlink_dump()") to the 4.4 branch (first in 4.4.32) mistakenly removed
direct claim from the initial large allocation _and_ the fallback
allocation which means that allocations can spuriously fail.
Fix the issue by adding back the direct reclaim flag to the fallback
allocation.

Fixes: 6d123f1d396b ("netlink: do not enter direct reclaim from netlink_dump()")
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

Note that this is only for the 4.4 branch as the regression is only in
this branch. Consequently, there is no corresponding upstream commit.

I'm resending this to the linux-stable list since I now understand the
netdev maintainer only handles backports for the last couple of versions
of Linux.

 net/netlink/af_netlink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2107,7 +2107,7 @@ static int netlink_dump(struct sock *sk)
 	if (!skb) {
 		alloc_size = alloc_min_size;
 		skb = netlink_alloc_skb(sk, alloc_size, nlk->portid,
-					(GFP_KERNEL & ~__GFP_DIRECT_RECLAIM));
+					GFP_KERNEL);
 	}
 	if (!skb)
 		goto errout_skb;

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


#1636586 — [PATCH 4.4 14/20] IB/ehca: fix maybe-uninitialized warnings

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 14/20] IB/ehca: fix maybe-uninitialized warnings
Message-ID<tDQj2-5qv-75@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Arnd Bergmann <arnd@arndb.de>

The driver causes two warnings about possibly uninitialized variables:

drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]

The first one is definitely a false positive, the second one may or may not
be one. In both cases, adding an intialization is the safe and easy
workaround.

The driver was removed in mainline in commit e581d111dad3
("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
and the fix still applies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/rdma/ehca/ehca_mrmw.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/staging/rdma/ehca/ehca_mrmw.c
+++ b/drivers/staging/rdma/ehca/ehca_mrmw.c
@@ -1921,7 +1921,7 @@ static int ehca_set_pagebuf_user2(struct
 				  u64 *kpage)
 {
 	int ret = 0;
-	u64 pgaddr, prev_pgaddr;
+	u64 pgaddr, prev_pgaddr = 0;
 	u32 j = 0;
 	int kpages_per_hwpage = pginfo->hwpage_size / PAGE_SIZE;
 	int nr_kpages = kpages_per_hwpage;
@@ -2417,6 +2417,7 @@ static int ehca_reg_bmap_mr_rpages(struc
 		ehca_err(&shca->ib_device, "kpage alloc failed");
 		return -ENOMEM;
 	}
+	hret = H_SUCCESS;
 	for (top = 0; top < EHCA_MAP_ENTRIES; top++) {
 		if (!ehca_bmap_valid(ehca_bmap->top[top]))
 			continue;

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


#1636587 — [PATCH 4.4 13/20] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 13/20] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE
Message-ID<tDQj2-5qv-73@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Arnd Bergmann <arnd@arndb.de>

We get this build warning on arm64

drivers/infiniband/hw/qib/qib_qp.c:44:0: error: "BITS_PER_PAGE" redefined [-Werror]
 #define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)

This is fixed upstream in commit 898fa52b4ac3 ("IB/qib: Remove qpn, qp tables and
related variables from qib"), which does a lot of other things as well.

Instead, I just backport the rename of the local BITS_PER_PAGE definition to
RVT_BITS_PER_PAGE.

The driver first showed up in linux-2.6.35, and the fixup should still apply
to that. The upstream fix went into v4.6, so we could apply this workaround
to both 3.18 and 4.4.

Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/hw/qib/qib_qp.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -41,13 +41,13 @@
 
 #include "qib.h"
 
-#define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
-#define BITS_PER_PAGE_MASK      (BITS_PER_PAGE-1)
+#define RVT_BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
+#define RVT_BITS_PER_PAGE_MASK      (RVT_BITS_PER_PAGE-1)
 
 static inline unsigned mk_qpn(struct qib_qpn_table *qpt,
 			      struct qpn_map *map, unsigned off)
 {
-	return (map - qpt->map) * BITS_PER_PAGE + off;
+	return (map - qpt->map) * RVT_BITS_PER_PAGE + off;
 }
 
 static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
@@ -59,7 +59,7 @@ static inline unsigned find_next_offset(
 		if (((off & qpt->mask) >> 1) >= n)
 			off = (off | qpt->mask) + 2;
 	} else
-		off = find_next_zero_bit(map->page, BITS_PER_PAGE, off);
+		off = find_next_zero_bit(map->page, RVT_BITS_PER_PAGE, off);
 	return off;
 }
 
@@ -147,8 +147,8 @@ static int alloc_qpn(struct qib_devdata
 		qpn = 2;
 	if (qpt->mask && ((qpn & qpt->mask) >> 1) >= dd->n_krcv_queues)
 		qpn = (qpn | qpt->mask) + 2;
-	offset = qpn & BITS_PER_PAGE_MASK;
-	map = &qpt->map[qpn / BITS_PER_PAGE];
+	offset = qpn & RVT_BITS_PER_PAGE_MASK;
+	map = &qpt->map[qpn / RVT_BITS_PER_PAGE];
 	max_scan = qpt->nmaps - !offset;
 	for (i = 0;;) {
 		if (unlikely(!map->page)) {
@@ -173,7 +173,7 @@ static int alloc_qpn(struct qib_devdata
 			 * We just need to be sure we don't loop
 			 * forever.
 			 */
-		} while (offset < BITS_PER_PAGE && qpn < QPN_MAX);
+		} while (offset < RVT_BITS_PER_PAGE && qpn < QPN_MAX);
 		/*
 		 * In order to keep the number of pages allocated to a
 		 * minimum, we scan the all existing pages before increasing
@@ -204,9 +204,9 @@ static void free_qpn(struct qib_qpn_tabl
 {
 	struct qpn_map *map;
 
-	map = qpt->map + qpn / BITS_PER_PAGE;
+	map = qpt->map + qpn / RVT_BITS_PER_PAGE;
 	if (map->page)
-		clear_bit(qpn & BITS_PER_PAGE_MASK, map->page);
+		clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page);
 }
 
 static inline unsigned qpn_hash(struct qib_ibdev *dev, u32 qpn)

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


#1636588 — [PATCH 4.4 17/20] ext4 crypto: use dget_parent() in ext4_d_revalidate()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 17/20] ext4 crypto: use dget_parent() in ext4_d_revalidate()
Message-ID<tDQj2-5qv-77@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Theodore Ts'o <tytso@mit.edu>

commit 3d43bcfef5f0548845a425365011c499875491b0 upstream.

This avoids potential problems caused by a race where the inode gets
renamed out from its parent directory and the parent directory is
deleted while ext4_d_revalidate() is running.

Fixes: 28b4c263961c
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/ext4/crypto.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -477,16 +477,21 @@ uint32_t ext4_validate_encryption_key_si
  */
 static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags)
 {
-	struct inode *dir = d_inode(dentry->d_parent);
-	struct ext4_crypt_info *ci = EXT4_I(dir)->i_crypt_info;
+	struct dentry *dir;
+	struct ext4_crypt_info *ci;
 	int dir_has_key, cached_with_key;
 
-	if (!ext4_encrypted_inode(dir))
+	dir = dget_parent(dentry);
+	if (!ext4_encrypted_inode(d_inode(dir))) {
+		dput(dir);
 		return 0;
+	}
+	ci = EXT4_I(d_inode(dir))->i_crypt_info;
 
 	/* this should eventually be an flag in d_flags */
 	cached_with_key = dentry->d_fsdata != NULL;
 	dir_has_key = (ci != NULL);
+	dput(dir);
 
 	/*
 	 * If the dentry was cached without the key, and it is a

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


#1636592 — [PATCH 4.4 18/20] ext4/fscrypto: avoid RCU lookup in d_revalidate

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 18/20] ext4/fscrypto: avoid RCU lookup in d_revalidate
Message-ID<tDQj2-5qv-87@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jaegeuk Kim <jaegeuk@kernel.org>

commit 03a8bb0e53d9562276045bdfcf2b5de2e4cff5a1 upstream.

As Al pointed, d_revalidate should return RCU lookup before using d_inode.
This was originally introduced by:
commit 34286d666230 ("fs: rcu-walk aware d_revalidate method").

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/ext4/crypto.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -34,6 +34,7 @@
 #include <linux/random.h>
 #include <linux/scatterlist.h>
 #include <linux/spinlock_types.h>
+#include <linux/namei.h>
 
 #include "ext4_extents.h"
 #include "xattr.h"
@@ -481,6 +482,9 @@ static int ext4_d_revalidate(struct dent
 	struct ext4_crypt_info *ci;
 	int dir_has_key, cached_with_key;
 
+	if (flags & LOOKUP_RCU)
+		return -ECHILD;
+
 	dir = dget_parent(dentry);
 	if (!ext4_encrypted_inode(d_inode(dir))) {
 		dput(dir);

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


#1636595 — [PATCH 4.4 03/20] ASoC: intel: Fix PM and non-atomic crash in bytcr drivers

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-05 20:40 +0200
Subject[PATCH 4.4 03/20] ASoC: intel: Fix PM and non-atomic crash in bytcr drivers
Message-ID<tDQj3-5qv-93@gated-at.bofh.it>
In reply to#1636580
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit 6e4cac23c5a648d50b107d1b53e9c4e1120c7943 upstream.

The FE setups of Intel SST bytcr_rt5640 and bytcr_rt5651 drivers carry
the ignore_suspend flag, and this prevents the suspend/resume working
properly while the stream is running, since SST core code has the
check of the running streams and returns -EBUSY.  Drop these
superfluous flags for fixing the behavior.

Also, the bytcr_rt5640 driver lacks of nonatomic flag in some FE
definitions, which leads to the kernel Oops at suspend/resume like:

  BUG: scheduling while atomic: systemd-sleep/3144/0x00000003
  Call Trace:
   dump_stack+0x5c/0x7a
   __schedule_bug+0x55/0x70
   __schedule+0x63c/0x8c0
   schedule+0x3d/0x90
   schedule_timeout+0x16b/0x320
   ? del_timer_sync+0x50/0x50
   ? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core]
   ? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core]
   ? remove_wait_queue+0x60/0x60
   ? sst_prepare_and_post_msg+0x275/0x960 [snd_intel_sst_core]
   ? sst_pause_stream+0x9b/0x110 [snd_intel_sst_core]
   ....

This patch addresses these appropriately, too.

[tiwai: applied only to bytcr_rt5640 as bytcr_rt5651 isn't present in
 4.4.x yet]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # v4.1+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

This is the patch modified to be applicable to 4.4.x that failed in
your previous queue.

 sound/soc/intel/boards/bytcr_rt5640.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -139,7 +139,7 @@ static struct snd_soc_dai_link byt_daili
 		.codec_dai_name = "snd-soc-dummy-dai",
 		.codec_name = "snd-soc-dummy",
 		.platform_name = "sst-mfld-platform",
-		.ignore_suspend = 1,
+		.nonatomic = true,
 		.dynamic = 1,
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
@@ -166,6 +166,7 @@ static struct snd_soc_dai_link byt_daili
 						| SND_SOC_DAIFMT_CBS_CFS,
 		.be_hw_params_fixup = byt_codec_fixup,
 		.ignore_suspend = 1,
+		.nonatomic = true,
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
 		.ops = &byt_be_ssp2_ops,

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


#1636809

FromShuah Khan <shuahkh@osg.samsung.com>
Date2017-05-06 04:00 +0200
Message-ID<tDXaO-1sL-7@gated-at.bofh.it>
In reply to#1636580
On 05/05/2017 12:32 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.67 release.
> There are 20 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 Sun May  7 18:32:22 UTC 2017.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.67-rc1.gz
> or in the git tree and branch at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

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

thanks,
-- Shuah

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


#1636814

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-06 05:50 +0200
Message-ID<tDYTf-2IR-1@gated-at.bofh.it>
In reply to#1636809
On Fri, May 05, 2017 at 07:58:50PM -0600, Shuah Khan wrote:
> On 05/05/2017 12:32 PM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.67 release.
> > There are 20 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 Sun May  7 18:32:22 UTC 2017.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.67-rc1.gz
> > or in the git tree and branch at:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Compiled and booted on my test system. No dmesg regressions.

Thanks for testing both of these and letting me know.

greg k-h

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


#1637076

FromGuenter Roeck <linux@roeck-us.net>
Date2017-05-08 00:10 +0200
Message-ID<tECxk-3oj-35@gated-at.bofh.it>
In reply to#1636580
On 05/05/2017 11:32 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.67 release.
> There are 20 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 Sun May  7 18:32:22 UTC 2017.
> Anything received after that time might be too late.
>

Build results:
	total: 145 pass: 145 fail: 0
Qemu test results:
	total: 115 pass: 115 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web