+ rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch added to -mm tree

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

 



Subject: + rtc-rtc-hid-sensor-time-add-option-hctosys-to-set-time-at-boot-fix.patch added to -mm tree
To: holler@xxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxx>
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@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 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@xxxxxxxxxxxxx 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

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux