[PATCH]staging: slicoss: Fix possible reuse of freed memory in timer function

Joe Perches joe at perches.com
Tue Feb 11 00:37:56 UTC 2014


On Mon, 2014-02-10 at 22:36 +0400, Kirill Tkhai wrote:
> Do not call kfree() till timer function is finished.
> 
> [This was found using grep. Compiled tested only]
> 
> Signed-off-by: Kirill Tkhai <tkhai at yandex.ru>
> CC: Joe Perches <joe at perches.com>
> CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

I don't need to be cc'd on this.

Perhaps the MAINTAINERS file should be updated
with the names from the README file. (cc'd)

Lior Dotan <liodot at gmail.com>
Christopher Harrer <charrer at alacritech.com>

Also the README could be broken into a separate TODO.

Maybe something like:


From: Joe Perches <joe at perches.com>
Date: Mon, 10 Feb 2014 16:33:04 -0800
Subject: [PATCH] staging: slicoss: Add MAINTAINERS entry, break README into TODO & README

Adding a MAINTAINERS entry with content from the README.
Move the TODO items from the README to a separate TODO file.

Signed-off-by: Joe Perches <joe at perches.com>
---
 MAINTAINERS                    |  6 ++++++
 drivers/staging/slicoss/README | 40 ----------------------------------------
 drivers/staging/slicoss/TODO   | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 40 deletions(-)
 create mode 100644 drivers/staging/slicoss/TODO

diff --git a/MAINTAINERS b/MAINTAINERS
index 192e027..a6c7899 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8322,6 +8322,12 @@ M:	Teddy Wang <teddy.wang at siliconmotion.com.cn>
 S:	Odd Fixes
 F:	drivers/staging/sm7xxfb/
 
+STAGING - SLICOSS
+M:	Lior Dotan <liodot at gmail.com>
+M:	Christopher Harrer <charrer at alacritech.com>
+S:	Odd Fixes
+F:	drivers/staging/slicoss/
+
 STAGING - SOFTLOGIC 6x10 MPEG CODEC
 M:	Ismael Luceno <ismael.luceno at corp.bluecherry.net>
 S:	Supported
diff --git a/drivers/staging/slicoss/README b/drivers/staging/slicoss/README
index 53052c4..4fa50e7 100644
--- a/drivers/staging/slicoss/README
+++ b/drivers/staging/slicoss/README
@@ -5,43 +5,3 @@ This driver is supposed to support:
 	Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber
 
 The driver was actually tested on Oasis and Kalahari cards.
-
-TODO:
-	- move firmware loading to request_firmware()
-	- remove direct memory access of structures
-	- any remaining sparse and checkpatch.pl warnings
-
-	- use net_device_ops
-	- use dev->stats rather than adapter->stats
-	- don't cast netdev_priv it is already void
-	- GET RID OF MACROS
-	- work on all architectures
-	   - without CONFIG_X86_64 confusion
-	   - do 64 bit correctly
-	   - don't depend on order of union
-	- get rid of ASSERT(), use BUG() instead but only where necessary
-	  looks like most aren't really useful
-	- no new SIOCDEVPRIVATE ioctl allowed
-	- don't use module_param for configuring interrupt mitigation
-	  use ethtool instead
-	- reorder code to elminate use of forward declarations
-	- don't keep private linked list of drivers.
-	- remove all the gratiutous debug infrastructure
-	- use PCI_DEVICE()
-	- do ethtool correctly using ethtool_ops
-	- NAPI?
-	- wasted overhead of extra stats
-	- state variables for things that are
-	  easily available and shouldn't be kept in card structure, cardnum, ...
-	  slotnumber, events, ...
-	- get rid of slic_spinlock wrapper
-	- volatile == bad design => bad code
-	- locking too fine grained, not designed just throw more locks
-	  at problem
-
-
-Please send patches to:
-        Greg Kroah-Hartman <gregkh at linuxfoundation.org>
-and Cc: Lior Dotan <liodot at gmail.com> and Christopher Harrer
-<charrer at alacritech.com> as well as they are also able to test out any
-changes.
diff --git a/drivers/staging/slicoss/TODO b/drivers/staging/slicoss/TODO
new file mode 100644
index 0000000..62ff100
--- /dev/null
+++ b/drivers/staging/slicoss/TODO
@@ -0,0 +1,38 @@
+TODO:
+	- move firmware loading to request_firmware()
+	- remove direct memory access of structures
+	- any remaining sparse and checkpatch.pl warnings
+
+	- use net_device_ops
+	- use dev->stats rather than adapter->stats
+	- don't cast netdev_priv it is already void
+	- GET RID OF MACROS
+	- work on all architectures
+	   - without CONFIG_X86_64 confusion
+	   - do 64 bit correctly
+	   - don't depend on order of union
+	- get rid of ASSERT(), use BUG() instead but only where necessary
+	  looks like most aren't really useful
+	- no new SIOCDEVPRIVATE ioctl allowed
+	- don't use module_param for configuring interrupt mitigation
+	  use ethtool instead
+	- reorder code to elminate use of forward declarations
+	- don't keep private linked list of drivers.
+	- remove all the gratiutous debug infrastructure
+	- use PCI_DEVICE()
+	- do ethtool correctly using ethtool_ops
+	- NAPI?
+	- wasted overhead of extra stats
+	- state variables for things that are
+	  easily available and shouldn't be kept in card structure, cardnum, ...
+	  slotnumber, events, ...
+	- get rid of slic_spinlock wrapper
+	- volatile == bad design => bad code
+	- locking too fine grained, not designed just throw more locks
+	  at problem
+
+Please send patches to:
+        Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+and Cc: Lior Dotan <liodot at gmail.com> and Christopher Harrer
+<charrer at alacritech.com> as well as they are also able to test out any
+changes.
-- 
1.8.1.2.459.gbcd45b4.dirty





More information about the devel mailing list