stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [stable request] driver core: fix race between creating/querying glue dir and its cleanup
@ 2016-12-15  8:28 Jiri Slaby
  2016-12-15 11:10 ` Willy Tarreau
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2016-12-15  8:28 UTC (permalink / raw)
  To: stable; +Cc: Ming Lei

Hi,

please include this 4.9-rc1 commit in stable trees:

commit cebf8fd16900fdfd58c0028617944f808f97fe50
Author: Ming Lei <ming.lei@canonical.com>
Date:   Sun Jul 10 19:27:36 2016 +0800

    driver core: fix race between creating/querying glue dir and its cleanup


It fixes an issue which can be easily triggered by:
  while :; do for aa in `seq 1 10`; do ./pps & done; wait; done
where pps is from:
  https://github.com/jirislaby/collected_sources/blob/master/pps.c
and the result is:
  WARNING: CPU: 2 PID: 13078 at include/linux/kref.h:47
kobject_get+0x46/0x60()

I.e. kref->refcount is < 2.


It can be reproduced on 3.12 too. So older kernels are very likely
affected too.

For 3.12, I added also this 4.1-rc1 commit:
commit 5f0163a5ee9cc7c59751768bdfd94a73186debba
Author: Markus Elfring <elfring@users.sourceforge.net>
Date:   Thu Feb 5 11:48:26 2015 +0100

    driver core: Delete an unnecessary check before the function call
"put_device"


to let the former apply cleanly.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [stable request] driver core: fix race between creating/querying glue dir and its cleanup
  2016-12-15  8:28 [stable request] driver core: fix race between creating/querying glue dir and its cleanup Jiri Slaby
@ 2016-12-15 11:10 ` Willy Tarreau
  0 siblings, 0 replies; 2+ messages in thread
From: Willy Tarreau @ 2016-12-15 11:10 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: stable, Ming Lei

Hi Jiry,

On Thu, Dec 15, 2016 at 09:28:23AM +0100, Jiri Slaby wrote:
> Hi,
> 
> please include this 4.9-rc1 commit in stable trees:
> 
> commit cebf8fd16900fdfd58c0028617944f808f97fe50
> Author: Ming Lei <ming.lei@canonical.com>
> Date:   Sun Jul 10 19:27:36 2016 +0800
> 
>     driver core: fix race between creating/querying glue dir and its cleanup

Thanks, I'll check if 3.10 is affected as well (the code looks pretty similar
at least) and will pick it as well as the other commit you needed for 3.12.

Willy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-15 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15  8:28 [stable request] driver core: fix race between creating/querying glue dir and its cleanup Jiri Slaby
2016-12-15 11:10 ` Willy Tarreau

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).