linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@gmail.com>
To: davor emard <davoremard@gmail.com>
Cc: Aristeu Rozanski <aris@cathedrallabs.org>, linux-input@vger.kernel.org
Subject: Re: uinput oopses and bugs
Date: Fri, 28 Mar 2008 20:46:59 +0200	[thread overview]
Message-ID: <47ED3D23.5050605@gmail.com> (raw)
In-Reply-To: <beee72200803271755u468f5d0djd10d282593644a7d@mail.gmail.com>

davor emard wrote:
>>> There is also a still issue with segfault and unkillable driver.
>>> I upload custom FF effect, driver segfaults but doesn't exit
>>> and becomes zombie
>> please test the attached patch
> 
> The patch now avoids the zombie lockup coming from segmentation
> fault.  Thanks a lot, that is great step forward!
> 
> However it's still not clear to me why do I get this segmentation
> fault when I try to upload a block of FF_CUSTOM sample data.
> I made my code mainly from looking at the kernel source without
> having any example - anyone on the list can point link to some small
> code example?
> 
> in uinput-zombie, I've prepared the data in application, ioctl'ed them
> to uinput event device and the uinput driver segfaults when
> it tries to read the portion of  FF_CUSTOM data.

I think uinput needs special handling for FF_CUSTOM to deliver the ff
data to userspace. AFAIK the segfault occurs because the uinput driver
tries to read the data pointer, while the data is only in kernel and not
copied to userspace.

I haven't seen any driver yet, uinput or in-kernel, that supports
FF_CUSTOM, so this could've been overlooked quite easily. It is in my
TODO to implement it for PID devices, but I do not have time anytime soon.

-- 
Anssi Hannula

  reply	other threads:[~2008-03-28 18:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <beee72200803260141y59b96c56n9fccfda6c72d1783@mail.gmail.com>
     [not found] ` <20080326132844.GC25854@cathedrallabs.org>
     [not found]   ` <beee72200803260709p7239ae8etb4e00b608bbfb6bc@mail.gmail.com>
     [not found]     ` <20080326182314.GF25854@cathedrallabs.org>
     [not found]       ` <beee72200803270115v72eb1cd3s38ae90a4efd6acd1@mail.gmail.com>
     [not found]         ` <20080327202245.GK25854@cathedrallabs.org>
2008-03-28  0:55           ` uinput oopses and bugs davor emard
2008-03-28 18:46             ` Anssi Hannula [this message]
2008-03-28 19:07               ` davor emard

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=47ED3D23.5050605@gmail.com \
    --to=anssi.hannula@gmail.com \
    --cc=aris@cathedrallabs.org \
    --cc=davoremard@gmail.com \
    --cc=linux-input@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).