[stable request] driver core: fix race between creating/querying glue dir and its cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

please include this 4.9-rc1 commit in stable trees:

commit cebf8fd16900fdfd58c0028617944f808f97fe50
Author: Ming Lei <ming.lei@xxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
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
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]