mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "syzkaller@googlegroups.com" <syzkaller@googlegroups.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"dgilbert@interlog.com" <dgilbert@interlog.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"dvyukov@google.com" <dvyukov@google.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>
Subject: Re: scsi: memory leak in sg_start_req
Date: Thu, 11 Jan 2018 16:28:28 +0000	[thread overview]
Message-ID: <1515688107.2752.12.camel@wdc.com> (raw)
In-Reply-To: <f30afef5-5123-72c2-aa41-4fbbde334fb4@interlog.com>

On Thu, 2018-01-11 at 01:04 -0500, Douglas Gilbert wrote:
> Monitoring that program with 'free' from another terminal I see
> about 2.5 GBytes of ram "swallowed" almost immediately when the test
> program runs. When the program exits (about 50 seconds later) as far
> as I can see all that ram is given back.

Hello Doug,

There is probably something that's leaking memory in one of the functions in
the reported call stack. kmemleak reports the following in my tests (I haven't
had the time yet to analyze this further):

unreferenced object 0xffff880363c09088 (size 192): 
 comm "multipath", pid 20088, jiffies 4295034706 (age 6544.980s) 
 hex dump (first 32 bytes): 
   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................ 
   00 00 00 00 20 00 00 00 12 01 00 00 00 00 00 00  .... ........... 
 backtrace: 
   [<ffffffff81659e1a>] kmemleak_alloc+0x4a/0xa0 
   [<ffffffff811f51fe>] __kmalloc+0x16e/0x320 
   [<ffffffff812e4848>] bio_alloc_bioset+0x198/0x1f0 
   [<ffffffff812e51b9>] bio_map_user_iov+0x129/0x3f0 
   [<ffffffff812f5863>] blk_rq_map_user_iov+0x123/0x210 
   [<ffffffff812f5a02>] blk_rq_map_user+0x52/0x60 
   [<ffffffff8130b7b5>] sg_io+0x385/0x3c0 
   [<ffffffff8130bad3>] scsi_cmd_ioctl+0x2e3/0x450 
   [<ffffffff8130bc82>] scsi_cmd_blk_ioctl+0x42/0x50 
   [<ffffffff8148d835>] sd_ioctl+0x85/0x110 
   [<ffffffff81302bfb>] blkdev_ioctl+0x4db/0x970 
   [<ffffffff812660fd>] block_ioctl+0x3d/0x50 
   [<ffffffff812348d4>] do_vfs_ioctl+0x94/0x670 
   [<ffffffff81234ef1>] SyS_ioctl+0x41/0x70 
   [<ffffffff81001e5c>] do_syscall_64+0x5c/0x110 
   [<ffffffff81667564>] return_from_SYSCALL_64+0x0/0x7a

Bart.

      parent reply	other threads:[~2018-01-11 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 16:05 Dmitry Vyukov
2018-01-11  6:04 ` Douglas Gilbert
2018-01-11  8:23   ` Dmitry Vyukov
2018-01-11 16:28   ` Bart Van Assche [this message]

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=1515688107.2752.12.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=dgilbert@interlog.com \
    --cc=dvyukov@google.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=syzkaller@googlegroups.com \
    /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 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®