Re: [PATCH] target/user: Fix possible overwrite of t_data_sg'slastiov[]

2017-03-09 Thread Ilias Tsitsimpis
On Thu, Mar 09, 2017 at 10:08PM, 李秀波 wrote: > Any other advice about this change for your case? I took a look at the patch you sent and it seems reasonable to me. I didn't have the time to test it, but I will try to update to the latest version (probably by next week) and report back. Thanks for

Re: [PATCH 0/4 v2] block: Fixes for bdi handling

2017-03-09 Thread Jens Axboe
On 03/09/2017 03:16 AM, Jan Kara wrote: > Hi! > > this is a second revision of the series fixing the most urgent bugs that were > introduced by commit 165a5e22fafb "block: Move bdi_unregister() to > del_gendisk()" and by 0dba1314d4f8 "scsi, block: fix duplicate bdi name > registration crashes".

[PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-09 Thread Israel Rukshin
The bug reproduce when unloading srp module with one port down. sd_shutdown() hangs when __scsi_remove_device() get scsi_device with state SDEV_OFFLINE or SDEV_TRANSPORT_OFFLINE. It hangs because sd_shutdown() is trying to send sync cache command when the device is offline but with SDEV_CANCEL

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Tejun Heo
On Thu, Mar 09, 2017 at 11:16:21AM +0100, Jan Kara wrote: > SCSI can call device_add_disk() several times for one request queue when > a device in unbound and bound, creating new gendisk each time. This will > lead to bdi being repeatedly registered and unregistered. This was not a > big problem

Re: [PATCH linux-firmware] qed: Add firmware 8.15.3.0

2017-03-09 Thread Kyle McMartin
On Thu, Mar 09, 2017 at 12:00:49PM +0200, Yuval Mintz wrote: > This new firmware for the qed* adapters fixes multiple issues: > - Prevent accidental drops in Tx-switching between VFs. > - Corrct VF cleanup for higher VFs. > - Better handling of RoCE error flows. > - MR

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-09 Thread Bart Van Assche
On Thu, 2017-03-09 at 18:37 +0200, Israel Rukshin wrote: > The bug reproduce when unloading srp module with one port down. > sd_shutdown() hangs when __scsi_remove_device() get scsi_device with > state SDEV_OFFLINE or SDEV_TRANSPORT_OFFLINE. > It hangs because sd_shutdown() is trying to send sync

[PATCH] qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr

2017-03-09 Thread Bill Kuzeja
I've seen this issue only after a Qlogic card breaks upon initialization (one of my test cases). After the break, qla2x00_abort_all_cmds gets invoked. This routine has a relatively new section introduced by these commits: commit 1535aa75a3d8 ("scsi: qla2xxx: fix invalid DMA access after

RE: [PATCH] qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr

2017-03-09 Thread Madhani, Himanshu
> -Original Message- > From: Bill Kuzeja [mailto:william.kuz...@stratus.com] > Sent: Thursday, March 09, 2017 8:47 AM > To: linux-scsi@vger.kernel.org > Cc: qla2xxx-upstr...@qlogic.com; Bill Kuzeja > Subject: [PATCH] qla2xxx: Fix crash in qla2xxx_eh_abort on

Re: [PATCH net-next] qed*: Utilize Firmware 8.15.3.0

2017-03-09 Thread Christoph Hellwig
We can't just require a new firmware version in the driver, as users most likely won't have it by the time they install the new kernel. So you'll have to support the old firmware version as well.

[Bug 194837] VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 --- Comment #2 from Adam Williamson (ad...@happyassassin.net) --- I seem to get a different traceback every time this happens in local testing, aside from the times it just hangs - but it always seems to hang or crash at approximately the same

[Bug 194837] New: VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 Bug ID: 194837 Summary: VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1 Product: IO/Storage Version: 2.5 Kernel Version: 4.11rc1 Hardware: All

[Bug 194837] VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 --- Comment #1 from Adam Williamson (ad...@happyassassin.net) --- Downstream bug is https://bugzilla.redhat.com/show_bug.cgi?id=1430043 , Fedora kernel maintainers can provide info on the delta between the affected kernel builds, I hope. The

[Bug 194837] VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 Adam Williamson (ad...@happyassassin.net) changed: What|Removed |Added Regression|No |Yes -- You

[Bug 194837] VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 Adam Williamson (ad...@happyassassin.net) changed: What|Removed |Added Tree|Mainline|Fedora --

Re: how to unmap pages in an anonymous mmap?

2017-03-09 Thread Xiubo Li
On 2017年02月28日 03:32, Andy Grover wrote: On 02/26/2017 09:59 PM, Xiubo Li wrote: But, We likely don't want to release memory from the data area anyways while active, in any case. How about if we set a timer when active commands go to zero, and then reduce data area to some minimum if no new

Re: [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target.

2017-03-09 Thread Malavali, Giridhar
On 3/8/17, 7:42 PM, "Nicholas A. Bellinger" wrote: >Hi Giri, > >On Wed, 2017-03-08 at 18:30 +, Malavali, Giridhar wrote: >> >> On 3/8/17, 7:20 AM, "Bart Van Assche" >>wrote: >> >> >On Tue, 2017-03-07 at 23:34 -0800, Nicholas A. Bellinger

[PATCH] libata: make ata_sg_clean static over again

2017-03-09 Thread Jason Yan
Fixes the following sparse warning: drivers/ata/libata-core.c:4913:6: warning: symbol 'ata_sg_clean' was not declared. Should it be static? Signed-off-by: Jason Yan --- drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH net-next] qed*: Utilize Firmware 8.15.3.0

2017-03-09 Thread Mintz, Yuval
> We can't just require a new firmware version in the driver, as users most > likely won't have it by the time they install the new kernel. So you'll have > to > support the old firmware version as well. Why not? That has been the paradigm forever. The new firmware version is already available

RE: [PATCH net-next] qed*: Utilize Firmware 8.15.3.0

2017-03-09 Thread Mintz, Yuval
> > We can't just require a new firmware version in the driver, as users > > most likely won't have it by the time they install the new kernel. So > > you'll have to support the old firmware version as well. > > Why not? That has been the paradigm forever. > > The new firmware version is

Re: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-09 Thread Johannes Thumshirn
On 03/09/2017 10:26 AM, Reshetova, Elena wrote: > >> On 03/09/2017 08:18 AM, Reshetova, Elena wrote: On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a

[PATCH 4/4] Revert "scsi, block: fix duplicate bdi name registration crashes"

2017-03-09 Thread Jan Kara
This reverts commit 0dba1314d4f81115dce711292ec7981d17231064. It causes leaking of device numbers for SCSI when SCSI registers multiple gendisks for one request_queue in succession. It can be easily reproduced using Omar's script [1] on kernel with CONFIG_DEBUG_TEST_DRIVER_REMOVE. Furthermore the

[PATCH 2/4] bdi: Fix use-after-free in wb_congested_put()

2017-03-09 Thread Jan Kara
bdi_writeback_congested structures get created for each blkcg and bdi regardless whether bdi is registered or not. When they are created in unregistered bdi and the request queue (and thus bdi) is then destroyed while blkg still holds reference to bdi_writeback_congested structure, this structure

[PATCH 3/4] block: Make del_gendisk() safer for disks without queues

2017-03-09 Thread Jan Kara
Commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()" added disk->queue dereference to del_gendisk(). Although del_gendisk() is not supposed to be called without disk->queue valid and blk_unregister_queue() warns in that case, this change will make it oops instead. Return to the old

[PATCH 0/4 v2] block: Fixes for bdi handling

2017-03-09 Thread Jan Kara
Hi! this is a second revision of the series fixing the most urgent bugs that were introduced by commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()" and by 0dba1314d4f8 "scsi, block: fix duplicate bdi name registration crashes". In fact before these commits we had a different set

[PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Jan Kara
SCSI can call device_add_disk() several times for one request queue when a device in unbound and bound, creating new gendisk each time. This will lead to bdi being repeatedly registered and unregistered. This was not a big problem until commit 165a5e22fafb "block: Move bdi_unregister() to

Re: [PATCH v5 04/19] net: e100: Replace PCI pool old API

2017-03-09 Thread Romain Perier
Hello, Le 09/03/2017 à 08:01, Peter Senna Tschudin a écrit : > On Wed, Mar 08, 2017 at 02:40:25PM -0800, Jeff Kirsher wrote: >> On Wed, 2017-03-08 at 17:19 +0100, Romain Perier wrote: >>> The PCI pool API is deprecated. This commit replaces the PCI pool old >>> API by the appropriate function

Re: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-09 Thread Johannes Thumshirn
On 03/09/2017 08:18 AM, Reshetova, Elena wrote: >> On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote: >>> refcount_t type and corresponding API should be >>> used instead of atomic_t when the variable is used as >>> a reference counter. This allows to avoid accidental >>> refcounter

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Jan Kara
On Wed 08-03-17 17:55:42, Tejun Heo wrote: > Hello, > > On Wed, Mar 08, 2017 at 05:48:31PM +0100, Jan Kara wrote: > > @@ -710,6 +710,11 @@ static void cgwb_bdi_destroy(struct backing_dev_info > > *bdi) > > */ > > atomic_dec(>usage_cnt); > > wait_event(cgwb_release_wait,

Re: [PATCH 0/4] block: Fixes for bdi handling

2017-03-09 Thread Arthur Marsh
Jan Kara wrote on 09/03/17 03:18: Hi! patches in this series fix the most urgent bugs that were introduced by commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()" and by 0dba1314d4f8 "scsi, block: fix duplicate bdi name registration crashes". In fact before these commits we had

RE: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-09 Thread Reshetova, Elena
> On 03/09/2017 08:18 AM, Reshetova, Elena wrote: > >> On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote: > >>> refcount_t type and corresponding API should be > >>> used instead of atomic_t when the variable is used as > >>> a reference counter. This allows to avoid accidental >

Re: [PATCH] target/user: Fix possible overwrite of t_data_sg's lastiov[]

2017-03-09 Thread Ilias Tsitsimpis
Hi Andy, Xiubo, On Fri, Mar 03, 2017 at 11:00AM, Andy Grover wrote: > On 02/27/2017 09:47 PM, lixi...@cmss.chinamobile.com wrote: > > From: Xiubo Li > > > > If there has BIDI data, its first iov[] will overwrite the last > > iov[] for se_cmd->t_data_sg. > >

[PATCH] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-09 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: