it is possible to merge the first version
of the patch (http://www.spinics.net/lists/linux-scsi/msg73984.html)?
We could proceed to rewrite the functions later.
Thanks,
Maurizio Lombardi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a mes
tored the previous number of segments but left
the BIO_SEG_FLAG set.
To avoid problems, after the page is removed from the bio vec,
V3 performs a recount of the segments in the error code path.
Signed-off-by: Maurizio Lombardi
---
fs/bio.c | 48 ++--
1
Sorry I did a mistake in this patch: on failure I should restore the original
value
of bi_phys_segments.
I'm going to send a new version.
Maurizio Lombardi
On Tue, Apr 29, 2014 at 04:58:18PM +0200, Maurizio Lombardi wrote:
> The original behaviour is to refuse to add a new page if the
e bug can be easily reproduced with the st driver:
1) set CONFIG_SCSI_MPT2SAS_MAX_SGE or CONFIG_SCSI_MPT3SAS_MAX_SGE to 16
2) modprobe st buffer_kbs=1024
3) #dd if=/dev/zero of=/dev/st0 bs=1M count=10
dd: error writing ‘/dev/st0’: Device or resource busy
Signed-off-by: Maurizio Lombardi
--
e bug can be easily reproduced with the st driver:
1) set CONFIG_SCSI_MPT2SAS_MAX_SGE or CONFIG_SCSI_MPT3SAS_MAX_SGE to 16
2) modprobe st buffer_kbs=1024
3) #dd if=/dev/zero of=/dev/st0 bs=1M count=10
dd: error writing ‘/dev/st0’: Device or resource busy
Signed-off-by: Maurizio Lombardi
--
e() accepts a pointer to the sense buffer as parameter, but
it does not update its content in case blk_execute_rq() returns an error.
Maurizio Lombardi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
witched
> to that.
Yes I think you are right, I'm trying to write a patch to get rid of all
this duplicated code.
I'll publish a patchset next week.
Thanks,
Maurizio Lombardi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a messag
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/device_handler/scsi_dh_alua.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
b/drivers/scsi/device_handler/scsi_dh_alua.c
index 5248c88..1903ae5 100644
--- a
bnx2fc_allocate_hash_table() function.
Maurizio Lombardi (3):
bnx2fc: remove unused variable hash_table_size
bnx2fc: fix memory leak and potential NULL pointer dereference.
bnx2fc: fix memory leak in bnx2fc_allocate_hash_table()
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 64
: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 34 --
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 261af2a..f83bae4 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
In case of error, the bnx2fc_allocate_hash_table() didn't free
all the memory it allocated.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 31 +++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/b
hash_table_size is not used by the bnx2fc_free_hash_table() function.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 46a3765..261af2a 100644
On Tue, Mar 25, 2014 at 06:13:06AM -0700, Christoph Hellwig wrote:
> > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> > index 78b004d..4021849 100644
> > --- a/drivers/scsi/scsi_error.c
> > +++ b/drivers/scsi/scsi_error.c
> > @@ -2289,6 +2289,9 @@ scsi_reset_provider(struct sc
The scsi_get_command() function returns NULL if
it fails to allocate the scsi_cmnd structure.
If this happens, a NULL pointer will be dereferenced.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/scsi_error.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/scsi_error.c b
hash_table_size is not used by the bnx2fc_free_hash_table() function.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 46a3765..261af2a 100644
: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 34 --
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 261af2a..f83bae4 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
bnx2fc_free_hash_table() function
that may happen if bnx2fc_allocate_hash_table() fails.
PATCH 3/3 fixes a memory leak in the bnx2fc_allocate_hash_table() function.
Maurizio Lombardi (3):
bnx2fc: remove unused variable hash_table_size
bnx2fc: fix memory leak and potential NULL pointer
In case of error, the bnx2fc_allocate_hash_table() didn't free
all the memory it allocated.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 31 +++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/b
alloc_coherent(...)" fails (line 2058).
It just requires a very little change to your patch, I'll send it tomorrow.
Regards,
Maurizio Lombardi
>
> Thanks,
> Eddie
>
> @@ -2020,7 +2026,7 @@ static int bnx2fc_allocate_hash_table(struct
> bnx2fc_hba *hba)
>
hash_table_size is not used by the bnx2fc_free_hash_table() function.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 46a3765..261af2a 100644
: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 34 --
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 261af2a..f83bae4 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
dereferences
that may happen if bnx2fc_allocate_hash_table() fails.
Maurizio Lombardi (2):
bnx2fc: remove unused variable hash_table_size
bnx2fc: fix memory leak and potential NULL pointer dereference.
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 36 ++--
1 file changed, 18
hash_table_size is not used by the bnx2fc_free_hash_table() function.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 46a3765..261af2a 100644
://marc.info/?l=linux-scsi&m=135003083808290&w=2
If you have a more complete and up-to-date patchset in your queue it would be
interesting to have a look at it.
Regards,
Maurizio Lombardi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of
This patch converts the st driver to use dev_printk() instead of printk(),
every st device has a reference to the underlying scsi device.
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/st.c | 613 +++---
1 file changed, 349 insertions(+), 264
[2] << 8) + buff[3] + 4;
>+ if (len > bufflen) {
[...]
>+ bufflen = len;
just a nit: is it safe to use char as the type of bufflen? Isn't better
to declare it as int just in case len is > than 255 ?
Regards,
Maurizio Lombardi
--
To unsubscribe from this li
f4 49
[ 135.378282] RIP [] kernfs_find_ns+0x21/0x150
[ 135.384355] RSP
[ 135.387881] CR2: 0098
[ 135.391298] ---[ end trace 1968409221ddb3c8 ]---
Signed-off-by: Maurizio Lombardi
---
drivers/scsi/st.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff -
101 - 127 of 127 matches
Mail list logo