linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Greg KH <greg@kroah.com>
Cc: Antonio Borneo <borneo.antonio@gmail.com>,
	Jiri Kosina <jkosina@suse.cz>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] HID: i2c-hid: fix race condition reading reports
Date: Mon, 17 Nov 2014 17:07:06 -0500	[thread overview]
Message-ID: <20141117220706.GD30324@mail.corp.redhat.com> (raw)
In-Reply-To: <20141117215111.GA19828@kroah.com>

On Nov 17 2014 or thereabouts, Greg KH wrote:
> On Mon, Nov 17, 2014 at 04:43:05PM -0500, Benjamin Tissoires wrote:
> > Hey Antonio,
> > 
> > On Nov 16 2014 or thereabouts, Antonio Borneo wrote:
> > > From: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
> > > 
> > > From: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
> > > 
> > > Current driver uses a common buffer for reading reports either
> > > synchronously in i2c_hid_get_raw_report() and asynchronously in
> > > the interrupt handler.
> > > There is race condition if an interrupt arrives immediately after
> > > the report is received in i2c_hid_get_raw_report(); the common
> > > buffer is modified by the interrupt handler with the new report
> > > and then i2c_hid_get_raw_report() proceed using wrong data.
> > > 
> > > Fix it by using a separate buffers for asynchronous reports.
> > > 
> > > Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
> > > [Antonio Borneo: cleanup and rebase to v3.17]
> > > Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
> > > Cc: stable@vger.kernel.org
> > 
> > For your next submission, when you want a patch to go in stable, put CC
> > here, but please do not CC the actual mail to stable@. Stable should receive
> > either mails which are already in Linus' tree, or which refer a commit
> > in Linus' tree in case it does not applies smoothly.
> > 
> > [keeping stable@ here to show them that this one should not get picked
> > right now]
> 
> stable@ is smarter than that, I don't mind seeing patches that are
> coming in the future like this at all, it's not a problem.
> 

OK. Sorry for the noise then. I assumed that if everybody starts sending
potential patches to stable without them being the accepted ones, you
will end up having to deal with a lot more workload that you already have.

And just to be sure that there is no misinterpretation, I did not wanted
to imply that stable was not smart enough to deal with such patches... I
really appreciate the work done and my concern was to not add workload.

Cheers,
Benjamin

> thanks,
> 
> greg k-h

  reply	other threads:[~2014-11-17 22:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16 14:44 [PATCH] HID: i2c-hid: fix race condition reading reports Antonio Borneo
2014-11-17 21:43 ` Benjamin Tissoires
2014-11-17 21:51   ` Greg KH
2014-11-17 22:07     ` Benjamin Tissoires [this message]
2014-11-19 16:37   ` Antonio Borneo
2014-11-19 16:46 ` [PATCH V2] " Antonio Borneo
2014-11-24 16:07   ` Benjamin Tissoires
2014-11-25 14:26     ` Jiri Kosina

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=20141117220706.GD30324@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=borneo.antonio@gmail.com \
    --cc=greg@kroah.com \
    --cc=jkosina@suse.cz \
    --cc=jmaneyrol@invensense.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).