Re: [PATCH v2] fs: guard_bio_eod() needs to consider partitions

2017-11-01 Thread Greg Edwards
On Tue, Oct 24, 2017 at 11:21:48AM -0600, Greg Edwards wrote: > guard_bio_eod() needs to look at the partition capacity, not just the > capacity of the whole device, when determining if truncation is > necessary. > > [ 60.268688] attempt to access beyond end of device > [

Re: [PATCH v2] fs: guard_bio_eod() needs to consider partitions

2017-11-01 Thread Greg Edwards
On Tue, Oct 24, 2017 at 11:21:48AM -0600, Greg Edwards wrote: > guard_bio_eod() needs to look at the partition capacity, not just the > capacity of the whole device, when determining if truncation is > necessary. > > [ 60.268688] attempt to access beyond end of device > [

[PATCH v2] fs: guard_bio_eod() needs to consider partitions

2017-10-24 Thread Greg Edwards
] buffer_io_error: 2 callbacks suppressed [ 60.268696] Buffer I/O error on dev md1p7, logical block 4524305, async page read Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Greg Edwards <gedwa...@ddn.com> --- Changes from v1: * use

[PATCH v2] fs: guard_bio_eod() needs to consider partitions

2017-10-24 Thread Greg Edwards
] buffer_io_error: 2 callbacks suppressed [ 60.268696] Buffer I/O error on dev md1p7, logical block 4524305, async page read Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Greg Edwards --- Changes from v1: * use __disk_get_pa

Re: [PATCH] fs: guard_bio_eod() needs to consider partitions

2017-10-24 Thread Greg Edwards
On Tue, Oct 24, 2017 at 09:46:15AM +0200, Christoph Hellwig wrote: > On Tue, Oct 24, 2017 at 03:16:36AM +0100, Al Viro wrote: >>> Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and >>> partitions index") >>> Signed-off-by: Greg Edwa

Re: [PATCH] fs: guard_bio_eod() needs to consider partitions

2017-10-24 Thread Greg Edwards
On Tue, Oct 24, 2017 at 09:46:15AM +0200, Christoph Hellwig wrote: > On Tue, Oct 24, 2017 at 03:16:36AM +0100, Al Viro wrote: >>> Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and >>> partitions index") >>> Signed-off-by: Greg Edward

[PATCH] fs: guard_bio_eod() needs to consider partitions

2017-10-23 Thread Greg Edwards
] buffer_io_error: 2 callbacks suppressed [ 60.268696] Buffer I/O error on dev md1p7, logical block 4524305, async page read Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Greg Edwards <gedwa...@ddn.com> --- fs/buffer.c | 9 -

[PATCH] fs: guard_bio_eod() needs to consider partitions

2017-10-23 Thread Greg Edwards
] buffer_io_error: 2 callbacks suppressed [ 60.268696] Buffer I/O error on dev md1p7, logical block 4524305, async page read Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Greg Edwards --- fs/buffer.c | 9 - 1 file changed, 8

[PATCH] mpt3sas: Fix resume on WarpDrive flash cards

2016-07-30 Thread Greg Edwards
[ 47.66] [] common_interrupt+0x8c/0x8c [ 47.675635] Move the reply_post_host_index array setup into mpt3sas_base_map_resources(), which is also in the resume path. Cc: sta...@vger.kernel.org Signed-off-by: Greg Edwards <gedwa...@fireweed.org> --- drivers/scsi/mpt3sas/mpt3sas_base.

[PATCH] mpt3sas: Fix resume on WarpDrive flash cards

2016-07-30 Thread Greg Edwards
[ 47.66] [] common_interrupt+0x8c/0x8c [ 47.675635] Move the reply_post_host_index array setup into mpt3sas_base_map_resources(), which is also in the resume path. Cc: sta...@vger.kernel.org Signed-off-by: Greg Edwards --- drivers/scsi/mpt3sas/mpt3sas_base.c | 22 +++--- 1

Re: [PATCH v2] iommu/vt-d: race setting IRQ CPU affinity while freeing IRQ

2014-07-29 Thread Greg Edwards
On Tue, Jul 29, 2014 at 12:45:31PM +0200, Joerg Roedel wrote: > On Wed, Jul 23, 2014 at 10:13:26AM -0600, Greg Edwards wrote: >> A user process setting the CPU affinity of an IRQ for a KVM >> direct-assigned device via /proc/irq//smp_affinity can race with >> the IRQ b

Re: [PATCH v2] iommu/vt-d: race setting IRQ CPU affinity while freeing IRQ

2014-07-29 Thread Greg Edwards
On Tue, Jul 29, 2014 at 12:45:31PM +0200, Joerg Roedel wrote: On Wed, Jul 23, 2014 at 10:13:26AM -0600, Greg Edwards wrote: A user process setting the CPU affinity of an IRQ for a KVM direct-assigned device via /proc/irq/IRQ#/smp_affinity can race with the IRQ being released by QEMU, resulting

[PATCH v2] iommu/vt-d: race setting IRQ CPU affinity while freeing IRQ

2014-07-23 Thread Greg Edwards
A user process setting the CPU affinity of an IRQ for a KVM direct-assigned device via /proc/irq//smp_affinity can race with the IRQ being released by QEMU, resulting in a NULL iommu pointer dereference in get_irte(). Signed-off-by: Greg Edwards --- Dropped the Cc: for stable since this likely

Re: [PATCH] iommu/vt-d: fix race between free_irte() and get_irte()

2014-07-23 Thread Greg Edwards
On Wed, Jul 23, 2014 at 04:40:24PM +0200, Joerg Roedel wrote: > On Tue, Jul 22, 2014 at 08:27:19AM -0600, Greg Edwards wrote: >> get_irte() can race with free_irte() and dereference a NULL iommu >> pointer. > > Have you seen any real occurance of this race? Get_irte is called

Re: [PATCH] iommu/vt-d: fix race between free_irte() and get_irte()

2014-07-23 Thread Greg Edwards
On Wed, Jul 23, 2014 at 04:40:24PM +0200, Joerg Roedel wrote: On Tue, Jul 22, 2014 at 08:27:19AM -0600, Greg Edwards wrote: get_irte() can race with free_irte() and dereference a NULL iommu pointer. Have you seen any real occurance of this race? Get_irte is called in the set_affinity path

[PATCH v2] iommu/vt-d: race setting IRQ CPU affinity while freeing IRQ

2014-07-23 Thread Greg Edwards
A user process setting the CPU affinity of an IRQ for a KVM direct-assigned device via /proc/irq/IRQ#/smp_affinity can race with the IRQ being released by QEMU, resulting in a NULL iommu pointer dereference in get_irte(). Signed-off-by: Greg Edwards gedwa...@ddn.com --- Dropped the Cc

[PATCH] iommu/vt-d: fix race between free_irte() and get_irte()

2014-07-22 Thread Greg Edwards
get_irte() can race with free_irte() and dereference a NULL iommu pointer. Signed-off-by: Greg Edwards Cc: sta...@vger.kernel.org --- drivers/iommu/intel_irq_remapping.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu

[PATCH] iommu/vt-d: fix race between free_irte() and get_irte()

2014-07-22 Thread Greg Edwards
get_irte() can race with free_irte() and dereference a NULL iommu pointer. Signed-off-by: Greg Edwards gedwa...@ddn.com Cc: sta...@vger.kernel.org --- drivers/iommu/intel_irq_remapping.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers

[PATCH v2] KVM: IOMMU: hva align mapping page size

2013-11-04 Thread Greg Edwards
When determining the page size we could use to map with the IOMMU, the page size should also be aligned with the hva, not just the gfn. The gfn may not reflect the real alignment within the hugetlbfs file. Signed-off-by: Greg Edwards Cc: sta...@vger.kernel.org --- virt/kvm/iommu.c | 4 1

[PATCH v2] KVM: IOMMU: hva align mapping page size

2013-11-04 Thread Greg Edwards
When determining the page size we could use to map with the IOMMU, the page size should also be aligned with the hva, not just the gfn. The gfn may not reflect the real alignment within the hugetlbfs file. Signed-off-by: Greg Edwards gedwa...@ddn.com Cc: sta...@vger.kernel.org --- virt/kvm

[PATCH] KVM: IOMMU: hva align mapping page size

2013-11-01 Thread Greg Edwards
to the gfn, which does reflect the alignment within the hugetlbfs file. Signed-off-by: Greg Edwards Cc: sta...@vger.kernel.org --- This resolves the bug previously reported (and misdiagnosed) here: http://www.spinics.net/lists/kvm/msg97599.html virt/kvm/iommu.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] KVM: IOMMU: hva align mapping page size

2013-11-01 Thread Greg Edwards
to the gfn, which does reflect the alignment within the hugetlbfs file. Signed-off-by: Greg Edwards gedwa...@ddn.com Cc: sta...@vger.kernel.org --- This resolves the bug previously reported (and misdiagnosed) here: http://www.spinics.net/lists/kvm/msg97599.html virt/kvm/iommu.c | 4 ++-- 1 file changed

Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)

2005-08-16 Thread Greg Edwards
On Sat, Aug 13, 2005 at 08:18:07PM +0200, Arjan van de Ven wrote: | On Sat, 2005-08-13 at 10:37 -0700, Linus Torvalds wrote: | > Actually, the more I looked at that mmap_kmem() function, the less I liked | > it. Let's get that sucker fixed better first. It's still not wonderful, | > but at

Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)

2005-08-16 Thread Greg Edwards
On Sat, Aug 13, 2005 at 08:18:07PM +0200, Arjan van de Ven wrote: | On Sat, 2005-08-13 at 10:37 -0700, Linus Torvalds wrote: | Actually, the more I looked at that mmap_kmem() function, the less I liked | it. Let's get that sucker fixed better first. It's still not wonderful, | but at least

Re: [PATCH] CON_CONSDEV bit not set correctly on last console

2005-04-06 Thread Greg Edwards
On Wed, Apr 06, 2005 at 03:53:17PM -0700, Andrew Morton wrote: | Greg Edwards <[EMAIL PROTECTED]> wrote: | > | > According to include/linux/console.h, CON_CONSDEV flag should be set on | > the last console specified on the boot command line: | > | > 86 #define CON_PRINTB

Re: [PATCH] CON_CONSDEV bit not set correctly on last console

2005-04-06 Thread Greg Edwards
On Wed, Apr 06, 2005 at 03:53:17PM -0700, Andrew Morton wrote: | Greg Edwards [EMAIL PROTECTED] wrote: | | According to include/linux/console.h, CON_CONSDEV flag should be set on | the last console specified on the boot command line: | | 86 #define CON_PRINTBUFFER (1) | 87 #define

[PATCH] CON_CONSDEV bit not set correctly on last console

2005-04-05 Thread Greg Edwards
CON_CONSDEV set, it masks it out. Tested on ia64 and x86. Signed-off-by: Greg Edwards <[EMAIL PROTECTED]> printk.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: bk-2.6/kernel/printk.c === --- bk-2.

[PATCH] CON_CONSDEV bit not set correctly on last console

2005-04-05 Thread Greg Edwards
CON_CONSDEV set, it masks it out. Tested on ia64 and x86. Signed-off-by: Greg Edwards [EMAIL PROTECTED] printk.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: bk-2.6/kernel/printk.c === --- bk-2.6