* [PATCH 2/2] Forgotten memset
@ 2006-07-19 1:34 Panagiotis Issaris
2006-07-19 1:49 ` Daniel K.
0 siblings, 1 reply; 3+ messages in thread
From: Panagiotis Issaris @ 2006-07-19 1:34 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-eata
From: Panagiotis Issaris <takis@issaris.org>
Was this forgotten and therefore, is it necessary or useful to zero this
out?
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
---
Applies to current GIT or 2.6.18-rc2. Compile-tested with
make allyesconfig.
drivers/scsi/ide-scsi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 57f460e..ee1662c 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -327,7 +327,7 @@ static int idescsi_check_condition(ide_d
/* stuff a sense request in front of our current request */
pc = kzalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
- rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
+ rq = kzalloc (sizeof (struct request), GFP_ATOMIC);
buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
if (pc == NULL || rq == NULL || buf == NULL) {
kfree(buf);
--
1.4.1.gd3ba6
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] Forgotten memset
2006-07-19 1:34 [PATCH 2/2] Forgotten memset Panagiotis Issaris
@ 2006-07-19 1:49 ` Daniel K.
2006-07-20 17:21 ` Panagiotis Issaris
0 siblings, 1 reply; 3+ messages in thread
From: Daniel K. @ 2006-07-19 1:49 UTC (permalink / raw)
To: Panagiotis Issaris; +Cc: linux-kernel, linux-eata
Panagiotis Issaris wrote:
> --- a/drivers/scsi/ide-scsi.c
> +++ b/drivers/scsi/ide-scsi.c
> @@ -327,7 +327,7 @@ static int idescsi_check_condition(ide_d
>
> /* stuff a sense request in front of our current request */
> pc = kzalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
> - rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
> + rq = kzalloc (sizeof (struct request), GFP_ATOMIC);
> buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
> if (pc == NULL || rq == NULL || buf == NULL) {
> kfree(buf);
>
> Was this forgotten and therefore, is it necessary or useful to zero this
> out?
No, this code snippet is followed by a call to
ide_init_drive_cmd(rq)
which calls memset()
Daniel K.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] Forgotten memset
2006-07-19 1:49 ` Daniel K.
@ 2006-07-20 17:21 ` Panagiotis Issaris
0 siblings, 0 replies; 3+ messages in thread
From: Panagiotis Issaris @ 2006-07-20 17:21 UTC (permalink / raw)
To: Daniel K.; +Cc: Panagiotis Issaris, linux-kernel, linux-eata
Hi,
On wo, 2006-07-19 at 01:49 +0000, Daniel K. wrote:
> Panagiotis Issaris wrote:
> > --- a/drivers/scsi/ide-scsi.c
> > +++ b/drivers/scsi/ide-scsi.c
> > @@ -327,7 +327,7 @@ static int idescsi_check_condition(ide_d
> >
> > /* stuff a sense request in front of our current request */
> > pc = kzalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
> > - rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
> > + rq = kzalloc (sizeof (struct request), GFP_ATOMIC);
> > buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
> > if (pc == NULL || rq == NULL || buf == NULL) {
> > kfree(buf);
> >
> > Was this forgotten and therefore, is it necessary or useful to zero this
> > out?
>
> No, this code snippet is followed by a call to
>
> ide_init_drive_cmd(rq)
>
> which calls memset()
Ouch. I should have seen that. Thanks!
With friendly regards,
Takis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-20 17:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-19 1:34 [PATCH 2/2] Forgotten memset Panagiotis Issaris
2006-07-19 1:49 ` Daniel K.
2006-07-20 17:21 ` Panagiotis Issaris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox