This is a note to let you know that I've just added the patch titled

    firewire: add minor number range check to fw_device_init()

to the 3.8-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     firewire-add-minor-number-range-check-to-fw_device_init.patch
and it can be found in the queue-3.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 3bec60d511179853138836ae6e1b61fe34d9235f Mon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Wed, 27 Feb 2013 17:04:04 -0800
Subject: firewire: add minor number range check to fw_device_init()

From: Tejun Heo <[email protected]>

commit 3bec60d511179853138836ae6e1b61fe34d9235f upstream.

fw_device_init() didn't check whether the allocated minor number isn't
too large.  Fail if it goes overflows MINORBITS.

Signed-off-by: Tejun Heo <[email protected]>
Suggested-by: Stefan Richter <[email protected]>
Acked-by: Stefan Richter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/firewire/core-device.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -1020,6 +1020,10 @@ static void fw_device_init(struct work_s
        ret = idr_pre_get(&fw_device_idr, GFP_KERNEL) ?
              idr_get_new(&fw_device_idr, device, &minor) :
              -ENOMEM;
+       if (minor >= 1 << MINORBITS) {
+               idr_remove(&fw_device_idr, minor);
+               minor = -ENOSPC;
+       }
        up_write(&fw_device_rwsem);
 
        if (ret < 0)


Patches currently in stable-queue which might be from [email protected] are

queue-3.8/firewire-add-minor-number-range-check-to-fw_device_init.patch
queue-3.8/posix-timer-don-t-call-idr_find-with-out-of-range-id.patch
queue-3.8/block-fix-synchronization-and-limit-check-in-blk_alloc_devt.patch
queue-3.8/idr-fix-a-subtle-bug-in-idr_get_next.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to