Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1615707
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] zram: handle multiple pages attached bio's bvec |
| Date | Tue, 04 Apr 2017 07:00:02 +0200 |
| Message-ID | <tsoJs-8um-15@gated-at.bofh.it> (permalink) |
| References | <ts2zg-2z9-3@gated-at.bofh.it> <ts2zg-2z9-19@gated-at.bofh.it> |
| X-Original-To | Minchan Kim <minchan@kernel.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ap72cZB57SHbzSkSBWQ+S/s1IeTEsBqOk4AvcqmYOaA=; b=DJ2epgvf7PBerq/Y8FM84iDYX3CW8sZ9Gk9DYqYT8LpCwAlD+jjVYTE6uLVnqZNGbd J+/RNeJkqWVL3ExzJTLkTlpYCmzY6oCJ1cOTanOyh0fTJ+0ZCsodK9Z4PAQlJcNhI4i+ 7DvurIOdrKEvQPaUMoSCySZooptLlrzOBEMgBFYbgpML99IY/WxVBCDam0z3zwYrMsar SixYbNb+5oPtsFIqJkTmxz5AHW+cAeGPMFUb3+mHU6vfNjS/Mh+YF+FalWqYQshiuxCS sqdS0xE6BE5VR87yNpzUrpM3otidQiA41dYSxkkuW2ZelOCE9HaLT7R+BUjxXhrYAzyD QgWg== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ap72cZB57SHbzSkSBWQ+S/s1IeTEsBqOk4AvcqmYOaA=; b=C2sJcIRCafkwr3Bvx1zIYoP3ko5MHsxFoX+TTkcddxVwOeOlY8LQrFA04HgbR8jKz3 N6+M14NmEnAWmzkEKWqk36oi4wNnExiyFBk6KRPVPcD40EeucdZ56wUm4Py86r+Rx7Id VnjDuXXc6ynzU9BL83i5F67BCiGZLCfKGYeBzPQXFHw25mBF84BWqqt0hxjBt7BIPJnZ YQAlk8VXNcQ/WeCkMDR/CXnTeEQAVD0AjlMvNTXsomyzmTtGty64xlpPHbzdAXRnQhFz dGvZUI6L6sI5ucDZme1b1AY0T1Jwp5Ssy4pcLtWmOY7Yo+q1Ij7Q0FRBnNJMpWJEoV88 A/Aw== |
| X-Gm-Message-State | AFeK/H0thiu+x1WhV2UJH0F09wqSQAqNQ/e2429w4faRuJTeIk+3AaxkjzK6fFjjtp0j9Q== |
| X-Received | by 10.98.93.90 with SMTP id r87mr20834625pfb.226.1491281708577; Mon, 03 Apr 2017 21:55:08 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.8.0 (2017-02-23) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 35 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, kernel-team@lge.com, Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.com>, Johannes Thumshirn <jthumshirn@suse.de> |
| X-Original-Date | Tue, 4 Apr 2017 13:55:09 +0900 |
| X-Original-Message-ID | <20170404045509.GA470@jagdpanzerIV.localdomain> |
| X-Original-References | <1491196653-7388-1-git-send-email-minchan@kernel.org> <1491196653-7388-2-git-send-email-minchan@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1615707 |
Show key headers only | View raw
On (04/03/17 14:17), Minchan Kim wrote: > Johannes Thumshirn reported system goes the panic when using NVMe over > Fabrics loopback target with zram. > > The reason is zram expects each bvec in bio contains a single page > but nvme can attach a huge bulk of pages attached to the bio's bvec > so that zram's index arithmetic could be wrong so that out-of-bound > access makes panic. > > It can be solved by limiting max_sectors with SECTORS_PER_PAGE like > [1] but it makes zram slow because bio should split with each pages > so this patch makes zram aware of multiple pages in a bvec so it > could solve without any regression. > > [1] 0bc315381fe9, zram: set physical queue limits to avoid array out of > bounds accesses > > Cc: Jens Axboe <axboe@kernel.dk> > Cc: Hannes Reinecke <hare@suse.com> > Reported-by: Johannes Thumshirn <jthumshirn@suse.de> > Tested-by: Johannes Thumshirn <jthumshirn@suse.de> > Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> > Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> > Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> > + unsigned int remained = bvec.bv_len; ... > + } while (remained); a tiny nitpick, "-ed" in variable name looks a bit unusual. -ss
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/5] zram: handle multiple pages attached bio's bvec Minchan Kim <minchan@kernel.org> - 2017-04-03 07:20 +0200
Re: [PATCH 1/5] zram: handle multiple pages attached bio's bvec Andrew Morton <akpm@linux-foundation.org> - 2017-04-04 00:50 +0200
Re: [PATCH 1/5] zram: handle multiple pages attached bio's bvec Minchan Kim <minchan.kim@lge.com> - 2017-04-04 01:20 +0200
Re: [PATCH 1/5] zram: handle multiple pages attached bio's bvec Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-04 07:00 +0200
csiph-web