All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org,
	markhe@nextd.demon.co.uk, andrea@suse.de,
	James.Bottomley@steeleye.com, axboe@suse.de,
	penberg@cs.helsinki.fi
Subject: Re: Slab corruption in 2.6.16-rc5-mm2
Date: Mon, 06 Mar 2006 21:15:11 -0600	[thread overview]
Message-ID: <440CFABF.5040403@cs.wisc.edu> (raw)
In-Reply-To: <9a8748490603061524j616bf6b3i1b6ab5354bcfe1a9@mail.gmail.com>

Jesper Juhl wrote:
> On 3/7/06, Andrew Morton <akpm@osdl.org> wrote:
> 
>>"Jesper Juhl" <jesper.juhl@gmail.com> wrote:
>>
>>>And since 2.6.16-rc5-git8 is not experiencing problems I'd suggest you
>>> perhaps instead take a look at what's in -mm... That's where we need
>>> to work (it seems) to find the bug...
>>
>>Yes, it's very probably something in git-scsi-misc.
>>
> 
> I would say that's correct. I just build 2.6.16-rc5-mm2 with just
> git-scsi-misc.patch reverted, and that makes the problem go away.
> 
> So now the big question is; what part(s) of git-scsi-misc is broken?
> 

Is it relate to this change?

diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
index 5d02ff4..03fbc4b 100644
--- a/drivers/scsi/sr_ioctl.c
+++ b/drivers/scsi/sr_ioctl.c
@@ -44,11 +44,10 @@ static int sr_read_tochdr(struct cdrom_d
         int result;
         unsigned char *buffer;

-       buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
+       buffer = kzalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
         if (!buffer)
                 return -ENOMEM;

-       memset(&cgc, 0, sizeof(struct packet_command));         cgc.timeout = IOCTL_TIMEOUT;
         cgc.cmd[0] = GPCMD_READ_TOC_PMA_ATIP;         cgc.cmd[8] = 12;                /* LSB of length */
@@ -74,11 +73,10 @@ static int sr_read_tocentry(struct cdrom
         int result;
         unsigned char *buffer;

-       buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
+       buffer = kzalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
         if (!buffer)
                 return -ENOMEM;

-       memset(&cgc, 0, sizeof(struct packet_command));




When someone converted the *buffer* allocation to kzalloc they
also removed the the memset for the *packet_cmmand* struct.

The

memset(&cgc, 0, sizeof(struct packet_command));

should be added back I think.

  parent reply	other threads:[~2006-03-07  3:15 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06  0:17 Slab corruption in 2.6.16-rc5-mm2 Jesper Juhl
2006-03-06 18:25 ` Linus Torvalds
2006-03-06 18:43   ` Jesper Juhl
2006-03-06 19:32     ` Linus Torvalds
2006-03-06 19:51       ` Jesper Juhl
2006-03-06 19:58         ` Jesper Juhl
2006-03-06 20:06       ` Linus Torvalds
2006-03-06 20:24         ` Jesper Juhl
2006-03-06 20:30           ` Jens Axboe
2006-03-06 20:33             ` Jens Axboe
2006-03-06 21:14               ` Jesper Juhl
2006-03-06 21:41             ` Jesper Juhl
2006-03-06 21:55               ` Dave Jones
2006-03-06 21:57                 ` Jesper Juhl
2006-03-09 15:50                 ` Martin J. Bligh
2006-03-09 15:54                   ` Martin J. Bligh
2006-03-09 15:54                   ` Benjamin LaHaise
2006-03-09 16:04                     ` Martin J. Bligh
2006-03-09 16:08                   ` Linus Torvalds
2006-03-09 16:41                     ` Dave Jones
2006-03-06 20:36         ` Jesper Juhl
2006-03-06 20:53           ` Jesper Juhl
2006-03-06 20:56             ` Jesper Juhl
2006-03-06 21:07               ` Linus Torvalds
2006-03-06 21:16                 ` Jesper Juhl
2006-03-06 21:54                 ` Jesper Juhl
2006-03-06 22:05                   ` Andrew Morton
2006-03-06 22:08                     ` Jesper Juhl
2006-03-06 22:27                       ` Jesper Juhl
2006-03-06 22:17                   ` Linus Torvalds
2006-03-06 22:34                     ` Linus Torvalds
2006-03-06 22:52                       ` Jesper Juhl
2006-03-06 22:54                       ` Linus Torvalds
2006-03-06 23:01                         ` Jesper Juhl
2006-03-06 23:06                           ` Andrew Morton
2006-03-06 23:24                             ` Jesper Juhl
2006-03-07  0:17                               ` Linus Torvalds
2006-03-07  0:25                                 ` Jesper Juhl
2006-03-07  3:15                               ` Mike Christie [this message]
2006-03-07  3:20                                 ` Linus Torvalds
2006-03-07 18:01                                   ` James Bottomley
2006-03-07 19:40                                     ` Jesper Juhl
2006-03-07  8:47                       ` [PATCH] slab: fix offslab_limit in calculate_slab_order (Was: Slab corruption in 2.6.16-rc5-mm2) Pekka J Enberg
2006-03-07 17:12                         ` Linus Torvalds
2006-03-07 19:21                           ` Pekka Enberg
2006-03-07 19:28                       ` Slab corruption in 2.6.16-rc5-mm2 Bill Davidsen
2006-03-06 22:44                     ` Jesper Juhl
2006-03-06 18:48   ` Mike Christie
2006-03-06 18:49     ` Mike Christie
  -- strict thread matches above, loose matches on Subject: below --
2006-03-08  6:25 Chuck Ebbert
2006-03-08  8:32 ` Nick Piggin
2006-03-08  8:46   ` Andrew Morton
2006-03-08  9:02     ` Nick Piggin
2006-03-08  9:12       ` Andrew Morton
2006-03-08  9:23         ` Nick Piggin
2006-03-08 14:35           ` Lee Schermerhorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=440CFABF.5040403@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=axboe@suse.de \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markhe@nextd.demon.co.uk \
    --cc=penberg@cs.helsinki.fi \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.