Re: 3.19: Sony playstation controller causes kernel oops

From: Jiri Kosina
Date: Mon Feb 23 2015 - 07:02:50 EST


On Mon, 23 Feb 2015, David Herrmann wrote:

> Hi Jiri
>
> On Sun, Feb 22, 2015 at 10:50 PM, Jiri Kosina <jkosina@xxxxxxx> wrote:
> > [ some CCs added and full dmesg kept for reference ]
> >
> > On Sun, 22 Feb 2015, Pavel Machek wrote:
> >
> >> Hi!
> >>
> >> I plugged in part of PS move to the PC, to let it charge. Got: full
> >> dmesg in attachment. I believe I charged it in PC before, but it may
> >> be year ago or more.
> >>
> >> Ideas?
> >
> > Ok, this is embarassing. I guess the patch below fixes it, right? (the
> > spinlock got introduced in d2d782fccee, so I guess you didn't have it a
> > year ago)
> >
> > diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> > index 31e9d25..3756a62 100644
> > --- a/drivers/hid/hid-sony.c
> > +++ b/drivers/hid/hid-sony.c
> > @@ -2140,6 +2140,7 @@ static int __init sony_init(void)
> > {
> > dbg_hid("Sony:%s\n", __func__);
> >
> > + spin_lock_init(&sony_dev_list_lock);
> > return hid_register_driver(&sony_driver);
> > }
>
> Nice catch. I'd prefer the patch below, though. For both:
> Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx>

Thanks. I already used the DEFINE_SPINLOCK() variant and pushed it
our earlier today.

There was also missing sc->lock initialization in per-device probe, Frank
sent patch for that as well.

Both now applied and pushed out.

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/