Re: [PATCH] target: Fix a double put in transport_free_session

2021-03-26 Thread Maurizio Lombardi
Dne 23. 03. 21 v 3:58 Lv Yunlong napsal(a): > In transport_free_session, se_nacl is got from se_sess > with the initial reference. If se_nacl->acl_sess_list is > empty, se_nacl->dynamic_stop is set to true. Then the first > target_put_nacl(se_nacl) will drop the initial reference > and free se_n

Re: [PATCH] scsi: target: remove redundant assignment to variable 'ret'

2020-09-15 Thread Maurizio Lombardi
} else { > switch (cmd->logout_response) { > case ISCSI_LOGOUT_SUCCESS: > Looks ok to me. Reviewed-by: Maurizio Lombardi

Re: [PATCH] fs: exFAT read-only driver GPL implementation by Paragon Software.

2019-10-21 Thread Maurizio Lombardi
Dne 21.10.2019 v 13:45 Pali Rohár napsal(a): > They are represented by one member > in boot sector structure). > >> Btw, only Windows CE supported this. > > Is this information based on some real tests? Or just from marketing or > Microsoft's information? (I would really like to know definite

Re: [PATCH] fs: exFAT read-only driver GPL implementation by Paragon Software.

2019-10-21 Thread Maurizio Lombardi
Dne 21.10.2019 v 13:11 Pali Rohár napsal(a): > Are you going to add support also for TexFAT? Or at least for more two > FAT tables (like is used in FAT32)? > Just a small note here, differences between FAT and exFAT: 1) Contiguous files get a special treatment by exFAT: they do not use the FA

Re: [PATCH] fs: exFAT read-only driver GPL implementation by Paragon Software.

2019-10-21 Thread Maurizio Lombardi
Dne 21.10.2019 v 12:54 Pali Rohár napsal(a): > Plus there is new version of > this out-of-tree Samsung's exfat driver called sdfat which can be found > in some Android phones. [...] > > About that one implementation from Samsung, which was recently merged > into staging tree, more people wro

Re: [PATCH] bnx2fc: reduce stack usage in __bnx2fc_enable

2015-10-07 Thread Maurizio Lombardi
goto done; > If kzalloc() fails perhaps the function should return -ENOMEM, not zero. Regards, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vg

Re: [RFC PATCH 0/3] fix *pbl format support

2015-09-21 Thread Maurizio Lombardi
s/scsi_debug/map 0-15 # lvcreate -V200m -l99%FREE -T tsvg/pool -n lv1 --discards ignore Logical volume "lv1" created. # cat /sys/bus/pseudo/drivers/scsi_debug/map 0-31,2048-2055,501760-501871 Thanks, Maurizio Lombardi > > add/remove: 18/16 grow/shrink: 3/2 up/down: 5551/-

Re: [RFC PATCH 0/3] fix *pbl format support

2015-09-16 Thread Maurizio Lombardi
27;s only the %pb formatter (and so far > only a single user of that), I think smaller/other hammers should be > thought about. So far I think there've been two alternatives: (1) > reintroduce the dedicated bitmap pretty printer(s) I have no problem with that, at least it will work again

[RFC PATCH 2/3] lib/vsprintf.c: append "..." if the *pb[l] output has been truncated.

2015-09-16 Thread Maurizio Lombardi
ot; to the output to inform the user that a truncation happened. Signed-off-by: Maurizio Lombardi --- lib/vsprintf.c | 48 1 file changed, 48 insertions(+) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8707d91..f49bf54 100644 --- a/lib/vsprintf.c

[RFC PATCH 3/3] lib/vsprintf.c: increase the size of the field_width variable

2015-09-16 Thread Maurizio Lombardi
but still empty # cat /sys/bus/pseudo/drivers/scsi_debug/map Expected results: # cat /sys/bus/pseudo/drivers/scsi_debug/map 0-15 Signed-off-by: Maurizio Lombardi --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index f49

[RFC PATCH 1/3] lib/vsprintf.c: Do not pass printf_spec by value on stack.

2015-09-16 Thread Maurizio Lombardi
The original code passes the structure by value on the stack, this limits the size of the printf_spec structure because of performance reasons. This patch modifies the code so only a const pointer to the structure is passed on the stack. Signed-off-by: Maurizio Lombardi --- lib/vsprintf.c | 225

[RFC PATCH 0/3] fix *pbl format support

2015-09-16 Thread Maurizio Lombardi
ccc,... *pbl: 1-2,5-7,... PATCH 3 increases the size of printf_spec.field_width (from s16 to s32). Maurizio Lombardi (3): lib/vsprintf.c: Do not pass printf_spec by value on stack. lib/vsprintf.c: append "..." if the *pb[l] output has been truncated. lib/vsprintf.c: increase t

