lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 Jul 2008 15:14:19 +0200 (CEST)
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Adrian Bunk <bunk@...nel.org>
cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-input@...r.kernel.org,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	Linux/m68k <linux-m68k@...r.kernel.org>
Subject: Re: [PATCH] drivers/input/ff-core.c needs <linux/sched.h>

On Tue, 1 Jul 2008, Adrian Bunk wrote:
> On Tue, Jul 01, 2008 at 08:46:54AM -0400, Dmitry Torokhov wrote:
> > On Tue, Jul 01, 2008 at 01:55:25PM +0200, Geert Uytterhoeven wrote:
> > > commit 656acd2bbc4ce7f224de499ee255698701396c48
> > > Author: Dmitry Torokhov <dmitry.torokhov@...il.com>
> > > Date:   Thu Jun 26 11:30:02 2008 -0400
> > > 
> > >     Input: fix locking in force-feedback core
> > > 
> > >     The newly added event_lock spinlock in the input core disallows sleeping
> > >     and therefore using mutexes in event handlers. Convert force-feedback 
> > >     core to rely on event_lock instead of mutex to protect slots allocated  
> > >     for fore-feedback effects. The original mutex is still used to serialize
> > >     uploading and erasing of effects.
> > > 
> > > causes the following regression on m68k:
> > > 
> > > | linux/drivers/input/ff-core.c: In function 'input_ff_upload':
> > > | linux/drivers/input/ff-core.c:172: error: dereferencing pointer to incomplete type
> > > | linux/drivers/input/ff-core.c: In function 'erase_effect':
> > > | linux/drivers/input/ff-core.c:197: error: dereferencing pointer to incomplete type
> > > | linux/drivers/input/ff-core.c:204: error: dereferencing pointer to incomplete type
> > > | make[4]: *** [drivers/input/ff-core.o] Error 1
> > > 
> > 
> > Argh! Sorry about it.
> > 
> > > As the incomplete type is `struct task_struct', including <linux/sched.h> fixes
> > > it.
> > 
> > Not linux/spinlock.h? I wonder if I need to include linux/spinlock.h and

Nope, tried that first...

> > linux/mutex.h directly from linux/input.h... What is the current
> > policy on headers - do they need to include everything to be
> > functional or it is responsibility of the user?
> 
> Theoretically it's the responsibility of the header to include 
> everything it needs.

Indeed. But due to Include Hell that's not always possible.

> In practice we are after -rc8 and even thinking of this kind of #include 
> changes under include/linux/ makes me nervous - like the fact that the 
> ff-core.c problem occured _only_ on m68k our headers are too fragile for 
> expecting such changes to simply work.
> 
> Can we go with Geert's patch for 2.6.26 and if you want to fix it 
> properly you can send a patch for 2.6.27?

And let the proper patch boil in linux-next for a while...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