linux-sg2042/drivers/hwtracing/coresight
Mathieu Poirier b15f0fb657 coresight: removing bind/unbind options from sysfs
The coresight drivers have absolutely no control over bind and unbind
operations triggered from sysfs. The operations simply can't be
cancelled or denied event when one or several tracing sessions are
under way.  Since the memory associated to individual device is
invariably freed, the end result is a kernel crash when the path from
source to sink is travelled again as demonstrated here[1].

One solution could be to keep track of all the path (i.e tracing
session) that get created and iterate through the elements of those path
looking for the coresight device that is being removed.  This proposition
doesn't scale well since there is no upper bound on the amount of
concurrent trace session that can be created.

With the above in mind, this patch prevent devices from being unbounded
from their driver by using the driver->suppress_bind_attr option.  That way
trace sessions can be managed without fearing to loose devices.

Since device can't be removed anymore the xyz_remove() functions found in
each driver is also removed.

[1]. http://www.spinics.net/lists/arm-kernel/msg474952.html

Reported-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 22:12:18 -08:00
..
Kconfig coresight: Fix a typo in Kconfig 2015-12-21 13:31:31 -08:00
Makefile coresight: replicator: Add Qualcomm CoreSight Replicator driver 2015-05-24 11:12:08 -07:00
coresight-etb10.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-etm-cp14.c coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
coresight-etm.h coresight-etm3x: Support context-ID tracing when PID namespace is enabled 2015-08-05 13:30:15 -07:00
coresight-etm3x.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-etm4x.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-etm4x.h coresight-etm4x: Support context-ID tracing when PID namespace is enabled 2015-08-05 13:30:15 -07:00
coresight-funnel.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-priv.h coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
coresight-replicator-qcom.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-replicator.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-tmc.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight-tpiu.c coresight: removing bind/unbind options from sysfs 2016-02-07 22:12:18 -08:00
coresight.c coresight: remove csdev's link from topology 2016-02-07 22:11:10 -08:00
of_coresight.c coresight: fix typo in of_coresight.c 2015-05-24 11:12:08 -07:00