mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [Samsung] bsg-lib.c patch for double-free error fix.
       [not found] ` <1591680112.4972876.1768210810254@v8mail-kr2-6.v8mail-kr2.knoxportal-kr-prod-blue.svc.cluster.local>
@ 2026-01-12 15:36   ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2026-01-12 15:36 UTC (permalink / raw)
  To: jonghwi.rha
  Cc: linux-block, linux-kernel, hch, 김정태,
	정혜연

Please don't send patches as attachments, and particularly with html
emails as they will just get dropped from the list. And it makes it
impossible to reply to as well, as you then need to save and read the
patch separately and import it into an email...

> Change-Id: Iadb96f8736f8d9d9aae7b4a831c2a286ff59c520

What is this?

diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index 9ceb5d0832f5..635b3b988f92 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -215,7 +215,7 @@ static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
 
 	BUG_ON(!req->nr_phys_segments);
 
-	buf->sg_list = kmalloc(sz, GFP_KERNEL);
+	buf->sg_list = kzalloc(sz, GFP_KERNEL);
 	if (!buf->sg_list)
 		return -ENOMEM;
 	sg_init_table(buf->sg_list, req->nr_phys_segments);

How does this make a difference, when sg_init_table() explicitly sets it
all to 0?

-- 
Jens Axboe

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

* Re: [Samsung] bsg-lib.c patch for double-free error fix.
  2026-02-02 12:04 ` 라종휘
@ 2026-02-05  3:46   ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2026-02-05  3:46 UTC (permalink / raw)
  To: jonghwi.rha
  Cc: linux-block, linux-kernel, hch, 김정태,
	정혜연

On 2/2/26 5:04 AM, ??? wrote:
> Dear Jens,
> 
> Sorry for the excuse, also thank you for the response. 
> 
> It was my first time with the procedure, so there was a mistake. I
> apologize for the inconvenience. As you mentioned, in the case of the
> previous patch, there was duplicate code, so changing it to kzalloc
> would indeed be meaningless.
> 
> We have prepared a new patch and completed internal testing on our
> side. Without this patch, issues occur when using ufs-bsg.

This patch looks better. Can you please send it out as a separate email?

-- 
Jens Axboe

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

end of thread, other threads:[~2026-02-05  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20260112094010epcms2p518c5eb5408f90ceb7ef5739a0fbf7f65@epcms2p5>
     [not found] ` <1591680112.4972876.1768210810254@v8mail-kr2-6.v8mail-kr2.knoxportal-kr-prod-blue.svc.cluster.local>
2026-01-12 15:36   ` [Samsung] bsg-lib.c patch for double-free error fix Jens Axboe
     [not found] <CGME20260130091020epcms2p2d85af8781639a17ab517208feb270dbd@epcms2p4>
2026-02-02 12:04 ` 라종휘
2026-02-05  3:46   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®