Re: [PATCH] lib/vsprintf.c: increase the size of the field_width variable

2015-09-10 Thread Maurizio Lombardi
p_scnprintf, bscnl_emit, and > bitmap_scnlistprintf should be reverted. > > Thanks, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] lib/vsprintf.c: increase the size of the field_width variable

2015-09-10 Thread Maurizio Lombardi
On 09/10/2015 09:04 AM, Maurizio Lombardi wrote: > > scsi-debug used the bitmap_scnlistprintf() function but since commit > dbc760bcc150cc27160f0131b15db76350df4334 this function is just a wrapper > around scnprintf("%*pbl"); I just want to

Re: [PATCH] lib/vsprintf.c: increase the size of the field_width variable

2015-09-10 Thread Maurizio Lombardi
rintf("%*pbl"); as a consequence, the scsi-debug map_show() function stopped working correctly. Thanks, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] lib/vsprintf.c: increase the size of the field_width variable

2015-09-09 Thread Maurizio Lombardi
but still empty # cat /sys/bus/pseudo/drivers/scsi_debug/map Expected results: # cat /sys/bus/pseudo/drivers/scsi_debug/map 0-15 Signed-off-by: Maurizio Lombardi --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 95c

[PATCH V4] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-10-08 Thread Maurizio Lombardi
om: update bi_iter.bi_size before recounting segments] V4: merge_bvec_fn() must be called with the old bi_iter.bi_size value. Signed-off-by: Maurizio Lombardi Signed-off-by: Ming Lei --- block/bio.c | 54 ++ 1 file changed, 30 insertions(+), 24

[PATCH V4] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-09-01 Thread Maurizio Lombardi
om: update bi_iter.bi_size before recounting segments] V4: merge_bvec_fn() must be called with the old bi_iter.bi_size value. Signed-off-by: Maurizio Lombardi Signed-off-by: Ming Lei --- block/bio.c | 54 ++ 1 file changed, 30 insertions(+), 24

Re: [PATCH] bio: merge_bvec_fn() must be called with the old bi_iter.bi_size value

2014-08-11 Thread Maurizio Lombardi
Hi Jens, On 07/17/2014 10:49 AM, Maurizio Lombardi wrote: > The patch "bio: modify __bio_add_page() to accept pages that > don't start a new segment" updates bio->bi_iter.bi_size before > calling merge_bvec_fn(). > > This panics the kernel because merge_bvec_f

Re: Bug_ON with patch: bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-07-22 Thread Maurizio Lombardi
rnel&m=140558697215009&w=2 I really hope this is the last fix to it. Regards, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majord

[PATCH] bio: merge_bvec_fn() must be called with the old bi_iter.bi_size value

2014-07-17 Thread Maurizio Lombardi
7 4d 89 cf [ 25.931060] RIP [] dio_send_cur_page+0xd7/0xe3 [ 25.931088] RSP [ 25.931132] ---[ end trace 5bdcfa6254e32464 ]--- Reported-by: Valdis Kletnieks Signed-off-by: Maurizio Lombardi --- block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bio.c b/b

Re: Bug_ON with patch: bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-07-15 Thread Maurizio Lombardi
Hi, On 07/15/2014 10:44 AM, Maurizio Lombardi wrote: >> I have reverted it yesterday in my tree. >> > > > The problem was here: > > if (q->merge_bvec_fn) { > struct bvec_merge_data bvm = { >

Re: Bug_ON with patch: bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-07-15 Thread Maurizio Lombardi
On 07/15/2014 01:38 PM, Maurizio Lombardi wrote: > > > On 07/15/2014 10:14 AM, Mike Qiu wrote: >> My Power7 box boot fail with commit: >> >> 254c4407cb84a6dec90336054615b0f0e996bb7c >> bio: modify __bio_add_page() to accept pages that don't start a new s

Re: Bug_ON with patch: bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-07-15 Thread Maurizio Lombardi
70 28 e8 3f 44 de ff 48 85 c0 48 89 c3 74 61 0f 1f 80 00 [ 69.327190] RIP [] blk_throtl_drain+0x28/0x110 [ 69.333402] RSP [ 69.336937] CR2: 0028 [ 69.340275] ---[ end trace 3c89b44a6f5a2b9f ]--- Regards, Maurizio Lombardi -- To unsubscribe from this list: send the line &quo

Re: Bug_ON with patch: bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-07-15 Thread Maurizio Lombardi
1, bvec))) bio->bi_flags &= ~(1 << BIO_SEG_VALID); it should have been ".bi_size = bio->bi_iter.bi_size - len" Regards, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [Merge branch 'for] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028

2014-07-11 Thread Maurizio Lombardi
mand after the system boot is finished. Regards, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [Merge branch 'for] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028

2014-07-08 Thread Maurizio Lombardi
lock); blk_throtl_exit(q); < This is the function which will execute blk_throtl_drain() } Jens, Ming, do you have any idea? Regards, Maurizio Lombardi > [ 1012.896336] PGD 0 > [ 1012.896336] Oops: [#1] SMP > [ 1012.896336] Modules linked in: sd_mod scsi_debug(-)

Re: [PATCH] block/bio.c: update bi_iter.bi_size before recounting segments

2014-06-26 Thread Maurizio Lombardi
q) plus one > in failure path > > - driver will find the segment count is too big to handle. > > The patch fixes the virtio-blk oops bug reported from Jet Chen in > below link: > > http://marc.info/?l=linux-kernel&m=140113053817095&w=2 > > Cc: J

