* [patch 01/16] s390: tape: Use del_timer_sync()
[not found] <20140323150557.288925975@linutronix.de>
@ 2014-03-23 15:09 ` Thomas Gleixner
2014-03-24 6:22 ` Heiko Carstens
2014-03-23 15:09 ` [patch 03/16] s390: net: lcs: Add missing destroy_timer_on_stack() Thomas Gleixner
2014-03-23 15:09 ` [patch 02/16] s390: tape: " Thomas Gleixner
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2014-03-23 15:09 UTC (permalink / raw)
To: LKML; +Cc: Julia Lawall, Andrew Morton, Martin Schwidefsky, s390
[-- Attachment #1: s390-tape-use-del-timer-sync.patch --]
[-- Type: text/plain, Size: 844 bytes --]
del_timer() does not wait for a possible running callback to
complete. So the call side might free request and the associated
objects while on another cpu the timer handler runs.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: s390 <linux-s390@vger.kernel.org>
---
drivers/s390/char/tape_std.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: tip/drivers/s390/char/tape_std.c
===================================================================
--- tip.orig/drivers/s390/char/tape_std.c
+++ tip/drivers/s390/char/tape_std.c
@@ -78,7 +78,7 @@ tape_std_assign(struct tape_device *devi
rc = tape_do_io_interruptible(device, request);
- del_timer(&timeout);
+ del_timer_sync(&timeout);
if (rc != 0) {
DBF_EVENT(3, "%08x: assign failed - device might be busy\n",
^ permalink raw reply [flat|nested] 6+ messages in thread* [patch 03/16] s390: net: lcs: Add missing destroy_timer_on_stack()
[not found] <20140323150557.288925975@linutronix.de>
2014-03-23 15:09 ` [patch 01/16] s390: tape: Use del_timer_sync() Thomas Gleixner
@ 2014-03-23 15:09 ` Thomas Gleixner
2014-03-24 6:22 ` Heiko Carstens
2014-03-23 15:09 ` [patch 02/16] s390: tape: " Thomas Gleixner
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2014-03-23 15:09 UTC (permalink / raw)
To: LKML; +Cc: Julia Lawall, Andrew Morton, Ursula Braun, s390
[-- Attachment #1: s390-net-lcs-add-missing-destroy-timer-on-stack.patch --]
[-- Type: text/plain, Size: 716 bytes --]
Otherwise we leak a tracking object when DEBUG_OBJECTS is enabled.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ursula Braun <ursula.braun@de.ibm.com>
Cc: s390 <linux-s390@vger.kernel.org>
---
drivers/s390/net/lcs.c | 1 +
1 file changed, 1 insertion(+)
Index: tip/drivers/s390/net/lcs.c
===================================================================
--- tip.orig/drivers/s390/net/lcs.c
+++ tip/drivers/s390/net/lcs.c
@@ -899,6 +899,7 @@ lcs_send_lancmd(struct lcs_card *card, s
add_timer(&timer);
wait_event(reply->wait_q, reply->received);
del_timer_sync(&timer);
+ destroy_timer_on_stack(&timer);
LCS_DBF_TEXT_(4, trace, "rc:%d",reply->rc);
rc = reply->rc;
lcs_put_reply(reply);
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [patch 03/16] s390: net: lcs: Add missing destroy_timer_on_stack()
2014-03-23 15:09 ` [patch 03/16] s390: net: lcs: Add missing destroy_timer_on_stack() Thomas Gleixner
@ 2014-03-24 6:22 ` Heiko Carstens
0 siblings, 0 replies; 6+ messages in thread
From: Heiko Carstens @ 2014-03-24 6:22 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Julia Lawall, Andrew Morton, Ursula Braun, s390
On Sun, Mar 23, 2014 at 03:09:25PM -0000, Thomas Gleixner wrote:
> Otherwise we leak a tracking object when DEBUG_OBJECTS is enabled.
> drivers/s390/net/lcs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: tip/drivers/s390/net/lcs.c
> ===================================================================
> --- tip.orig/drivers/s390/net/lcs.c
> +++ tip/drivers/s390/net/lcs.c
> @@ -899,6 +899,7 @@ lcs_send_lancmd(struct lcs_card *card, s
> add_timer(&timer);
> wait_event(reply->wait_q, reply->received);
> del_timer_sync(&timer);
> + destroy_timer_on_stack(&timer);
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 02/16] s390: tape: Add missing destroy_timer_on_stack()
[not found] <20140323150557.288925975@linutronix.de>
2014-03-23 15:09 ` [patch 01/16] s390: tape: Use del_timer_sync() Thomas Gleixner
2014-03-23 15:09 ` [patch 03/16] s390: net: lcs: Add missing destroy_timer_on_stack() Thomas Gleixner
@ 2014-03-23 15:09 ` Thomas Gleixner
2014-03-24 6:22 ` Heiko Carstens
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2014-03-23 15:09 UTC (permalink / raw)
To: LKML; +Cc: Julia Lawall, Andrew Morton, Martin Schwidefsky, s390
[-- Attachment #1: s390-tape-add-missing-destroy-timer.patch --]
[-- Type: text/plain, Size: 727 bytes --]
Otherwise we leak a tracking object when DEBUG_OBJECTS is enabled.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: s390 <linux-s390@vger.kernel.org>
---
drivers/s390/char/tape_std.c | 1 +
1 file changed, 1 insertion(+)
Index: tip/drivers/s390/char/tape_std.c
===================================================================
--- tip.orig/drivers/s390/char/tape_std.c
+++ tip/drivers/s390/char/tape_std.c
@@ -79,6 +79,7 @@ tape_std_assign(struct tape_device *devi
rc = tape_do_io_interruptible(device, request);
del_timer_sync(&timeout);
+ destroy_timer_on_stack(&timeout);
if (rc != 0) {
DBF_EVENT(3, "%08x: assign failed - device might be busy\n",
^ permalink raw reply [flat|nested] 6+ messages in thread