public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Nick Desaulniers <ndesaulniers@google.com>, hch@infradead.org
Cc: Doug Gilbert <dgilbert@interlog.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Robb Glasser <rglasser@google.com>,
	evgreen@chromium.org, stable@vger.kernel.org
Subject: Re: [PATCH RESEND] scsi: sg: Prevent potential double frees in sg driver
Date: Mon, 01 Oct 2018 10:20:37 -0700	[thread overview]
Message-ID: <1538414437.171728.7.camel@acm.org> (raw)
In-Reply-To: <CAKwvOdmtF-s4amu-zXbyUNe+jvCuC3hXUez6fVVq0sjuoYc3eg@mail.gmail.com>

On Mon, 2018-10-01 at 10:12 -0700, Nick Desaulniers wrote:
> On Mon, Oct 1, 2018 at 9:16 AM Evan Green <evgreen@chromium.org> wrote:
> > 
> > From: Robb Glasser <rglasser@google.com>
> > 
> > sg_ioctl could be spammed by requests, leading to a double free in
> > __free_pages. This protects the entry points of sg_ioctl where the
> > memory could be corrupted by a double call to __free_pages if multiple
> > requests are happening concurrently.
> > 
> > Signed-off-by: Robb Glasser <rglasser@google.com>
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> > Signed-off-by: Evan Green <evgreen@chromium.org>
> > Cc: stable@vger.kernel.org
> > 
> > ---
> > Reposting this patch from last summer, as it looks like it fell in between
> > the cracks.
> 
> Christoph, do you still feel strongly about: https://lkml.org/lkml/2017/8/5/75 ?

I don't know how Christoph feels about it, but serializing all SG I/O seems
like a regression to me. If one sg command hangs I usually try to send
another sg command to the same SCSI device from another shell to get more
information about the nature of the hang. Serializing all SG I/O would make
that impossible.

Bart.

  reply	other threads:[~2018-10-01 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 16:15 [PATCH RESEND] scsi: sg: Prevent potential double frees in sg driver Evan Green
2018-10-01 17:12 ` Nick Desaulniers
2018-10-01 17:20   ` Bart Van Assche [this message]
2018-10-01 23:34 ` Douglas Gilbert
2018-10-02 15:21   ` Evan Green

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=1538414437.171728.7.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=dgilbert@interlog.com \
    --cc=evgreen@chromium.org \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ndesaulniers@google.com \
    --cc=rglasser@google.com \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox