linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.4 0/8] 3.4.94-stable review
@ 2014-06-12 23:22 Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 1/8] mlx4_en: dont use napi_synchronize inside mlx4_en_netpoll Greg Kroah-Hartman
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, satoru.takeuchi,
	shuah.kh, stable

This is the start of the stable review cycle for the 3.4.94 release.
There are 8 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 Sat Jun 14 23:22:28 UTC 2014.
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/v3.0/stable-review/patch-3.4.94-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

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

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

Jérôme Carretero <cJ-ko@zougloub.eu>
    ahci: Add Device ID for HighPoint RocketRaid 642L

Ben Collins <ben.c@servergy.com>
    SCSI: megaraid: Use resource_size_t for PCI resources, not long

Andy Lutomirski <luto@amacapital.net>
    auditsc: audit_krule mask accesses need bounds checking

Rashika Kheria <rashika.kheria@gmail.com>
    Staging: zram: Fix memory leak by refcount mismatch

Jiang Liu <liuj97@gmail.com>
    zram: protect sysfs handler from invalid memory access

Guenter Roeck <linux@roeck-us.net>
    powerpc: Fix 64 bit builds with binutils 2.24

Florian Westphal <fw@strlen.de>
    netfilter: ipv4: defrag: set local_df flag on defragmented skb

Chris Mason <clm@fb.com>
    mlx4_en: don't use napi_synchronize inside mlx4_en_netpoll


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

Diffstat:

 Makefile                                       |  4 ++--
 arch/powerpc/Makefile                          |  4 +++-
 arch/powerpc/include/asm/ppc_asm.h             |  7 ++++++-
 drivers/ata/ahci.c                             |  2 ++
 drivers/net/ethernet/mellanox/mlx4/en_cq.c     |  1 -
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |  6 +-----
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h   |  1 -
 drivers/scsi/megaraid/megaraid_sas.h           |  1 -
 drivers/scsi/megaraid/megaraid_sas_base.c      |  5 +++--
 drivers/staging/zram/zram_sysfs.c              | 21 +++++++++++++++-----
 kernel/auditsc.c                               | 27 +++++++++++++++++---------
 net/ipv4/netfilter/nf_defrag_ipv4.c            |  5 +++--
 12 files changed, 54 insertions(+), 30 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 1/8] mlx4_en: dont use napi_synchronize inside mlx4_en_netpoll
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 2/8] netfilter: ipv4: defrag: set local_df flag on defragmented skb Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chris Mason, Amir Vadai,
	David S. Miller, Jiri Slaby, Masoud Sharbiani

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

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

From: Chris Mason <clm@fb.com>

commit c98235cb8584a72e95786e17d695a8e5fafcd766 upstream.

The mlx4 driver is triggering schedules while atomic inside
mlx4_en_netpoll:

	spin_lock_irqsave(&cq->lock, flags);
	napi_synchronize(&cq->napi);
		^^^^^ msleep here
	mlx4_en_process_rx_cq(dev, cq, 0);
	spin_unlock_irqrestore(&cq->lock, flags);

This was part of a patch by Alexander Guller from Mellanox in 2011,
but it still isn't upstream.

Signed-off-by: Chris Mason <clm@fb.com>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Masoud Sharbiani <msharbiani@twitter.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/ethernet/mellanox/mlx4/en_cq.c     |    1 -
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |    6 +-----
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h   |    1 -
 3 files changed, 1 insertion(+), 7 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
