* + rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch added to -mm tree
@ 2013-06-07 20:49 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2013-06-07 20:49 UTC (permalink / raw)
To: mm-commits, holler
Subject: + rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch added to -mm tree
To: holler@ahsoftware.de
From: akpm@linux-foundation.org
Date: Fri, 07 Jun 2013 13:49:41 -0700
The patch titled
Subject: rtc: rtc-hid-sensor-time: fix possible bug on driver_remove
has been added to the -mm tree. Its filename is
rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Alexander Holler <holler@ahsoftware.de>
Subject: rtc: rtc-hid-sensor-time: fix possible bug on driver_remove
The work we schedule on register deletes himself. Therefor we cannot
use cancel_work_sync() because that calls flush_work() but still uses
the pointer to the (now deleted) work afterwards (for clear_work_data)
which ends up in a bug.
Replacing cancel_work_sync() with flush_work() fixes that.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/rtc/rtc-hid-sensor-time.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff -puN drivers/rtc/rtc-hid-sensor-time.c~rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix drivers/rtc/rtc-hid-sensor-time.c
--- a/drivers/rtc/rtc-hid-sensor-time.c~rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix
+++ a/drivers/rtc/rtc-hid-sensor-time.c
@@ -385,9 +385,8 @@ static int hid_time_remove(struct platfo
struct hid_time_state *time_state = platform_get_drvdata(pdev);
if (time_state->workts) {
- cancel_work_sync(&time_state->workts->work);
- kfree(time_state->workts);
- time_state->workts = NULL;
+ flush_work(&time_state->workts->work);
+ BUG_ON(time_state->workts != NULL);
}
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_TIME);
_
Patches currently in -mm which might be from holler@ahsoftware.de are
rtc-rtc-hid-sensor-time-allow-full-years-16bit-in-hid-reports.patch
rtc-rtc-hid-sensor-time-allow-16-and-32-bit-values-for-all-attributes.patch
rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot.patch
rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch
rtc-rtc-hid-sensor-time-add-support-for-milliseconds.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-07 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 20:49 + rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch added to -mm tree akpm
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).