Re: [PATCH v2] scsi: bnx2i: bnx2i_iscsi.c: Cleaning up variable is set more than once

2014-06-26 Thread Maurizio Lombardi
On 06/26/2014 01:54 PM, Rickard Strandqvist wrote: > A struct member variable is set to different values without having used in > between. It is almost ok for me but I think you should mention that it also fixes a bug, or the commit message will be misleading. > > This was found using a stati

Re: [PATCH v2] scsi: bnx2i: bnx2i_iscsi.c: Cleaning up variable is set more than once

2014-06-26 Thread Maurizio Lombardi
On 06/26/2014 02:05 PM, Joe Perches wrote: > On Thu, 2014-06-26 at 13:54 +0200, Rickard Strandqvist wrote: >> A struct member variable is set to different values without having used in >> between. > [] >> diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c >> b/drivers/scsi/bnx2i/bnx2i_iscsi.c > [] >

Re: [PATCH] scsi: pm8001: pm80xx_hwi.c: Cleaning up variable is set more than once

2014-06-26 Thread Maurizio Lombardi
removed. Regards, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] scsi: bnx2i: bnx2i_iscsi.c: Cleaning up variable is set more than once

2014-06-26 Thread Maurizio Lombardi
orrect (it didn't modify the function behaviour) but helped to spot a defect. > > But I'll make a new patch then, with = 3 ? Yes, please submit a new patch which sets custom_length = 3 at the end of the function. Thanks, Maurizio Lombardi -- To unsubscribe from this list: send t

Re: [PATCH] scsi: pm8001: pm80xx_hwi.c: Cleaning up variable is set more than once

2014-06-25 Thread Maurizio Lombardi
eve it requires the maintainer ACK and it takes precedence in any case, am I wrong? Regards, Maurizio Lombardi > > thanks, > Purush > > > On Wed, Jun 25, 2014 at 8:34 AM, Maurizio Lombardi > wrote: > >> This one looks good to me, >> >> Reviewed-by: Maurizi

Re: [PATCH] scsi: pm8001: pm80xx_hwi.c: Cleaning up variable is set more than once

2014-06-25 Thread Maurizio Lombardi
This one looks good to me, Reviewed-by: Maurizio Lombardi On 06/25/2014 04:01 PM, Rickard Strandqvist wrote: > A struct member variable is set to different values without having used in > between. > > This was found using a static code analysis program called cppcheck >

Re: [PATCH] scsi: bnx2i: bnx2i_iscsi.c: Cleaning up variable is set more than once

2014-06-25 Thread Maurizio Lombardi
tom_length = 3; > strcpy(stats->custom[2].desc, "eh_abort_cnt"); > stats->custom[2].value = conn->eh_abort_cnt; > stats->digest_err = 0; > Eddie, The code modifies the content of stats->custom[2], so shouldn't custom_length be set to 3?

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Maurizio Lombardi
; > failed: > @@ -810,6 +811,7 @@ static int __bio_add_page(struct request_queue *q, struct > bio *bio, struct page > bvec->bv_len = 0; > bvec->bv_offset = 0; > bio->bi_vcnt--; > + bio->bi_iter.bi_size -= len; > blk_recount_segments(

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Maurizio Lombardi
s a little mistake in your patch, you removed bio->bi_iter.bi_size += len; after the "done" label, but be careful that at line 747 there is a "goto done"... bi_size should be incremented before jumping there. Thanks, Maurizio Lombardi -- To unsubscribe from this list: se

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Maurizio Lombardi
n as reported by Jet Chen. > That results in a kernel BUG at drivers/block/virtio_blk.c:166. > > To fix that, bi_iter.bi_size must be decreased by len, before > recounting the number of physical segments. I don't understand exactly why it must be decreased by len. Can you pro

Re: [jet.c...@intel.com: [bio] kernel BUG at drivers/block/virtio_blk.c:166!]

2014-05-28 Thread Maurizio Lombardi
, don't test my patch, it is not needed anymore, please test Dongsu's patch instead so we are sure the regression is fixed. Thanks, Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vge

Re: [PATCH V3] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-05-27 Thread Maurizio Lombardi
d the regression introduced by commit 3979ef4dcf Maurizio Lombardi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH V3] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-05-27 Thread Maurizio Lombardi
unction returned an error way before executing it (line 760) There was already a patchset trying to modify the code in a different way than mine: https://groups.google.com/forum/#!msg/linux.kernel/3IanUpBVhFQ/3Xbg3yLRFp4J but it has been ignored and in my opinion it takes a more complicated a

Re: [jet.c...@intel.com: [bio] kernel BUG at drivers/block/virtio_blk.c:166!]

2014-05-27 Thread Maurizio Lombardi
On Tue, May 27, 2014 at 10:43:59AM +0200, Maurizio Lombardi wrote: > > But now I'm suspicious of this part of commit 3979ef4dcf: > > failed: > bvec->bv_page = NULL; > bvec->bv_len = 0; > bvec->bv

Re: [PATCH V3] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-05-27 Thread Maurizio Lombardi
age() is called with *different* pages as parameter but physically adjacent to each other. That said it is true that maybe this branch can be extended to also cover the case I'm dealing with and try to avoid the problem that commit 3979ef4dcf introduced. Thanks, Maurizio Lombardi

Re: [jet.c...@intel.com: [bio] kernel BUG at drivers/block/virtio_blk.c:166!]

2014-05-27 Thread Maurizio Lombardi
On Tue, May 27, 2014 at 12:03:29PM +0800, Ming Lei wrote: > On Tue, May 27, 2014 at 3:43 AM, Maurizio Lombardi > wrote: > > Hi Jens, > > > > looks like that commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d > > ("bio-modify-__bio_add_page-to-accept-pag

[PATCH V3] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-05-01 Thread Maurizio Lombardi
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

Re: [PATCH] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-04-29 Thread Maurizio Lombardi
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

[PATCH V2] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-04-29 Thread 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 --

[PATCH] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-04-29 Thread 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 --

[PATCH] intel_pstate: fix race condition in intel_pstate_init()

2014-02-09 Thread Maurizio Lombardi
ed TSC clocksource calibration: 3092.975 MHz [2.760048] divide error: [#2] [2.760064] ---[ end trace b87c91b37801378a ]--- [2.761931] Kernel panic - not syncing: Fatal exception in interrupt Signed-off-by: Maurizio Lombardi --- drivers/cpufreq/intel_pstate.c | 6 +++--- 1 file chan

[PATCH RESEND] wlags49_h2: Fix overflow in wireless_set_essid()

2014-02-05 Thread Maurizio Lombardi
This patch prevents the wireless_set_essid() function from overwriting the last byte of the NetworkName buffer which must be NULL. Signed-off-by: Maurizio Lombardi --- drivers/staging/wlags49_h2/wl_wext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH v2] wlags49_h2: Fix overflow in wireless_set_essid()

2013-11-28 Thread Maurizio Lombardi
This patch prevents the wireless_set_essid() function from overwriting the last byte of the NetworkName buffer which must be NULL. Signed-off-by: Maurizio Lombardi --- drivers/staging/wlags49_h2/wl_wext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] wlags49_h2: Fix overflow in wireless_set_essid()

2013-11-28 Thread Maurizio Lombardi
This patch prevents the wireless_set_essid() function from overwriting the last byte of the NetworkName buffer which must be NULL. --- drivers/staging/wlags49_h2/wl_wext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wl

[PATCH v2] wlags49_h2: Fix overflow in wireless_set_essid()

2013-11-28 Thread Maurizio Lombardi
This patch prevents the wireless_set_essid() function from overwriting the last byte of the NetworkName buffer which must be NULL. Signed-off-by: Maurizio Lombardi --- drivers/staging/wlags49_h2/wl_wext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] kobject: fix memory leak in kobject_set_name_vargs

2013-11-28 Thread Maurizio Lombardi
If the call to kvasprintf fails then the old name of the object will be leaked, this patch fixes the bug by restoring the old name before returning ENOMEM. Signed-off-by: Maurizio Lombardi --- lib/kobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kobject.c b

[PATCH] kobject: fix memory leak in kobject_set_name_vargs

2013-11-08 Thread Maurizio Lombardi
If the call to kvasprintf fails then the old name of the object will be leaked, this patch fixes the bug by restoring the old name before returning ENOMEM. Signed-off-by: Maurizio Lombardi --- lib/kobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kobject.c b