From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
linux-xfs@vger.kernel.org,
syzbot+b75afdbe271a0d7ac4f6@syzkaller.appspotmail.com
Subject: Re: [PATCH] xfs: fix iclog allocation size
Date: Fri, 28 Jun 2019 15:19:14 -0700 [thread overview]
Message-ID: <20190628221914.GD1404256@magnolia> (raw)
In-Reply-To: <20190628220253.GF30113@42.do-not-panic.com>
On Fri, Jun 28, 2019 at 10:02:53PM +0000, Luis Chamberlain wrote:
> On Thu, Jun 27, 2019 at 04:39:50PM +0200, Christoph Hellwig wrote:
> > Properly allocate the space for the bio_vecs instead of just one byte
> > per bio_vec.
> >
> > Fixes: 991fc1d2e65e ("xfs: use bios directly to write log buffers")
>
> I cannot find 991fc1d2e65e on Linus' tree, nor can I find the subject
> name patch on Linus' tree. I'm probably missing some context here?
This patch fixes a bug in for-next. :)
--D
> > Reported-by: syzbot+b75afdbe271a0d7ac4f6@syzkaller.appspotmail.com
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > ---
> > fs/xfs/xfs_log.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> > index 0f849b4095d6..e230f3c18ceb 100644
> > --- a/fs/xfs/xfs_log.c
> > +++ b/fs/xfs/xfs_log.c
> > @@ -1415,7 +1415,8 @@ xlog_alloc_log(
> > */
> > ASSERT(log->l_iclog_size >= 4096);
> > for (i = 0; i < log->l_iclog_bufs; i++) {
> > - size_t bvec_size = howmany(log->l_iclog_size, PAGE_SIZE);
> > + size_t bvec_size = howmany(log->l_iclog_size, PAGE_SIZE) *
> > + sizeof(struct bio_vec);
> >
> > iclog = kmem_zalloc(sizeof(*iclog) + bvec_size, KM_MAYFAIL);
> > if (!iclog)
> > --
> > 2.20.1
> >
next prev parent reply other threads:[~2019-06-28 22:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 14:39 [PATCH] xfs: fix iclog allocation size Christoph Hellwig
2019-06-27 15:13 ` Darrick J. Wong
2019-06-28 22:02 ` Luis Chamberlain
2019-06-28 22:19 ` Darrick J. Wong [this message]
2019-06-28 22:23 ` Luis Chamberlain
2019-06-28 22:25 ` Darrick J. Wong
2019-06-28 22:32 ` Luis Chamberlain
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=20190628221914.GD1404256@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=syzbot+b75afdbe271a0d7ac4f6@syzkaller.appspotmail.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