@@ -55,7 +55,6 @@ int mlx4_en_create_cq(struct mlx4_en_pri
 
 	cq->ring = ring;
 	cq->is_tx = mode;
-	spin_lock_init(&cq->lock);
 
 	err = mlx4_alloc_hwq_res(mdev->dev, &cq->wqres,
 				cq->buf_size, 2 * PAGE_SIZE);
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -370,15 +370,11 @@ static void mlx4_en_netpoll(struct net_d
 {
 	struct mlx4_en_priv *priv = netdev_priv(dev);
 	struct mlx4_en_cq *cq;
-	unsigned long flags;
 	int i;
 
 	for (i = 0; i < priv->rx_ring_num; i++) {
 		cq = &priv->rx_cq[i];
-		spin_lock_irqsave(&cq->lock, flags);
-		napi_synchronize(&cq->napi);
-		mlx4_en_process_rx_cq(dev, cq, 0);
-		spin_unlock_irqrestore(&cq->lock, flags);
+		napi_schedule(&cq->napi);
 	}
 }
 #endif
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -301,7 +301,6 @@ struct mlx4_en_cq {
 	struct mlx4_cq          mcq;
 	struct mlx4_hwq_resources wqres;
 	int                     ring;
-	spinlock_t              lock;
 	struct net_device      *dev;
 	struct napi_struct	napi;
 	/* Per-core Tx cq processing support */



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 2/8] netfilter: ipv4: defrag: set local_df flag on defragmented skb
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 1/8] mlx4_en: dont use napi_synchronize inside mlx4_en_netpoll Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 3/8] powerpc: Fix 64 bit builds with binutils 2.24 Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Bizon, Florian Westphal,
	Pablo Neira Ayuso, Jiri Slaby

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

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

From: Florian Westphal <fw@strlen.de>

commit 895162b1101b3ea5db08ca6822ae9672717efec0 upstream.

else we may fail to forward skb even if original fragments do fit
outgoing link mtu:

1. remote sends 2k packets in two 1000 byte frags, DF set
2. we want to forward but only see '2k > mtu and DF set'
3. we then send icmp error saying that outgoing link is 1500

But original sender never sent a packet that would not fit
the outgoing link.

Setting local_df makes outgoing path test size vs.
IPCB(skb)->frag_max_size, so we will still send the correct
error in case the largest original size did not fit
outgoing link mtu.

Reported-by: Maxime Bizon <mbizon@freebox.fr>
Suggested-by: Maxime Bizon <mbizon@freebox.fr>
Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking)
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/ipv4/netfilter/nf_defrag_ipv4.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -22,7 +22,6 @@
 #endif
 #include <net/netfilter/nf_conntrack_zones.h>
 
-/* Returns new sk_buff, or NULL */
 static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user)
 {
 	int err;
@@ -33,8 +32,10 @@ static int nf_ct_ipv4_gather_frags(struc
 	err = ip_defrag(skb, user);
 	local_bh_enable();
 
-	if (!err)
+	if (!err) {
 		ip_send_check(ip_hdr(skb));
+		skb->local_df = 1;
+	}
 
 	return err;
 }



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 3/8] powerpc: Fix 64 bit builds with binutils 2.24
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 1/8] mlx4_en: dont use napi_synchronize inside mlx4_en_netpoll Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 2/8] netfilter: ipv4: defrag: set local_df flag on defragmented skb Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 4/8] zram: protect sysfs handler from invalid memory access Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Guenter Roeck, Benjamin Herrenschmidt

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

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

From: Guenter Roeck <linux@roeck-us.net>

commit 7998eb3dc700aaf499f93f50b3d77da834ef9e1d upstream.

With binutils 2.24, various 64 bit builds fail with relocation errors
such as

arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
	(.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI
	against symbol `interrupt_base_book3e' defined in .text section
	in arch/powerpc/kernel/built-in.o
arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
	(.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI
	against symbol `interrupt_end_book3e' defined in .text section
	in arch/powerpc/kernel/built-in.o

The assembler maintainer says:

 I changed the ABI, something that had to be done but unfortunately
 happens to break the booke kernel code.  When building up a 64-bit
 value with lis, ori, shl, oris, ori or similar sequences, you now
 should use @high and @higha in place of @h and @ha.  @h and @ha
 (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA)
 now report overflow if the value is out of 32-bit signed range.
 ie. @h and @ha assume you're building a 32-bit value. This is needed
 to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h
 and @toc@ha expressions, and for consistency I did the same for all
 other @h and @ha relocs.

Replacing @h with @high in one strategic location fixes the relocation
errors. This has to be done conditionally since the assembler either
supports @h or @high but not both.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/powerpc/Makefile              |    4 +++-
 arch/powerpc/include/asm/ppc_asm.h |    7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -67,9 +67,11 @@ LDFLAGS_vmlinux-y := -Bstatic
 LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie
 LDFLAGS_vmlinux	:= $(LDFLAGS_vmlinux-y)
 
+asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
+
 CFLAGS-$(CONFIG_PPC64)	:= -mminimal-toc -mtraceback=no -mcall-aixdesc
 CFLAGS-$(CONFIG_PPC32)	:= -ffixed-r2 -mmultiple
-KBUILD_CPPFLAGS	+= -Iarch/$(ARCH)
+KBUILD_CPPFLAGS	+= -Iarch/$(ARCH) $(asinstr)
 KBUILD_AFLAGS	+= -Iarch/$(ARCH)
 KBUILD_CFLAGS	+= -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
 CPP		= $(CC) -E $(KBUILD_CFLAGS)
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -294,11 +294,16 @@ n:
  *      ld	rY,ADDROFF(name)(rX)
  */
 #ifdef __powerpc64__
+#ifdef HAVE_AS_ATHIGH
+#define __AS_ATHIGH high
+#else
+#define __AS_ATHIGH h
+#endif
 #define LOAD_REG_IMMEDIATE(reg,expr)		\
 	lis     (reg),(expr)@highest;		\
 	ori     (reg),(reg),(expr)@higher;	\
 	rldicr  (reg),(reg),32,31;		\
-	oris    (reg),(reg),(expr)@h;		\
+	oris    (reg),(reg),(expr)@__AS_ATHIGH;	\
 	ori     (reg),(reg),(expr)@l;
 
 #define LOAD_REG_ADDR(reg,name)			\



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 4/8] zram: protect sysfs handler from invalid memory access
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2014-06-12 23:22 ` [PATCH 3.4 3/8] powerpc: Fix 64 bit builds with binutils 2.24 Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 5/8] Staging: zram: Fix memory leak by refcount mismatch Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jiang Liu, Minchan Kim, Ben Hutchings,
	Yijing Wang

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

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

From: Jiang Liu <liuj97@gmail.com>

commit 5863e10b441e7ea4b492f930f1be180a97d026f3 upstream.

Use zram->init_lock to protect access to zram->meta, otherwise it
may cause invalid memory access if zram->meta has been freed by
zram_reset_device().

This issue may be triggered by:
Thread 1:
while true; do cat mem_used_total; done
Thread 2:
while true; do echo 8M > disksize; echo 1 > reset; done

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[wyj: Backported to 3.4: adjust context]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/zram/zram_sysfs.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/staging/zram/zram_sysfs.c
+++ b/drivers/staging/zram/zram_sysfs.c
@@ -188,10 +188,12 @@ static ssize_t mem_used_total_show(struc
 	u64 val = 0;
 	struct zram *zram = dev_to_zram(dev);
 
+	down_read(&zram->init_lock);
 	if (zram->init_done) {
 		val = zs_get_total_size_bytes(zram->mem_pool) +
 			((u64)(zram->stats.pages_expand) << PAGE_SHIFT);
 	}
+	up_read(&zram->init_lock);
 
 	return sprintf(buf, "%llu\n", val);
 }



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 5/8] Staging: zram: Fix memory leak by refcount mismatch
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2014-06-12 23:22 ` [PATCH 3.4 4/8] zram: protect sysfs handler from invalid memory access Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 6/8] auditsc: audit_krule mask accesses need bounds checking Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Minchan Kim, Jerome Marchand,
	Rashika Kheria, Ben Hutchings, Yijing Wang

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

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

From: Rashika Kheria <rashika.kheria@gmail.com>

commit 1b672224d128ec2570eb37572ff803cfe452b4f7 upstream.

As suggested by Minchan Kim and Jerome Marchand "The code in reset_store
get the block device (bdget_disk()) but it does not put it (bdput()) when
it's done using it. The usage count is therefore incremented but never
decremented."

This patch also puts bdput() for all error cases.

Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[wyj: Backported to 3.4: adjust context]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/zram/zram_sysfs.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

--- a/drivers/staging/zram/zram_sysfs.c
+++ b/drivers/staging/zram/zram_sysfs.c
@@ -99,18 +99,23 @@ static ssize_t reset_store(struct device
 		return -ENOMEM;
 
 	/* Do not reset an active device! */
-	if (bdev->bd_holders)
-		return -EBUSY;
+	if (bdev->bd_holders) {
+		ret = -EBUSY;
+		goto out;
+	}
 
 	ret = kstrtou16(buf, 10, &do_reset);
 	if (ret)
-		return ret;
+		goto out;
 
-	if (!do_reset)
-		return -EINVAL;
+	if (!do_reset) {
+		ret = -EINVAL;
+		goto out;
+	}
 
 	/* Make sure all pending I/O is finished */
 	fsync_bdev(bdev);
+	bdput(bdev);
 
 	down_write(&zram->init_lock);
 	if (zram->init_done)
@@ -118,6 +123,10 @@ static ssize_t reset_store(struct device
 	up_write(&zram->init_lock);
 
 	return len;
+
+out:
+	bdput(bdev);
+	return ret;
 }
 
 static ssize_t num_reads_show(struct device *dev,



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 6/8] auditsc: audit_krule mask accesses need bounds checking
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2014-06-12 23:22 ` [PATCH 3.4 5/8] Staging: zram: Fix memory leak by refcount mismatch Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-12 23:22 ` [PATCH 3.4 7/8] SCSI: megaraid: Use resource_size_t for PCI resources, not long Greg Kroah-Hartman
  2014-06-13  5:43 ` [PATCH 3.4 0/8] 3.4.94-stable review Guenter Roeck
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andy Lutomirski, Eric Paris,
	Linus Torvalds

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

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

From: Andy Lutomirski <luto@amacapital.net>

commit a3c54931199565930d6d84f4c3456f6440aefd41 upstream.

Fixes an easy DoS and possible information disclosure.

This does nothing about the broken state of x32 auditing.

eparis: If the admin has enabled auditd and has specifically loaded
audit rules.  This bug has been around since before git.  Wow...

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/auditsc.c |   27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -868,6 +868,22 @@ static enum audit_state audit_filter_tas
 	return AUDIT_BUILD_CONTEXT;
 }
 
+static int audit_in_mask(const struct audit_krule *rule, unsigned long val)
+{
+	int word, bit;
+
+	if (val > 0xffffffff)
+		return false;
+
+	word = AUDIT_WORD(val);
+	if (word >= AUDIT_BITMASK_SIZE)
+		return false;
+
+	bit = AUDIT_BIT(val);
+
+	return rule->mask[word] & bit;
+}
+
 /* At syscall entry and exit time, this filter is called if the
  * audit_state is not low enough that auditing cannot take place, but is
  * also not high enough that we already know we have to write an audit
@@ -885,11 +901,8 @@ static enum audit_state audit_filter_sys
 
 	rcu_read_lock();
 	if (!list_empty(list)) {
-		int word = AUDIT_WORD(ctx->major);
-		int bit  = AUDIT_BIT(ctx->major);
-
 		list_for_each_entry_rcu(e, list, list) {
-			if ((e->rule.mask[word] & bit) == bit &&
+			if (audit_in_mask(&e->rule, ctx->major) &&
 			    audit_filter_rules(tsk, &e->rule, ctx, NULL,
 					       &state, false)) {
 				rcu_read_unlock();
@@ -909,20 +922,16 @@ static enum audit_state audit_filter_sys
 static int audit_filter_inode_name(struct task_struct *tsk,
 				   struct audit_names *n,
 				   struct audit_context *ctx) {
-	int word, bit;
 	int h = audit_hash_ino((u32)n->ino);
 	struct list_head *list = &audit_inode_hash[h];
 	struct audit_entry *e;
 	enum audit_state state;
 
-	word = AUDIT_WORD(ctx->major);
-	bit  = AUDIT_BIT(ctx->major);
-
 	if (list_empty(list))
 		return 0;
 
 	list_for_each_entry_rcu(e, list, list) {
-		if ((e->rule.mask[word] & bit) == bit &&
+		if (audit_in_mask(&e->rule, ctx->major) &&
 		    audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) {
 			ctx->current_state = state;
 			return 1;



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3.4 7/8] SCSI: megaraid: Use resource_size_t for PCI resources, not long
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2014-06-12 23:22 ` [PATCH 3.4 6/8] auditsc: audit_krule mask accesses need bounds checking Greg Kroah-Hartman
@ 2014-06-12 23:22 ` Greg Kroah-Hartman
  2014-06-13  5:43 ` [PATCH 3.4 0/8] 3.4.94-stable review Guenter Roeck
  7 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-12 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ben Collins, Sumit Saxena,
	James Bottomley

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

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

From: Ben Collins <ben.c@servergy.com>

commit 11f8a7b31f2140b0dc164bb484281235ffbe51d3 upstream.

The assumption that sizeof(long) >= sizeof(resource_size_t) can lead to
truncation of the PCI resource address, meaning this driver didn't work
on 32-bit systems with 64-bit PCI adressing ranges.

Signed-off-by: Ben Collins <ben.c@servergy.com>
Acked-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/megaraid/megaraid_sas.h      |    1 -
 drivers/scsi/megaraid/megaraid_sas_base.c |    5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1294,7 +1294,6 @@ struct megasas_instance {
 	u32 *reply_queue;
 	dma_addr_t reply_queue_h;
 
-	unsigned long base_addr;
 	struct megasas_register_set __iomem *reg_set;
 
 	struct megasas_pd_list          pd_list[MEGASAS_MAX_PD];
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3445,6 +3445,7 @@ static int megasas_init_fw(struct megasa
 	u32 max_sectors_1;
 	u32 max_sectors_2;
 	u32 tmp_sectors, msix_enable;
+	resource_size_t base_addr;
 	struct megasas_register_set __iomem *reg_set;
 	struct megasas_ctrl_info *ctrl_info;
 	unsigned long bar_list;
@@ -3453,14 +3454,14 @@ static int megasas_init_fw(struct megasa
 	/* Find first memory bar */
 	bar_list = pci_select_bars(instance->pdev, IORESOURCE_MEM);
 	instance->bar = find_first_bit(&bar_list, sizeof(unsigned long));
-	instance->base_addr = pci_resource_start(instance->pdev, instance->bar);
 	if (pci_request_selected_regions(instance->pdev, instance->bar,
 					 "megasas: LSI")) {
 		printk(KERN_DEBUG "megasas: IO memory region busy!\n");
 		return -EBUSY;
 	}
 
-	instance->reg_set = ioremap_nocache(instance->base_addr, 8192);
+	base_addr = pci_resource_start(instance->pdev, instance->bar);
+	instance->reg_set = ioremap_nocache(base_addr, 8192);
 
 	if (!instance->reg_set) {
 		printk(KERN_DEBUG "megasas: Failed to map IO mem\n");



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3.4 0/8] 3.4.94-stable review
  2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2014-06-12 23:22 ` [PATCH 3.4 7/8] SCSI: megaraid: Use resource_size_t for PCI resources, not long Greg Kroah-Hartman
@ 2014-06-13  5:43 ` Guenter Roeck
  7 siblings, 0 replies; 9+ messages in thread
From: Guenter Roeck @ 2014-06-13  5:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, satoru.takeuchi, shuah.kh, stable

On 06/12/2014 04:22 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.4.94 release.
> There are 8 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 Sat Jun 14 23:22:28 UTC 2014.
> Anything received after that time might be too late.
>

Build results:
	total: 136 pass: 111 skipped: 20 fail: 5
Failed builds:
	alpha:allmodconfig
	arm:spear6xx_defconfig
	sparc64:allmodconfig
	unicore32:defconfig
	xtensa:allmodconfig

Qemu tests all passed.

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

Guenter


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-06-13  6:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-12 23:22 [PATCH 3.4 0/8] 3.4.94-stable review Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 1/8] mlx4_en: dont use napi_synchronize inside mlx4_en_netpoll Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 2/8] netfilter: ipv4: defrag: set local_df flag on defragmented skb Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 3/8] powerpc: Fix 64 bit builds with binutils 2.24 Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 4/8] zram: protect sysfs handler from invalid memory access Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 5/8] Staging: zram: Fix memory leak by refcount mismatch Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 6/8] auditsc: audit_krule mask accesses need bounds checking Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.4 7/8] SCSI: megaraid: Use resource_size_t for PCI resources, not long Greg Kroah-Hartman
2014-06-13  5:43 ` [PATCH 3.4 0/8] 3.4.94-stable review Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).