<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>CHOON.NET Forums</title>
        <description>CHOON.NET Forums</description>
        <link>http://choon.net/forum/index.php</link>
        <lastBuildDate>Fri, 18 May 2012 22:57:15 +0800</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://choon.net/forum/read.php?21,1085068,1085068#msg-1085068</guid>
            <title>[PATCH] drivers/staging/line6/config.h: Delete unused header (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1085068,1085068#msg-1085068</link>
            <description><![CDATA[ Delete unused header file drivers/staging/line6/config.h<br />
<br />
Signed-off-by: Johannes Thumshirn &lt;morbidrsa@googlemail.com&gt;<br />
---<br />
 drivers/staging/line6/config.h |   43 ----------------------------------------<br />
 1 files changed, 0 insertions(+), 43 deletions(-)<br />
 delete mode 100644 drivers/staging/line6/config.h<br />
<br />
diff --git a/drivers/staging/line6/config.h b/drivers/staging/line6/config.h<br />
deleted file mode 100644<br />
index 2493491..0000000<br />
--- a/drivers/staging/line6/config.h<br />
+++ /dev/null<br />
@@ -1,43 +0,0 @@<br />
-/*<br />
- * Line6 Linux USB driver - 0.8.0<br />
- *<br />
- * Copyright (C) 2004-2009 Markus Grabner (grabner@icg.tugraz.at)<br />
- *<br />
- *	This program is free software; you can redistribute it and/or<br />
- *	modify it under the terms of the GNU General Public License as<br />
- *	published by the Free Software Foundation, version 2.<br />
- *<br />
- */<br />
-<br />
-#ifndef CONFIG_H<br />
-#define CONFIG_H<br />
-<br />
-<br />
-#ifdef CONFIG_USB_DEBUG<br />
-#define DEBUG 1<br />
-#endif<br />
-<br />
-<br />
-/*<br />
- * Development tools.<br />
- */<br />
-#define DO_DEBUG_MESSAGES    0<br />
-#define DO_DUMP_URB_SEND     DO_DEBUG_MESSAGES<br />
-#define DO_DUMP_URB_RECEIVE  DO_DEBUG_MESSAGES<br />
-#define DO_DUMP_PCM_SEND     0<br />
-#define DO_DUMP_PCM_RECEIVE  0<br />
-#define DO_DUMP_MIDI_SEND    DO_DEBUG_MESSAGES<br />
-#define DO_DUMP_MIDI_RECEIVE DO_DEBUG_MESSAGES<br />
-#define DO_DUMP_ANY          (DO_DUMP_URB_SEND || DO_DUMP_URB_RECEIVE || \<br />
-			      DO_DUMP_PCM_SEND || DO_DUMP_PCM_RECEIVE || \<br />
-			      DO_DUMP_MIDI_SEND || DO_DUMP_MIDI_RECEIVE)<br />
-#define CREATE_RAW_FILE      0<br />
-<br />
-#if DO_DEBUG_MESSAGES<br />
-#define DEBUG_MESSAGES(x) (x)<br />
-#else<br />
-#define DEBUG_MESSAGES(x)<br />
-#endif<br />
-<br />
-<br />
-#endif<br />
-- <br />
1.7.7.6<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Johannes Thumshirn</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 22:53:06 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084987,1084987#msg-1084987</guid>
            <title>[Xen-devel] [PATCH v6 0/11] qdisk local attach (22 replies)</title>
            <link>http://choon.net/forum/read.php?22,1084987,1084987#msg-1084987</link>
            <description><![CDATA[ Hi all,<br />
this patch implements local_attach support for QDISK: that means that<br />
you can use qcow2 as disk format for your PV guests disks and use<br />
pygrub to retrieve the kernel and initrd in dom0.<br />
<br />
The idea is that we start a QEMU instance at boot time to listen to<br />
local_attach requests. When libxl_device_disk_local_attach is called on<br />
a QDISK images, libxl sets up a backend/frontend pair in dom0 for the disk<br />
so that blkfront in dom0 will create a new xvd device for it.<br />
Then pygrub can be pointed at this device to retrieve kernel and<br />
initrd.<br />
<br />
<br />
Changes in v6:<br />
- rebase on &quot;nstore: rename public xenstore headers&quot;;<br />
- new patch: &quot;libxl_string_to_backend: add qdisk&quot;;<br />
- new patch: &quot;main_blockdetach: destroy the disk on successful removal&quot;;<br />
- split &quot;libxl: introduce libxl__device_disk_add&quot; in two patches;<br />
- return error in case pdev_path is NULL;<br />
- libxl__device_disk_local_attach update the new disk, the caller<br />
allocates it;<br />
- remove \n from logs;<br />
- document blkdev_start;<br />
- use libxl__strdup to allocate blkdev_start; <br />
- more comments in libxl__devid_to_localdev;<br />
- inline GCSPRINTF;<br />
- introduce ret for xs_* error codes.<br />
<br />
<br />
Changes in v5:<br />
- remove _hidden from the libxl_device_disk_local_attach/detach<br />
  implementation;<br />
- libxl__device_disk_local_attach: rename disk to in_disk;<br />
- libxl__device_disk_local_attach: rename tmpdisk to disk;<br />
- libxl__device_disk_local_attach: copy disk to new_disk only on success;<br />
- libxl__device_disk_local_attach: remove check on libxl__zalloc success.<br />
- rename libxl__device_generic_add_t to libxl__device_generic_add;<br />
- change the type of the blkdev_start parameter to<br />
  libxl__device_disk_local_attach to const char *;<br />
- remove domid paramter to libxl__alloc_vdev (assume<br />
  LIBXL_TOOLSTACK_DOMID);<br />
- remove scaling limit from libxl__alloc_vdev;<br />
- libxl__device_disk_local_attach: replace LIBXL__LOG with LOG;<br />
- libxl__device_disk_local_attach: unify error paths.<br />
<br />
<br />
Changes in v4:<br />
- split the first patch into 2 patches: the first is a simple move, the<br />
  second one adds a new parameter;<br />
- libxl__device_generic_add: do not end the transaction is the caller<br />
  provided it;<br />
- libxl__device_generic_add: fix success exit path;<br />
- pass blkdev_start in libxl_domain_build_info;<br />
- rename libxl__devid_to_vdev to libxl__devid_to_localdev;<br />
- introduce upper bound for encode_disk_name;<br />
- improve error handling and exit paths in libxl__alloc_vdev and<br />
  libxl__device_disk_local_attach.<br />
<br />
<br />
Changes in v3:<br />
- libxl__device_disk_local_attach: wait for the backend to be<br />
&quot;connected&quot; before returning.<br />
<br />
<br />
Changes in v2:<br />
- make libxl_device_disk_local_(de)attach internal functions;<br />
- allocate the new disk in libxl_device_disk_local_attatch on the GC;<br />
- remove libxl__device_generic_add_t, add a transaction parameter to<br />
libxl__device_generic_add instead;<br />
- add a new patch to introduce a blkdev_start option to xl.conf;<br />
- reimplement libxl__alloc_vdev checking for the frontend path and<br />
starting from blkdev_start;<br />
- introduce a Linux specific libxl__devid_to_vdev function based on last<br />
Jan's patch to blkfront.<br />
<br />
<br />
<br />
Stefano Stabellini (11):<br />
      libxl: make libxl_device_disk_local_attach/detach internal functions<br />
      libxl: libxl__device_disk_local_attach return a new libxl_device_disk<br />
      libxl: add a transaction parameter to libxl__device_generic_add<br />
      libxl: move libxl__device_from_disk to libxl_internal.c<br />
      libxl: introduce libxl__device_disk_add<br />
      xl/libxl: add a blkdev_start parameter<br />
      libxl: introduce libxl__alloc_vdev<br />
      xl/libxl: implement QDISK libxl_device_disk_local_attach<br />
      libxl__device_disk_local_attach: wait for state &quot;connected&quot;<br />
      libxl_string_to_backend: add qdisk<br />
      main_blockdetach: destroy the disk on successful removal<br />
<br />
 docs/man/xl.conf.pod.5                          |    6 +<br />
 tools/examples/xl.conf                          |    3 +<br />
 tools/hotplug/Linux/init.d/sysconfig.xencommons |    3 +<br />
 tools/hotplug/Linux/init.d/xencommons           |    3 +<br />
 tools/libxl/libxl.c                             |  238 +----------------<br />
 tools/libxl/libxl.h                             |    7 -<br />
 tools/libxl/libxl_bootloader.c                  |    7 +-<br />
 tools/libxl/libxl_create.c                      |    3 +<br />
 tools/libxl/libxl_device.c                      |   17 +-<br />
 tools/libxl/libxl_internal.c                    |  325 +++++++++++++++++++++++<br />
 tools/libxl/libxl_internal.h                    |   26 ++-<br />
 tools/libxl/libxl_linux.c                       |   48 ++++<br />
 tools/libxl/libxl_netbsd.c                      |    6 +<br />
 tools/libxl/libxl_pci.c                         |    2 +-<br />
 tools/libxl/libxl_types.idl                     |    1 +<br />
 tools/libxl/libxl_utils.c                       |    2 +<br />
 tools/libxl/xl.c                                |    3 +<br />
 tools/libxl/xl.h                                |    1 +<br />
 tools/libxl/xl_cmdimpl.c                        |    5 +-<br />
 19 files changed, 454 insertions(+), 252 deletions(-)<br />
<br />
<br />
Cheers,<br />
<br />
Stefano<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>Stefano Stabellini</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 22:50:09 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084979,1084979#msg-1084979</guid>
            <title>[PATCH RFC V2 0/6] Fix leap seconds and add tai clock (6 replies)</title>
            <link>http://choon.net/forum/read.php?21,1084979,1084979#msg-1084979</link>
            <description><![CDATA[ In honor of this summer's new leap second, this patch series aim to<br />
fix the incorrect time values reported during a leap second. This<br />
second version of the patch series does not change the core time<br />
keeping code, but rather affects only the adjtimex interface.<br />
<br />
Of course, the POSIX UTC system is broken by design, and the Linux<br />
kernel cannot fix that. However, what we can do is correctly execute<br />
leap seconds and report the time variables (UTC time, TAI offset, and<br />
leap second status) with consistency.<br />
<br />
Since commit 6b43ae8a, the leap second is applied on the first timer<br />
tick after the actual deadline, resulting in incorrect time values<br />
from gettimeofday and friends.  In contrast to V1, this series does<br />
not address that issue but rather adds extra checks into the adjtimex<br />
code path, with the effect of always providing correct UTC time<br />
values, even during a leap second.<br />
<br />
The first two patches merely clean up some cruft I noticed along the<br />
way while working on this series.<br />
<br />
<br />
John Stultz (1):<br />
  time: Add CLOCK_TAI clockid<br />
<br />
Richard Cochran (5):<br />
  time: remove obsolete declaration<br />
  ntp: remove useless parameter<br />
  time: keep track of the pending utc/tai threshold<br />
  time: introduce leap second functional interface<br />
  time: move leap second management into time keeping core<br />
<br />
 include/linux/time.h       |    9 +-<br />
 kernel/posix-timers.c      |   10 ++<br />
 kernel/time/leap-seconds.h |   21 ++++<br />
 kernel/time/ntp.c          |   90 ++++++------------<br />
 kernel/time/timekeeping.c  |  228 ++++++++++++++++++++++++++++++++++++++++++--<br />
 5 files changed, 283 insertions(+), 75 deletions(-)<br />
 create mode 100644 kernel/time/leap-seconds.h<br />
<br />
-- <br />
1.7.2.5<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Richard Cochran</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 22:13:30 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084976,1084976#msg-1084976</guid>
            <title>[patch] [SCSI] scsi_pm: passing wrong pointer to resume() (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084976,1084976#msg-1084976</link>
            <description><![CDATA[ This gets caught by GCC:<br />
drivers/scsi/scsi_pm.c:30:5: warning: passing argument 1 of<br />
	‘scsi_device_resume’ from incompatible pointer type<br />
	[enabled by default]<br />
<br />
It probably would have been caught in testing as well, but it's on an<br />
error path.<br />
<br />
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;<br />
---<br />
I haven't tested this.  :/  Sorry for that.<br />
<br />
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c<br />
index 9bd2c41..d4201de 100644<br />
--- a/drivers/scsi/scsi_pm.c<br />
+++ b/drivers/scsi/scsi_pm.c<br />
@@ -27,7 +27,7 @@ static int scsi_dev_type_suspend(struct device *dev, pm_message_t msg)<br />
 		if (drv &amp;&amp; drv-&gt;suspend) {<br />
 			err = drv-&gt;suspend(dev, msg);<br />
 			if (err)<br />
-				scsi_device_resume(dev);<br />
+				scsi_device_resume(to_scsi_device(dev));<br />
 		}<br />
 	}<br />
 	dev_dbg(dev, &quot;scsi suspend: %d\n&quot;, err);<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Dan Carpenter</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 22:09:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084967,1084967#msg-1084967</guid>
            <title>[PATCH 1/1] rc-loopback: remove duplicate line (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084967,1084967#msg-1084967</link>
            <description><![CDATA[ This patch just removes the second assignment &quot;rc-&gt;priv = &amp;loopdev;&quot;<br />
that happens a fews lines after the first one.<br />
<br />
Signed-off-by: Michel Machado &lt;michel@digirati.com.br&gt;<br />
CC: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;<br />
CC: &quot;David Härdeman&quot; &lt;david@hardeman.nu&gt;<br />
---<br />
<br />
diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c<br />
index efc6a51..fae1615 100644<br />
--- a/drivers/media/rc/rc-loopback.c<br />
+++ b/drivers/media/rc/rc-loopback.c<br />
@@ -221,7 +221,6 @@ static int __init loop_init(void)<br />
 	rc-&gt;s_idle		= loop_set_idle;<br />
 	rc-&gt;s_learning_mode	= loop_set_learning_mode;<br />
 	rc-&gt;s_carrier_report	= loop_set_carrier_report;<br />
-	rc-&gt;priv		= &amp;loopdev;<br />
 <br />
 	loopdev.txmask		= RXMASK_REGULAR;<br />
 	loopdev.txcarrier	= 36000;<br />
<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Michel Machado</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 21:51:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084959,1084959#msg-1084959</guid>
            <title>[PATCH v3] UBI: add lnum and vol_id to struct ubi_work (1 reply)</title>
            <link>http://choon.net/forum/read.php?21,1084959,1084959#msg-1084959</link>
            <description><![CDATA[ This is part of a multipart patch to allow UBI to force the erasure of<br />
particular logical eraseblock numbers. In this patch, the volume id and LEB<br />
number are added to ubi_work data structure, and both are also passed as a<br />
parameter to schedule erase to set it appropriately. Whenever ubi_wl_put_peb<br />
is called, the lnum is also passed to be forwarded to schedule erase. Later,<br />
a new ubi_sync_lnum will be added to execute immediately all work related to<br />
that lnum.<br />
<br />
This was tested by outputting the vol_id and lnum during the schedule of<br />
erasure. The ubi thread was disabled and two ubifs drives on separate<br />
partitions repeated changed a small number of LEBs. The ubi module was readded, and all<br />
the erased LEBs, corresponding to the volumes, were added to the schedule<br />
erase queue.<br />
<br />
Signed-off-by: Joel Reardon &lt;reardonj@inf.ethz.ch&gt;<br />
---<br />
 drivers/mtd/ubi/eba.c |   16 ++++++++--------<br />
 drivers/mtd/ubi/ubi.h |    3 ++-<br />
 drivers/mtd/ubi/wl.c  |   32 +++++++++++++++++++++++---------<br />
 3 files changed, 33 insertions(+), 18 deletions(-)<br />
<br />
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c<br />
index bd5fdbf..4421540 100644<br />
--- a/drivers/mtd/ubi/eba.c<br />
+++ b/drivers/mtd/ubi/eba.c<br />
@@ -341,7 +341,7 @@ int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol,<br />
 	dbg_eba(&quot;erase LEB %d:%d, PEB %d&quot;, vol_id, lnum, pnum);<br />
<br />
 	vol-&gt;eba_tbl[lnum] = UBI_LEB_UNMAPPED;<br />
-	err = ubi_wl_put_peb(ubi, pnum, 0);<br />
+	err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 0);<br />
<br />
 out_unlock:<br />
 	leb_write_unlock(ubi, vol_id, lnum);<br />
@@ -550,7 +550,7 @@ retry:<br />
 	ubi_free_vid_hdr(ubi, vid_hdr);<br />
<br />
 	vol-&gt;eba_tbl[lnum] = new_pnum;<br />
-	ubi_wl_put_peb(ubi, pnum, 1);<br />
+	ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);<br />
<br />
 	ubi_msg(&quot;data was successfully recovered&quot;);<br />
 	return 0;<br />
@@ -558,7 +558,7 @@ retry:<br />
 out_unlock:<br />
 	mutex_unlock(&amp;ubi-&gt;buf_mutex);<br />
 out_put:<br />
-	ubi_wl_put_peb(ubi, new_pnum, 1);<br />
+	ubi_wl_put_peb(ubi, vol_id, lnum, new_pnum, 1);<br />
 	ubi_free_vid_hdr(ubi, vid_hdr);<br />
 	return err;<br />
<br />
@@ -568,7 +568,7 @@ write_error:<br />
 	 * get another one.<br />
 	 */<br />
 	ubi_warn(&quot;failed to write to PEB %d&quot;, new_pnum);<br />
-	ubi_wl_put_peb(ubi, new_pnum, 1);<br />
+	ubi_wl_put_peb(ubi, vol_id, lnum, new_pnum, 1);<br />
 	if (++tries &gt; UBI_IO_RETRIES) {<br />
 		ubi_free_vid_hdr(ubi, vid_hdr);<br />
 		return err;<br />
@@ -686,7 +686,7 @@ write_error:<br />
 	 * eraseblock, so just put it and request a new one. We assume that if<br />
 	 * this physical eraseblock went bad, the erase code will handle that.<br />
 	 */<br />
-	err = ubi_wl_put_peb(ubi, pnum, 1);<br />
+	err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);<br />
 	if (err || ++tries &gt; UBI_IO_RETRIES) {<br />
 		ubi_ro_mode(ubi);<br />
 		leb_write_unlock(ubi, vol_id, lnum);<br />
@@ -804,7 +804,7 @@ write_error:<br />
 		return err;<br />
 	}<br />
<br />
-	err = ubi_wl_put_peb(ubi, pnum, 1);<br />
+	err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);<br />
 	if (err || ++tries &gt; UBI_IO_RETRIES) {<br />
 		ubi_ro_mode(ubi);<br />
 		leb_write_unlock(ubi, vol_id, lnum);<br />
@@ -901,7 +901,7 @@ retry:<br />
 	}<br />
<br />
 	if (vol-&gt;eba_tbl[lnum] &gt;= 0) {<br />
-		err = ubi_wl_put_peb(ubi, vol-&gt;eba_tbl[lnum], 0);<br />
+		err = ubi_wl_put_peb(ubi, vol_id, lnum, vol-&gt;eba_tbl[lnum], 0);<br />
 		if (err)<br />
 			goto out_leb_unlock;<br />
 	}<br />
@@ -926,7 +926,7 @@ write_error:<br />
 		goto out_leb_unlock;<br />
 	}<br />
<br />
-	err = ubi_wl_put_peb(ubi, pnum, 1);<br />
+	err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);<br />
 	if (err || ++tries &gt; UBI_IO_RETRIES) {<br />
 		ubi_ro_mode(ubi);<br />
 		goto out_leb_unlock;<br />
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h<br />
index 75b9f1c..05aa452 100644<br />
--- a/drivers/mtd/ubi/ubi.h<br />
+++ b/drivers/mtd/ubi/ubi.h<br />
@@ -533,7 +533,8 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si);<br />
<br />
 /* wl.c */<br />
 int ubi_wl_get_peb(struct ubi_device *ubi);<br />
-int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture);<br />
+int ubi_wl_put_peb(struct ubi_device *ubi, int vol_id, int lnum,<br />
+		   int pnum, int torture);<br />
 int ubi_wl_flush(struct ubi_device *ubi);<br />
 int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum);<br />
 int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si);<br />
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c<br />
index 64ce993..39bdc3b 100644<br />
--- a/drivers/mtd/ubi/wl.c<br />
+++ b/drivers/mtd/ubi/wl.c<br />
@@ -140,6 +140,8 @@<br />
  * @list: a link in the list of pending works<br />
  * @func: worker function<br />
  * @e: physical eraseblock to erase<br />
+ * @vol_id: the volume ID on which this erasure is being performed<br />
+ * @lnum: the logical number of the erase block<br />
  * @torture: if the physical eraseblock has to be tortured<br />
  *<br />
  * The @func pointer points to the worker function. If the @cancel argument is<br />
@@ -152,6 +154,8 @@ struct ubi_work {<br />
 	int (*func)(struct ubi_device *ubi, struct ubi_work *wrk, int cancel);<br />
 	/* The below fields are only relevant to erasure works */<br />
 	struct ubi_wl_entry *e;<br />
+	int vol_id;<br />
+	int lnum;<br />
 	int torture;<br />
 };<br />
<br />
@@ -586,13 +590,15 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,<br />
  * schedule_erase - schedule an erase work.<br />
  * @ubi: UBI device description object<br />
  * @e: the WL entry of the physical eraseblock to erase<br />
+ * @vol_id: the volume ID that last used the eraseblock<br />
+ * @lnum: the last used logical block number for the eraseblock<br />
  * @torture: if the physical eraseblock has to be tortured<br />
  *<br />
  * This function returns zero in case of success and a %-ENOMEM in case of<br />
  * failure.<br />
  */<br />
 static int schedule_erase(struct ubi_device *ubi, struct ubi_wl_entry *e,<br />
-			  int torture)<br />
+			  int vol_id, int lnum, int torture)<br />
 {<br />
 	struct ubi_work *wl_wrk;<br />
<br />
@@ -605,6 +611,8 @@ static int schedule_erase(struct ubi_device *ubi, struct ubi_wl_entry *e,<br />
<br />
 	wl_wrk-&gt;func = &amp;erase_worker;<br />
 	wl_wrk-&gt;e = e;<br />
+	wl_wrk-&gt;vol_id = vol_id;<br />
+	wl_wrk-&gt;lnum = lnum;<br />
 	wl_wrk-&gt;torture = torture;<br />
<br />
 	schedule_ubi_work(ubi, wl_wrk);<br />
@@ -805,7 +813,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,<br />
 	ubi-&gt;move_to_put = ubi-&gt;wl_scheduled = 0;<br />
 	spin_unlock(&amp;ubi-&gt;wl_lock);<br />
<br />
-	err = schedule_erase(ubi, e1, 0);<br />
+	err = schedule_erase(ubi, e1, vol_id, lnum, 0);<br />
 	if (err) {<br />
 		kmem_cache_free(ubi_wl_entry_slab, e1);<br />
 		if (e2)<br />
@@ -820,7 +828,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,<br />
 		 */<br />
 		dbg_wl(&quot;PEB %d (LEB %d:%d) was put meanwhile, erase&quot;,<br />
 		       e2-&gt;pnum, vol_id, lnum);<br />
-		err = schedule_erase(ubi, e2, 0);<br />
+		err = schedule_erase(ubi, e2, vol_id, lnum, 0);<br />
 		if (err) {<br />
 			kmem_cache_free(ubi_wl_entry_slab, e2);<br />
 			goto out_ro;<br />
@@ -859,7 +867,7 @@ out_not_moved:<br />
 	spin_unlock(&amp;ubi-&gt;wl_lock);<br />
<br />
 	ubi_free_vid_hdr(ubi, vid_hdr);<br />
-	err = schedule_erase(ubi, e2, torture);<br />
+	err = schedule_erase(ubi, e2, vol_id, lnum, torture);<br />
 	if (err) {<br />
 		kmem_cache_free(ubi_wl_entry_slab, e2);<br />
 		goto out_ro;<br />
@@ -978,6 +986,8 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,<br />
 {<br />
 	struct ubi_wl_entry *e = wl_wrk-&gt;e;<br />
 	int pnum = e-&gt;pnum, err, need;<br />
+	int vol_id = wl_wrk-&gt;vol_id;<br />
+	int lnum = wl_wrk-&gt;lnum;<br />
<br />
 	if (cancel) {<br />
 		dbg_wl(&quot;cancel erasure of PEB %d EC %d&quot;, pnum, e-&gt;ec);<br />
@@ -986,7 +996,8 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,<br />
 		return 0;<br />
 	}<br />
<br />
-	dbg_wl(&quot;erase PEB %d EC %d&quot;, pnum, e-&gt;ec);<br />
+	dbg_wl(&quot;erase PEB %d EC %d volume %d LEB %d&quot;,<br />
+	       pnum, e-&gt;ec, wl_wrk-&gt;vol_id, wl_wrk-&gt;lnum);<br />
<br />
 	err = sync_erase(ubi, e, wl_wrk-&gt;torture);<br />
 	if (!err) {<br />
@@ -1016,7 +1027,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,<br />
 		int err1;<br />
<br />
 		/* Re-schedule the LEB for erasure */<br />
-		err1 = schedule_erase(ubi, e, 0);<br />
+		err1 = schedule_erase(ubi, e, vol_id, lnum, 0);<br />
 		if (err1) {<br />
 			err = err1;<br />
 			goto out_ro;<br />
@@ -1084,6 +1095,8 @@ out_ro:<br />
 /**<br />
  * ubi_wl_put_peb - return a PEB to the wear-leveling sub-system.<br />
  * @ubi: UBI device description object<br />
+ * @vol_id: the volume ID that last used the eraseblock<br />
+ * @lnum: the last used logical eraseblock number for the PEB<br />
  * @pnum: physical eraseblock to return<br />
  * @torture: if this physical eraseblock has to be tortured<br />
  *<br />
@@ -1092,7 +1105,8 @@ out_ro:<br />
  * occurred to this @pnum and it has to be tested. This function returns zero<br />
  * in case of success, and a negative error code in case of failure.<br />
  */<br />
-int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture)<br />
+int ubi_wl_put_peb(struct ubi_device *ubi, int vol_id, int lnum,<br />
+		   int pnum, int torture)<br />
 {<br />
 	int err;<br />
 	struct ubi_wl_entry *e;<br />
@@ -1158,7 +1172,7 @@ retry:<br />
 	}<br />
 	spin_unlock(&amp;ubi-&gt;wl_lock);<br />
<br />
-	err = schedule_erase(ubi, e, torture);<br />
+	err = schedule_erase(ubi, e, vol_id, lnum, torture);<br />
 	if (err) {<br />
 		spin_lock(&amp;ubi-&gt;wl_lock);<br />
 		wl_tree_add(e, &amp;ubi-&gt;used);<br />
@@ -1423,7 +1437,7 @@ int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si)<br />
 		e-&gt;pnum = seb-&gt;pnum;<br />
 		e-&gt;ec = seb-&gt;ec;<br />
 		ubi-&gt;lookuptbl[e-&gt;pnum] = e;<br />
-		if (schedule_erase(ubi, e, 0)) {<br />
+		if (schedule_erase(ubi, e, seb-&gt;vol_id, seb-&gt;lnum, 0)) {<br />
 			kmem_cache_free(ubi_wl_entry_slab, e);<br />
 			goto out_free;<br />
 		}<br />
-- <br />
1.7.5.4<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Joel Reardon</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 22:18:08 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?23,1084949,1084949#msg-1084949</guid>
            <title>[Full-disclosure] H2HC Brazil 9th Edition - Call for Papers (no replies)</title>
            <link>http://choon.net/forum/read.php?23,1084949,1084949#msg-1084949</link>
            <description><![CDATA[ -----BEGIN PGP SIGNED MESSAGE-----<br />
Hash: SHA1<br />
<br />
CALL FOR PAPERS - Hackers 2 Hackers Conference 9th edition<br />
<br />
The call for papers for H2HC 9th edition is now open.  H2HC is a hacker<br />
conference taking place in Sao Paulo, Brazil, from 18 to 23 October 2012.<br />
<br />
[ - Introduction - ]<br />
<br />
For the ninth consecutive year and past success we have been having,<br />
the annual Hackers 2 Hackers Conference will be held again in Sao Paulo,<br />
from 18 to 23 October 2012 and aims to get together industry,<br />
government, academia and underground hackers to share knowledge and<br />
leading-edge ideas about information security and everything related<br />
to it.<br />
<br />
H2HC will feature national and international speakers and attendees with<br />
a wide range of skills. The atmosphere is favorable to present all<br />
facets of computer security subject and will be a great opportunity to<br />
network with like-minded people and enthusiasts.<br />
<br />
The conference is a dual-language conference, with ALL talks in<br />
English or simultaneously translated to English by professional<br />
linguists with experience in computer sciences translation.<br />
<br />
[ - The venue - ]<br />
<br />
H2HC 9th edition will take place at Espaco Apas<br />
(http://www.espacoapas.com.br/default.asp?resolucao=1920X1200) in an<br />
auditorium with capacity for up to 600 people.  Additionally, we will<br />
be helding BSides SP on October, 20 in an auditorium in the same<br />
venue with capacity for up to 200 people.<br />
<br />
<br />
[*] About Sao Paulo (taken from fiquemaisumdia.com.br)<br />
<br />
The city is the largest in Brazil and first in South America by<br />
population. Quite often Sao Paulo intimidates people because of its<br />
size, its constant pedestrian and vehicle traffic, ethnic and cultural<br />
multiplicity. Sao Paulo will surprise you wheter you come here on<br />
business or for an expo, a congress or a convenion, stay for at least<br />
one more day. Let yourself be seduced by the cultural diversity of<br />
this many-faceted city which vibrates, dictates fashion, is always<br />
anticipating trends, and welcomes Brazilians and foreigners from all<br />
over. And oh, do not forget to have fun in South America's wildest night<br />
life.<br />
<br />
<br />
[ - Topics - ]<br />
<br />
  H2HC committee gives preference to lectures with practical<br />
demonstration. The conference staff will try to provide every equipment<br />
needed for the presentation in the case the author cannot provide them.<br />
<br />
The following topics include, but are not limited to:<br />
<br />
    * Exploit development techniques<br />
    * Telecom security and phone phreaking<br />
    * Fuzzing and application security test<br />
    * Penetration testing<br />
    * Web application security<br />
    * Techniques for development of secure software and systems<br />
    * Hardware hacking, embedded systems and other electronic devices<br />
    * Mobile devices exploitation, Symbian, P2K and bluetooth technologies<br />
    * Analysis of virus, worms and all sorts of malwares<br />
    * Reverse engineering<br />
    * Rootkits<br />
    * Security in Wi-Fi and VoIP environments<br />
    * Information about smartcard and RFID security and similars<br />
    * Technical approach to alternative operating systems<br />
    * Denial of service attacks and/or countermeasures<br />
    * Security aspects in SCADA and industrial environments and<br />
&quot;obscure&quot; networks<br />
    * Cryptography<br />
    * Lockpicking, trashing, physical security and urban exploration<br />
    * Internet, privacy and Big Brother<br />
    * Information warfare and industrial espionage<br />
<br />
[ - Important dates - ]<br />
<br />
Conference and trainings - H2HC Sao Paulo/Brazil<br />
<br />
  October 18th and 19th: H2HC trainings 1<br />
  October 20th and 21th: H2HC 9th edition<br />
  October 22th and 23th: H2HC trainings 2<br />
<br />
<br />
Deadline and submissions<br />
<br />
  Deadline for proposal submissions: July 17 2012<br />
  Deadline for slides submissions:   August 17 2012<br />
<br />
<br />
Notification of acceptance or rejection: no later than August 10 2012<br />
<br />
    * E-mail for proposal submissions:<br />
	rodrigo *noSPAM* kernelhacking *dot* com *<br />
<br />
Make sure to provide along with your submission the following details:<br />
<br />
    * Speaker name or handle, address, e-mail, phone number and general<br />
contact information<br />
    * A brief but informative description about your talk<br />
    * Short biography of the presenter, including organization, company<br />
and affiliations<br />
    * Estimated time-length of presentation<br />
    * General topic of the speech (eg.: network security, secure<br />
programming, computer forensics, etc.)<br />
    * Any other technical requirements for your lecture<br />
    * Whether you need visa to enter Brazil or not<br />
<br />
Speakers will be allocated 50 minutes of presentation time, although, if<br />
needed, we can extend the presentation length if requested in advance.<br />
<br />
Preferable file format for papers and slides are both PDF and also PPT<br />
for slides.<br />
<br />
Speakers are asked to hand in slides used in their lectures.<br />
<br />
PLEASE NOTE: Bear in mind no sales pitches will be allowed. If your<br />
presentation involves advertisement of products or services please do<br />
not submit.<br />
<br />
[ - Information for speakers - ]<br />
<br />
  Speakers' privileges are:<br />
<br />
    * H2HC staff can guarantee and we will provide accommodation for 2<br />
nights<br />
    * For each non-resident speaker we might be able to cover travel<br />
expenses up to USD 1.000<br />
    * For each resident speaker we might be able to cover travel expenses<br />
    * Free pass to the conference<br />
    * Parties! Plenty of parties... Hope you enjoy it, otherwise you can<br />
stay in the hotel, sleep and regret!...<br />
<br />
[ - Other information - ]<br />
<br />
  For further information please check out our web site<br />
[<a href="http://www.h2hc.com.br/"  rel="nofollow">www.h2hc.com.br</a>] it will be updated with everything regarding<br />
the conference.<br />
-----BEGIN PGP SIGNATURE-----<br />
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)<br />
Comment: GPGTools - [<a href="http://gpgtools.org"  rel="nofollow">gpgtools.org</a>]<br />
Comment: Using GnuPG with Mozilla - [<a href="http://enigmail.mozdev.org/"  rel="nofollow">enigmail.mozdev.org</a>]<br />
<br />
iEYEARECAAYFAk+2UDoACgkQRpuC3B/O3qFxkwCffUblSjG4QJRL1DGfexcOi9Qq<br />
KuEAnj2vF4Ti1zGIqC0ZP/e75oFgwA5Y<br />
=PuSf<br />
-----END PGP SIGNATURE-----<br />
<br />
_______________________________________________<br />
Full-Disclosure - We believe in it.<br />
Charter: [<a href="http://lists.grok.org.uk/full-disclosure-charter.html"  rel="nofollow">lists.grok.org.uk</a>]<br />
Hosted and sponsored by Secunia - [<a href="http://secunia.com/"  rel="nofollow">secunia.com</a>]]]></description>
            <dc:creator>Rodrigo Rubira Branco (BSDaemon)</dc:creator>
            <category>Full-Disclosure</category>
            <pubDate>Fri, 18 May 2012 21:35:03 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084935,1084935#msg-1084935</guid>
            <title>[PATCH] cpuidle: (POWER) Replace pseries_notify_cpuidle_add call with a elegant notifier to fix lockdep problem in start_secondary (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084935,1084935#msg-1084935</link>
            <description><![CDATA[ The following patch is to remove the pseries_notify_add_cpu() call<br />
and replace it by a hot plug notifier.<br />
This would prevent cpuidle resources being<br />
released and allocated each time cpu comes online on pseries.<br />
The earlier design was causing a lockdep problem<br />
in start_secondary as reported on this thread<br />
        -[<a href="https://lkml.org/lkml/2012/5/17/2"  rel="nofollow">lkml.org</a>]<br />
<br />
This applies on 3.4-rc7<br />
<br />
Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;<br />
---<br />
 arch/powerpc/include/asm/processor.h            |    2 --<br />
 arch/powerpc/platforms/pseries/processor_idle.c |   25<br />
+++++++++++++++++------<br />
 arch/powerpc/platforms/pseries/smp.c            |    1 -<br />
 3 files changed, 19 insertions(+), 9 deletions(-)<br />
<br />
diff --git a/arch/powerpc/include/asm/processor.h<br />
b/arch/powerpc/include/asm/processor.h<br />
index 8e2d037..c6bc22b 100644<br />
--- a/arch/powerpc/include/asm/processor.h<br />
+++ b/arch/powerpc/include/asm/processor.h<br />
@@ -390,10 +390,8 @@ void cpu_idle_wait(void);<br />
<br />
 #ifdef CONFIG_PSERIES_IDLE<br />
 extern void update_smt_snooze_delay(int snooze);<br />
-extern int pseries_notify_cpuidle_add_cpu(int cpu);<br />
 #else<br />
 static inline void update_smt_snooze_delay(int snooze) {}<br />
-static inline int pseries_notify_cpuidle_add_cpu(int cpu) { return 0; }<br />
 #endif<br />
<br />
 extern void flush_instruction_cache(void);<br />
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c<br />
b/arch/powerpc/platforms/pseries/processor_idle.c<br />
index 41a34bc..d1a7dc0 100644<br />
--- a/arch/powerpc/platforms/pseries/processor_idle.c<br />
+++ b/arch/powerpc/platforms/pseries/processor_idle.c<br />
@@ -11,6 +11,7 @@<br />
 #include &lt;linux/moduleparam.h&gt;<br />
 #include &lt;linux/cpuidle.h&gt;<br />
 #include &lt;linux/cpu.h&gt;<br />
+#include &lt;linux/notifier.h&gt;<br />
<br />
 #include &lt;asm/paca.h&gt;<br />
 #include &lt;asm/reg.h&gt;<br />
@@ -186,17 +187,28 @@ static struct cpuidle_state<br />
shared_states[MAX_IDLE_STATE_COUNT] = {<br />
 		.enter = &amp;shared_cede_loop },<br />
 };<br />
<br />
-int pseries_notify_cpuidle_add_cpu(int cpu)<br />
+static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n,<br />
+			unsigned long action, void *hcpu)<br />
 {<br />
+	int hotcpu = (unsigned long)hcpu;<br />
 	struct cpuidle_device *dev =<br />
-			per_cpu_ptr(pseries_cpuidle_devices, cpu);<br />
-	if (dev &amp;&amp; cpuidle_get_driver()) {<br />
-		cpuidle_disable_device(dev);<br />
-		cpuidle_enable_device(dev);<br />
+			per_cpu_ptr(pseries_cpuidle_devices, hotcpu);<br />
+<br />
+	switch (action &amp; 0xf) {<br />
+	case CPU_ONLINE:<br />
+		if (dev &amp;&amp; cpuidle_get_driver()) {<br />
+			cpuidle_disable_device(dev);<br />
+			cpuidle_enable_device(dev);<br />
+		}<br />
+		break;<br />
 	}<br />
-	return 0;<br />
+	return NOTIFY_OK;<br />
 }<br />
<br />
+static struct notifier_block setup_hotplug_notifier = {<br />
+	.notifier_call = pseries_cpuidle_add_cpu_notifier,<br />
+};<br />
+<br />
 /*<br />
  * pseries_cpuidle_driver_init()<br />
  */<br />
@@ -321,6 +333,7 @@ static int __init pseries_processor_idle_init(void)<br />
 		return retval;<br />
 	}<br />
<br />
+	register_cpu_notifier(&amp;setup_hotplug_notifier);<br />
 	printk(KERN_DEBUG &quot;pseries_idle_driver registered\n&quot;);<br />
<br />
 	return 0;<br />
diff --git a/arch/powerpc/platforms/pseries/smp.c<br />
b/arch/powerpc/platforms/pseries/smp.c<br />
index e16bb8d..71706bc 100644<br />
--- a/arch/powerpc/platforms/pseries/smp.c<br />
+++ b/arch/powerpc/platforms/pseries/smp.c<br />
@@ -147,7 +147,6 @@ static void __devinit smp_xics_setup_cpu(int cpu)<br />
 	set_cpu_current_state(cpu, CPU_STATE_ONLINE);<br />
 	set_default_offline_state(cpu);<br />
 #endif<br />
-	pseries_notify_cpuidle_add_cpu(cpu);<br />
 }<br />
<br />
 static int __devinit smp_pSeries_kick_cpu(int nr)<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Deepthi Dharwar</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 21:30:04 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084934,1084934#msg-1084934</guid>
            <title>[GIT] floppy (1 reply)</title>
            <link>http://choon.net/forum/read.php?21,1084934,1084934#msg-1084934</link>
            <description><![CDATA[ Jens,<br />
<br />
please pull from <br />
<br />
  git://git.kernel.org/pub/scm/linux/kernel/git/jikos/floppy.git upstream<br />
<br />
to receive 3 patches for the floppy driver. The first one fixes a number <br />
of races, which never exposed themselves on real floppy hardware, but are <br />
triggering a lot on virtualized/emulated floppy drives. The second one <br />
makes handling of O_EXCL on /dev/fd0 more consistent with other block <br />
devices (and actually fixes a userspace-visible regression). The third one <br />
adds myself as an unhappy maintainer, as discussed here: <br />
[<a href="https://lkml.org/lkml/2012/5/16/370"  rel="nofollow">lkml.org</a>]<br />
<br />
The 'upstream' branch is based on your 'for-3.5/drivers' branch.<br />
<br />
Thanks!<br />
<br />
Jiri Kosina (3):<br />
      floppy: convert to delayed work and single-thread wq<br />
      floppy: remove floppy-specific O_EXCL handling<br />
      floppy: take over maintainership<br />
<br />
 MAINTAINERS            |    6 ++<br />
 drivers/block/floppy.c |  161 +++++++++++++++++++++++-------------------------<br />
 2 files changed, 83 insertions(+), 84 deletions(-)<br />
<br />
-- <br />
Jiri Kosina<br />
SUSE Labs<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Jiri Kosina</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 22:21:11 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084923,1084923#msg-1084923</guid>
            <title>BFS 420: fix ttwu stat (1 reply)</title>
            <link>http://choon.net/forum/read.php?21,1084923,1084923#msg-1084923</link>
            <description><![CDATA[ Due to monolithic runqueue used by BFS, the ttwu stat is bogus as we could not<br />
tell/predict on which CPU a woken task will run after it is activated. And we<br />
have to delay updating ttwu stat until the stage when task is taken off run<br />
queue. To achieve that, a field, wakeup_cpu, is added in the task struct, and is<br />
inited to be invalid CPU number for each new task.<br />
<br />
When updating ttwu stat, now it is simply to mark the delayed operation; and<br />
when taking task off runqueue, the stat is updated.<br />
<br />
<br />
--- a/include/linux/sched.h	Fri May 18 20:51:06 2012<br />
+++ b/include/linux/sched.h	Fri May 18 20:32:20 2012<br />
@@ -1255,6 +1255,11 @@ struct task_struct {<br />
 	struct list_head run_list;<br />
 	u64 last_ran;<br />
 	u64 sched_time; /* sched_clock time spent running */<br />
+#ifdef CONFIG_SCHEDSTATS<br />
+#ifdef CONFIG_SMP<br />
+	int wakeup_cpu; //for ttwu stat<br />
+#endif<br />
+#endif<br />
 #ifdef CONFIG_SMP<br />
 	bool sticky; /* Soft affined flag */<br />
 #endif<br />
--- a/kernel/sched/bfs.c	Mon May 14 20:50:38 2012<br />
+++ b/kernel/sched/bfs.c	Fri May 18 20:46:22 2012<br />
@@ -1145,6 +1145,30 @@ static inline void unstick_task(struct r<br />
  */<br />
 static inline void take_task(int cpu, struct task_struct *p)<br />
 {<br />
+#ifdef CONFIG_SCHEDSTATS<br />
+#ifdef CONFIG_SMP<br />
+	if (p-&gt;wakeup_cpu == -1)<br />
+		goto skip;<br />
+<br />
+	if (cpu == p-&gt;wakeup_cpu) {<br />
+		schedstat_inc(cpu_rq(cpu), ttwu_local);<br />
+	}<br />
+	else if (cpu_online(p-&gt;wakeup_cpu)) {<br />
+		struct sched_domain *sd;<br />
+<br />
+		rcu_read_lock();<br />
+		for_each_domain(p-&gt;wakeup_cpu, sd) {<br />
+			if (cpumask_test_cpu(cpu, sched_domain_span(sd))) {<br />
+				schedstat_inc(sd, ttwu_wake_remote);<br />
+				break;<br />
+			}<br />
+		}<br />
+		rcu_read_unlock();<br />
+	}<br />
+	p-&gt;wakeup_cpu = -1;<br />
+skip:<br />
+#endif<br />
+#endif<br />
 	set_task_cpu(p, cpu);<br />
 	dequeue_task(p);<br />
 	clear_sticky(p);<br />
@@ -1485,30 +1509,13 @@ static void try_preempt(struct task_stru<br />
 }<br />
 #endif /* CONFIG_SMP */<br />
<br />
-static void<br />
-ttwu_stat(struct task_struct *p, int cpu, int wake_flags)<br />
+static void ttwu_stat(struct task_struct *p, int cpu, int wake_flags)<br />
 {<br />
 #ifdef CONFIG_SCHEDSTATS<br />
 	struct rq *rq = this_rq();<br />
<br />
 #ifdef CONFIG_SMP<br />
-	int this_cpu = smp_processor_id();<br />
-<br />
-	if (cpu == this_cpu)<br />
-		schedstat_inc(rq, ttwu_local);<br />
-	else {<br />
-		struct sched_domain *sd;<br />
-<br />
-		rcu_read_lock();<br />
-		for_each_domain(this_cpu, sd) {<br />
-			if (cpumask_test_cpu(cpu, sched_domain_span(sd))) {<br />
-				schedstat_inc(sd, ttwu_wake_remote);<br />
-				break;<br />
-			}<br />
-		}<br />
-		rcu_read_unlock();<br />
-	}<br />
-<br />
+	p-&gt;wakeup_cpu = smp_processor_id();<br />
 #endif /* CONFIG_SMP */<br />
<br />
 	schedstat_inc(rq, ttwu_count);<br />
@@ -1717,6 +1724,12 @@ void sched_fork(struct task_struct *p)<br />
 #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)<br />
 	if (unlikely(sched_info_on()))<br />
 		memset(&amp;p-&gt;sched_info, 0, sizeof(p-&gt;sched_info));<br />
+#endif<br />
+<br />
+#ifdef CONFIG_SCHEDSTATS<br />
+#ifdef CONFIG_SMP<br />
+	p-&gt;wakeup_cpu = -1;<br />
+#endif<br />
 #endif<br />
<br />
 	p-&gt;on_cpu = false;<br />
--<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Hillf Danton</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 21:56:07 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084922,1084922#msg-1084922</guid>
            <title>[Xen-devel] libxl: cannot start guest (2 replies)</title>
            <link>http://choon.net/forum/read.php?22,1084922,1084922#msg-1084922</link>
            <description><![CDATA[ Hi,<br />
<br />
I am currently using c/s 25371:e9058654ca08.<br />
When I try to start a HVM guest I get this failure:<br />
<br />
<br />
xc: info: VIRTUAL MEMORY ARRANGEMENT:<br />
  Loader:        0000000000100000-&gt;000000000019bd04<br />
  TOTAL:         0000000000000000-&gt;00000000ff800000<br />
  ENTRY ADDRESS: 0000000000100000<br />
xc: info: PHYSICAL MEMORY ALLOCATION:<br />
  4KB PAGES: 0x0000000000000200<br />
  2MB PAGES: 0x00000000000003fb<br />
  1GB PAGES: 0x0000000000000002<br />
libxl: error: libxl.c:3208:libxl_sched_credit_domain_set: Cpu weight out<br />
of range, valid values are within range from 1 to 65535<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 1: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 0: Bad file descriptor<br />
libxl: error: libxl_device.c:107:libxl__device_generic_add: xs<br />
transaction failed: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 1: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 0: Bad file descriptor<br />
libxl: error: libxl_device.c:107:libxl__device_generic_add: xs<br />
transaction failed: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 1: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 0: Bad file descriptor<br />
libxl: error: libxl_device.c:107:libxl__device_generic_add: xs<br />
transaction failed: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 1: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 0: Bad file descriptor<br />
libxl: error: libxl_device.c:107:libxl__device_generic_add: xs<br />
transaction failed: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 1: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 0: Bad file descriptor<br />
libxl: error: libxl_device.c:107:libxl__device_generic_add: xs<br />
transaction failed: Bad file descriptor<br />
libxl: error: libxl_xshelp.c:102:libxl__xs_get_dompath: failed to get<br />
dompath for 1: Bad file descriptor<br />
libxl: error: libxl_event.c:468:libxl__ev_xswatch_register: create watch<br />
for path /local/domain/0/device-model/1/state: Bad file descriptor<br />
libxl: error: libxl_dm.c:1069:device_model_spawn_outcome: domain 1<br />
device model: spawn failed (rc=-3)<br />
assertion &quot;ao-&gt;in_initiator&quot; failed: file &quot;libxl_event.c&quot;, line 1388,<br />
function &quot;libxl__ao_complete_check_progress_reports&quot;<br />
[1]   Abort trap (core dumped) xl create -c ${F...<br />
<br />
<br />
Christoph<br />
<br />
<br />
-- <br />
---to satisfy European Law for business letters:<br />
Advanced Micro Devices GmbH<br />
Einsteinring 24, 85689 Dornach b. Muenchen<br />
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd<br />
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen<br />
Registergericht Muenchen, HRB Nr. 43632<br />
<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>Christoph Egger</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 22:25:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084901,1084901#msg-1084901</guid>
            <title>Re: [Xen-devel] [XenARM] Regarding Xen-ARM for Cortex-A8 on Fast Model Emulators [FME] (1 reply)</title>
            <link>http://choon.net/forum/read.php?22,1084901,1084901#msg-1084901</link>
            <description><![CDATA[ Questions about the port of Xen to ARM with virt extensions are best<br />
posted to xen-devel, the xen-arm list focuses on the PV port. Adding<br />
xen-devel since it seems you are mainly asking about the<br />
w/-virt-extensions port.<br />
<br />
On Fri, 2012-05-18 at 12:38 +0100, Krishna Pavan wrote:<br />
&gt; Please inform the status of Xen-ARM for Cortex-A8 CPU's on FME from<br />
&gt; ARM.<br />
<br />
AFAIK no one has tried the w/-virt-extensions port on this model. The<br />
only ones which I know have been tried are Cortex-A15 model and AEM.<br />
<br />
Cortex-A8 already exists so I would be surprised if it were to be<br />
updated with virt extensions, do you have some reason to think that it<br />
will be?<br />
<br />
Cortex A15 and Cortex A7 are on our radar as upcoming processors which<br />
will have the extensions. Cortex A8 is not.<br />
<br />
&gt; These links here <br />
&gt; [<a href="http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions"  rel="nofollow">wiki.xen.org</a>] <br />
&gt; &amp; <br />
&gt; [<a href="http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions/FastModels"  rel="nofollow">wiki.xen.org</a>]<br />
&gt; <br />
&gt; give information about the dom0 running on FME.<br />
&gt; <br />
&gt; Though Xen-ARM is available for Cortex-A9 with KVM Virt extensions for<br />
&gt; Tegra2Harmony,<br />
<br />
I'm confused by the mention of both Xen-ARM and KVM in this sentence.<br />
Also did you mean A8 or A9 here?<br />
<br />
&gt; Cortex-A8 is widely used, and I would like to know the status.<br />
<br />
AFAIK these chips don't/won't support virtualisation extensions.<br />
<br />
Ian.<br />
<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>Ian Campbell</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 21:21:09 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084895,1084895#msg-1084895</guid>
            <title>[PATCH 00/15] [GIT PULL] tracing: Updates for 3.5 (16 replies)</title>
            <link>http://choon.net/forum/read.php?21,1084895,1084895#msg-1084895</link>
            <description><![CDATA[ Ingo,<br />
<br />
This should be my last set of changes for the next merge window.<br />
<br />
Please pull the latest tip/perf/core tree, which can be found at:<br />
<br />
  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git<br />
tip/perf/core<br />
<br />
Head SHA1: b732d439cb43336cd6d7e804ecb2c81193ef63b0<br />
<br />
<br />
Namhyung Kim (1):<br />
      tracing: Check return value of tracing_dentry_percpu()<br />
<br />
Steven Rostedt (11):<br />
      tracing: Clean up tracing_mark_write()<br />
      ring-buffer: Add integrity check at end of iter read<br />
      ring-buffer: Reset head page before running self test<br />
      ftrace: Sort all function addresses, not just per page<br />
      ftrace: Remove extra helper functions<br />
      ftrace: Speed up search by skipping pages by address<br />
      ftrace: Consolidate ftrace_location() and ftrace_text_reserved()<br />
      ftrace: Return record ip addr for ftrace_location()<br />
      ftrace: Make ftrace_modify_all_code() global for archs to use<br />
      ftrace/x86: Have x86 ftrace use the ftrace_modify_all_code()<br />
      ftrace: Remove selecting FRAME_POINTER with FUNCTION_TRACER<br />
<br />
Vaibhav Nagarnaik (3):<br />
      ring-buffer: Make removal of ring buffer pages atomic<br />
      ring-buffer: Make addition of pages in ring buffer atomic<br />
      tracing: change CPU ring buffer state from tracing_cpumask<br />
<br />
----<br />
 arch/x86/kernel/ftrace.c          |   15 +-<br />
 include/asm-generic/vmlinux.lds.h |    2 +-<br />
 include/linux/ftrace.h            |    5 +-<br />
 kernel/trace/Kconfig              |    1 -<br />
 kernel/trace/ftrace.c             |  198 ++++++++++---------<br />
 kernel/trace/ring_buffer.c        |  394 +++++++++++++++++++++++++++++--------<br />
 kernel/trace/trace.c              |   49 ++---<br />
 7 files changed, 446 insertions(+), 218 deletions(-)]]></description>
            <dc:creator>Steven Rostedt</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 22:21:18 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084893,1084893#msg-1084893</guid>
            <title>[PATCH RFC v2 1/2] pinctrl: add pinctrl_add_gpio_ranges function (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084893,1084893#msg-1084893</link>
            <description><![CDATA[ From: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;<br />
<br />
Signed-off-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;<br />
---<br />
 drivers/pinctrl/core.c          |   22 ++++++++++++++++++++++<br />
 include/linux/pinctrl/pinctrl.h |    6 ++++++<br />
 2 files changed, 28 insertions(+), 0 deletions(-)<br />
<br />
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c<br />
index c3b331b..916ed49 100644<br />
--- a/drivers/pinctrl/core.c<br />
+++ b/drivers/pinctrl/core.c<br />
@@ -346,6 +346,28 @@ void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,<br />
 }<br />
 EXPORT_SYMBOL_GPL(pinctrl_remove_gpio_range);<br />
 <br />
+void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+			     struct pinctrl_gpio_range *ranges,<br />
+			     unsigned nranges)<br />
+{<br />
+	int i;<br />
+<br />
+	for (i = 0; i &lt; nranges; i++)<br />
+		pinctrl_add_gpio_range(pctldev, &amp;ranges<i>);<br />
+}<br />
+EXPORT_SYMBOL_GPL(pinctrl_add_gpio_ranges);<br />
+<br />
+void pinctrl_remove_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				struct pinctrl_gpio_range *ranges,<br />
+				unsigned nranges)<br />
+{<br />
+	int i;<br />
+<br />
+	for (i = 0; i &lt; nranges; i++)<br />
+		pinctrl_remove_gpio_range(pctldev, &amp;ranges<i>);<br />
+}<br />
+EXPORT_SYMBOL_GPL(pinctrl_remove_gpio_ranges);<br />
+<br />
 /**<br />
  * pinctrl_get_group_selector() - returns the group selector for a group<br />
  * @pctldev: the pin controller handling the group<br />
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h<br />
index 3b894a6..6a29965 100644<br />
--- a/include/linux/pinctrl/pinctrl.h<br />
+++ b/include/linux/pinctrl/pinctrl.h<br />
@@ -133,6 +133,12 @@ extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,<br />
 				struct pinctrl_gpio_range *range);<br />
 extern void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,<br />
 				struct pinctrl_gpio_range *range);<br />
+extern void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+			     struct pinctrl_gpio_range *ranges,<br />
+			     unsigned nranges);<br />
+extern void pinctrl_remove_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				struct pinctrl_gpio_range *ranges,<br />
+				unsigned nranges);<br />
 extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);<br />
 extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);<br />
 #else<br />
-- <br />
1.7.0.4<br />
<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]</i></i>]]></description>
            <dc:creator>Dong Aisheng</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 21:09:08 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084892,1084892#msg-1084892</guid>
            <title>[PATCH RFC v2 2/2] pinctrl: add pinctrl gpio binding support (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084892,1084892#msg-1084892</link>
            <description><![CDATA[ From: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;<br />
<br />
The gpio ranges standard dt binding format is<br />
&lt;&amp;gpio $gpio_offset $pin_offset $npin&gt;<br />
<br />
The core will parse and register the pinctrl gpio ranges<br />
from device tree.<br />
<br />
TODO: add binding doc.<br />
<br />
Signed-off-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;<br />
<br />
---<br />
ChangeLog v1-&gt;v2:<br />
* introduce standard binding for gpio range.<br />
---<br />
 drivers/pinctrl/devicetree.c    |   95 +++++++++++++++++++++++++++++++++++++++<br />
 drivers/pinctrl/devicetree.h    |    3 -<br />
 include/linux/pinctrl/pinctrl.h |   22 +++++++++<br />
 3 files changed, 117 insertions(+), 3 deletions(-)<br />
<br />
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c<br />
index fcb1de4..c1b87e6 100644<br />
--- a/drivers/pinctrl/devicetree.c<br />
+++ b/drivers/pinctrl/devicetree.c<br />
@@ -17,7 +17,9 @@<br />
  */<br />
 <br />
 #include &lt;linux/device.h&gt;<br />
+#include &lt;linux/module.h&gt;<br />
 #include &lt;linux/of.h&gt;<br />
+#include &lt;linux/of_gpio.h&gt;<br />
 #include &lt;linux/pinctrl/pinctrl.h&gt;<br />
 #include &lt;linux/slab.h&gt;<br />
 <br />
@@ -247,3 +249,96 @@ err:<br />
 	pinctrl_dt_free_maps(p);<br />
 	return ret;<br />
 }<br />
+<br />
+/*<br />
+ * pinctrl_dt_add_gpio_range() - parse and register GPIO ranges from device tree<br />
+ * @pctldev: pin controller device to add the range to<br />
+ * @np: the device node contains the property @propname<br />
+ * @propname: a list of phandles of gpios and corresponding data.<br />
+ *  The format is: &lt;&amp;gpio0 $gpio_offset $pin_offset $count&gt;<br />
+ */<br />
+int pinctrl_dt_add_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				struct device_node *np,<br />
+				const char *propname)<br />
+{<br />
+	struct pinctrl_gpio_range *ranges;<br />
+	unsigned int gpio_offset, pin_offset, npins;<br />
+	struct device_node *np_gpio;<br />
+	struct property *prop;<br />
+	const __be32 *list;<br />
+	phandle phandle;<br />
+	int nranges;<br />
+	int size;<br />
+	int i;<br />
+<br />
+	if (!np || !propname) {<br />
+		dev_err(pctldev-&gt;dev, &quot;no device node or gpios propname\n&quot;);<br />
+		return -EINVAL;<br />
+	}<br />
+<br />
+	prop = of_find_property(np, propname, &amp;size);<br />
+	if (!prop)<br />
+		return -ENODEV;<br />
+<br />
+	list = prop-&gt;value;<br />
+	size /= sizeof(*list);<br />
+	if (size % 4) {<br />
+		dev_err(pctldev-&gt;dev, &quot;wrong gpio range table format\n&quot;);<br />
+		return -EINVAL;<br />
+	}<br />
+<br />
+	nranges = size /4;<br />
+	ranges = devm_kzalloc(pctldev-&gt;dev, nranges * sizeof(*ranges),<br />
+				GFP_KERNEL);<br />
+	for (i = 0; i &lt; nranges; i++) {<br />
+			phandle = be32_to_cpup(list++);<br />
+			np_gpio = of_find_node_by_phandle(phandle);<br />
+			if (!np_gpio) {<br />
+				dev_err(pctldev-&gt;dev,<br />
+					&quot;failed to find gpio node(%s)\n&quot;,<br />
+					np_gpio-&gt;name);<br />
+				return -ENODEV;<br />
+			}<br />
+<br />
+			ranges<i>.gc = of_node_to_gpiochip(np_gpio);<br />
+			if (!ranges<i>.gc) {<br />
+				dev_err(pctldev-&gt;dev,<br />
+					&quot;can not find gpio chip of node(%s)\n&quot;,<br />
+					np-&gt;name);<br />
+				of_node_put(np_gpio);<br />
+				return -ENODEV;<br />
+			}<br />
+<br />
+			gpio_offset = be32_to_cpu(*list++);<br />
+			pin_offset = be32_to_cpu(*list++);<br />
+			npins = be32_to_cpu(*list++);<br />
+<br />
+			if (gpio_offset &lt; 0 ||<br />
+			    gpio_offset &gt; ranges<i>.gc-&gt;ngpio ||<br />
+			    pin_offset &lt; 0 || npins &lt; 0) {<br />
+				dev_err(pctldev-&gt;dev,<br />
+					&quot;wrong data in the gpio range table\n&quot;);<br />
+				of_node_put(np_gpio);<br />
+				return -ENODEV;<br />
+			}<br />
+<br />
+			ranges<i>.name = dev_name(pctldev-&gt;dev);<br />
+			ranges<i>.base = ranges<i>.gc-&gt;base + gpio_offset;<br />
+			ranges<i>.pin_base = pin_offset;<br />
+			ranges<i>.npins = npins;<br />
+			of_node_put(np_gpio);<br />
+	}<br />
+<br />
+	pinctrl_add_gpio_ranges(pctldev, ranges, nranges);<br />
+<br />
+	return 0;<br />
+}<br />
+EXPORT_SYMBOL_GPL(pinctrl_dt_add_gpio_ranges);<br />
+<br />
+void pinctrl_dt_remove_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				   struct pinctrl_gpio_range *ranges,<br />
+				   unsigned nranges)<br />
+{<br />
+	pinctrl_remove_gpio_ranges(pctldev, ranges, nranges);<br />
+}<br />
+EXPORT_SYMBOL_GPL(pinctrl_dt_remove_gpio_ranges);<br />
diff --git a/drivers/pinctrl/devicetree.h b/drivers/pinctrl/devicetree.h<br />
index 760bc49..9f79657 100644<br />
--- a/drivers/pinctrl/devicetree.h<br />
+++ b/drivers/pinctrl/devicetree.h<br />
@@ -20,9 +20,7 @@<br />
 <br />
 void pinctrl_dt_free_maps(struct pinctrl *p);<br />
 int pinctrl_dt_to_map(struct pinctrl *p);<br />
-<br />
 #else<br />
-<br />
 static inline int pinctrl_dt_to_map(struct pinctrl *p)<br />
 {<br />
 	return 0;<br />
@@ -31,5 +29,4 @@ static inline int pinctrl_dt_to_map(struct pinctrl *p)<br />
 static inline void pinctrl_dt_free_maps(struct pinctrl *p)<br />
 {<br />
 }<br />
-<br />
 #endif<br />
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h<br />
index 6a29965..98d77b4 100644<br />
--- a/include/linux/pinctrl/pinctrl.h<br />
+++ b/include/linux/pinctrl/pinctrl.h<br />
@@ -141,6 +141,28 @@ extern void pinctrl_remove_gpio_ranges(struct pinctrl_dev *pctldev,<br />
 				unsigned nranges);<br />
 extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);<br />
 extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);<br />
+<br />
+#ifdef CONFIG_OF<br />
+extern int pinctrl_dt_add_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				struct device_node *np,<br />
+				const char *propname);<br />
+extern void pinctrl_dt_remove_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				   struct pinctrl_gpio_range *ranges,<br />
+				   unsigned nranges);<br />
+#else<br />
+static inline int pinctrl_dt_add_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				struct device_node *np,<br />
+				const char *propname)<br />
+{<br />
+	return 0;<br />
+}<br />
+static void pinctrl_dt_remove_gpio_ranges(struct pinctrl_dev *pctldev,<br />
+				   struct pinctrl_gpio_range *ranges,<br />
+				   unsigned nranges)<br />
+{<br />
+}<br />
+#endif	/* !CONFIG_OF */<br />
+<br />
 #else<br />
 <br />
 struct pinctrl_dev;<br />
-- <br />
1.7.0.4<br />
<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]</i></i></i></i></i></i></i></i>]]></description>
            <dc:creator>Dong Aisheng</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 21:09:08 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084870,1084870#msg-1084870</guid>
            <title>=======  Hint (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084870,1084870#msg-1084870</link>
            <description><![CDATA[ I need your names in Full and Address to enable me furnish you with details of my Deal.<br />
Ling<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Ling</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 20:43:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084866,1084866#msg-1084866</guid>
            <title>[GIT PULL] block fixes for 3.4 final (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084866,1084866#msg-1084866</link>
            <description><![CDATA[ Hi Linus,<br />
<br />
A few small, but important fixes. Most of them are marked<br />
for stable as we..<br />
<br />
- Fix failure to release a semaphore on error path in mtip32xx.<br />
- Fix crashable condition in bio_get_nr_vecs().<br />
- Don't mark end-of-disk buffers as mapped, limit it to<br />
  i_size.<br />
- Fix for build problem with CONFIG_BLOCK=n on arm at least.<br />
- Fix for a buffer overlow on UUID partition printing.<br />
- Trivial removal of unused variables in dac960.<br />
<br />
Please pull!<br />
<br />
<br />
  git://git.kernel.dk/linux-block.git for-linus<br />
<br />
----------------------------------------------------------------<br />
Asai Thambi S P (1):<br />
      mtip32xx: release the semaphore on an error path<br />
<br />
Bernd Schubert (1):<br />
      bio allocation failure due to bio_get_nr_vecs()<br />
<br />
Jeff Moyer (1):<br />
      block: don't mark buffers beyond end of disk as mapped<br />
<br />
Jesper Juhl (1):<br />
      dac960: Remove unused variables from DAC960_CreateProcEntries()<br />
<br />
Russell King (1):<br />
      Fix blkdev.h build errors when BLOCK=n<br />
<br />
Tejun Heo (1):<br />
      block: fix buffer overflow when printing partition UUIDs<br />
<br />
 block/genhd.c                     |   10 ++++++----<br />
 drivers/block/DAC960.c            |   23 ++++++++++-------------<br />
 drivers/block/mtip32xx/mtip32xx.c |    4 +++-<br />
 fs/bio.c                          |    7 ++++++-<br />
 fs/block_dev.c                    |    6 +++---<br />
 fs/buffer.c                       |    4 +++-<br />
 include/linux/blkdev.h            |    3 ++-<br />
 include/linux/fs.h                |    1 +<br />
 include/linux/genhd.h             |    6 ------<br />
 9 files changed, 34 insertions(+), 30 deletions(-)<br />
<br />
diff --git a/block/genhd.c b/block/genhd.c<br />
index df9816e..9cf5583 100644<br />
--- a/block/genhd.c<br />
+++ b/block/genhd.c<br />
@@ -743,7 +743,7 @@ void __init printk_all_partitions(void)<br />
 		struct hd_struct *part;<br />
 		char name_buf[BDEVNAME_SIZE];<br />
 		char devt_buf[BDEVT_SIZE];<br />
-		u8 uuid[PARTITION_META_INFO_UUIDLTH * 2 + 1];<br />
+		char uuid_buf[PARTITION_META_INFO_UUIDLTH * 2 + 5];<br />
 <br />
 		/*<br />
 		 * Don't show empty devices or things that have been<br />
@@ -762,14 +762,16 @@ void __init printk_all_partitions(void)<br />
 		while ((part = disk_part_iter_next(&amp;piter))) {<br />
 			bool is_part0 = part == &amp;disk-&gt;part0;<br />
 <br />
-			uuid[0] = 0;<br />
+			uuid_buf[0] = '\0';<br />
 			if (part-&gt;info)<br />
-				part_unpack_uuid(part-&gt;info-&gt;uuid, uuid);<br />
+				snprintf(uuid_buf, sizeof(uuid_buf), &quot;%pU&quot;,<br />
+					 part-&gt;info-&gt;uuid);<br />
 <br />
 			printk(&quot;%s%s %10llu %s %s&quot;, is_part0 ? &quot;&quot; : &quot;  &quot;,<br />
 			       bdevt_str(part_devt(part), devt_buf),<br />
 			       (unsigned long long)part-&gt;nr_sects &gt;&gt; 1,<br />
-			       disk_name(disk, part-&gt;partno, name_buf), uuid);<br />
+			       disk_name(disk, part-&gt;partno, name_buf),<br />
+			       uuid_buf);<br />
 			if (is_part0) {<br />
 				if (disk-&gt;driverfs_dev != NULL &amp;&amp;<br />
 				    disk-&gt;driverfs_dev-&gt;driver != NULL)<br />
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c<br />
index 8db9089..9a13e88 100644<br />
--- a/drivers/block/DAC960.c<br />
+++ b/drivers/block/DAC960.c<br />
@@ -6580,24 +6580,21 @@ static const struct file_operations dac960_user_command_proc_fops = {<br />
 <br />
 static void DAC960_CreateProcEntries(DAC960_Controller_T *Controller)<br />
 {<br />
-	struct proc_dir_entry *StatusProcEntry;<br />
 	struct proc_dir_entry *ControllerProcEntry;<br />
-	struct proc_dir_entry *UserCommandProcEntry;<br />
 <br />
 	if (DAC960_ProcDirectoryEntry == NULL) {<br />
-  		DAC960_ProcDirectoryEntry = proc_mkdir(&quot;rd&quot;, NULL);<br />
-  		StatusProcEntry = proc_create(&quot;status&quot;, 0,<br />
-					   DAC960_ProcDirectoryEntry,<br />
-					   &amp;dac960_proc_fops);<br />
+		DAC960_ProcDirectoryEntry = proc_mkdir(&quot;rd&quot;, NULL);<br />
+		proc_create(&quot;status&quot;, 0, DAC960_ProcDirectoryEntry,<br />
+			    &amp;dac960_proc_fops);<br />
 	}<br />
 <br />
-      sprintf(Controller-&gt;ControllerName, &quot;c%d&quot;, Controller-&gt;ControllerNumber);<br />
-      ControllerProcEntry = proc_mkdir(Controller-&gt;ControllerName,<br />
-				       DAC960_ProcDirectoryEntry);<br />
-      proc_create_data(&quot;initial_status&quot;, 0, ControllerProcEntry, &amp;dac960_initial_status_proc_fops, Controller);<br />
-      proc_create_data(&quot;current_status&quot;, 0, ControllerProcEntry, &amp;dac960_current_status_proc_fops, Controller);<br />
-      UserCommandProcEntry = proc_create_data(&quot;user_command&quot;, S_IWUSR | S_IRUSR, ControllerProcEntry, &amp;dac960_user_command_proc_fops, Controller);<br />
-      Controller-&gt;ControllerProcEntry = ControllerProcEntry;<br />
+	sprintf(Controller-&gt;ControllerName, &quot;c%d&quot;, Controller-&gt;ControllerNumber);<br />
+	ControllerProcEntry = proc_mkdir(Controller-&gt;ControllerName,<br />
+					 DAC960_ProcDirectoryEntry);<br />
+	proc_create_data(&quot;initial_status&quot;, 0, ControllerProcEntry, &amp;dac960_initial_status_proc_fops, Controller);<br />
+	proc_create_data(&quot;current_status&quot;, 0, ControllerProcEntry, &amp;dac960_current_status_proc_fops, Controller);<br />
+	proc_create_data(&quot;user_command&quot;, S_IWUSR | S_IRUSR, ControllerProcEntry, &amp;dac960_user_command_proc_fops, Controller);<br />
+	Controller-&gt;ControllerProcEntry = ControllerProcEntry;<br />
 }<br />
 <br />
 <br />
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c<br />
index 00f9fc9..304000c 100644<br />
--- a/drivers/block/mtip32xx/mtip32xx.c<br />
+++ b/drivers/block/mtip32xx/mtip32xx.c<br />
@@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,<br />
 		up(&amp;dd-&gt;port-&gt;cmd_slot);<br />
 		return NULL;<br />
 	}<br />
-	if (unlikely(*tag &lt; 0))<br />
+	if (unlikely(*tag &lt; 0)) {<br />
+		up(&amp;dd-&gt;port-&gt;cmd_slot);<br />
 		return NULL;<br />
+	}<br />
 <br />
 	return dd-&gt;port-&gt;commands[*tag].sg;<br />
 }<br />
diff --git a/fs/bio.c b/fs/bio.c<br />
index e453924..84da885 100644<br />
--- a/fs/bio.c<br />
+++ b/fs/bio.c<br />
@@ -505,9 +505,14 @@ EXPORT_SYMBOL(bio_clone);<br />
 int bio_get_nr_vecs(struct block_device *bdev)<br />
 {<br />
 	struct request_queue *q = bdev_get_queue(bdev);<br />
-	return min_t(unsigned,<br />
+	int nr_pages;<br />
+<br />
+	nr_pages = min_t(unsigned,<br />
 		     queue_max_segments(q),<br />
 		     queue_max_sectors(q) / (PAGE_SIZE &gt;&gt; 9) + 1);<br />
+<br />
+	return min_t(unsigned, nr_pages, BIO_MAX_PAGES);<br />
+<br />
 }<br />
 EXPORT_SYMBOL(bio_get_nr_vecs);<br />
 <br />
diff --git a/fs/block_dev.c b/fs/block_dev.c<br />
index e08f6a20..ba11c30 100644<br />
--- a/fs/block_dev.c<br />
+++ b/fs/block_dev.c<br />
@@ -70,7 +70,7 @@ static void bdev_inode_switch_bdi(struct inode *inode,<br />
 	spin_unlock(&amp;dst-&gt;wb.list_lock);<br />
 }<br />
 <br />
-static sector_t max_block(struct block_device *bdev)<br />
+sector_t blkdev_max_block(struct block_device *bdev)<br />
 {<br />
 	sector_t retval = ~((sector_t)0);<br />
 	loff_t sz = i_size_read(bdev-&gt;bd_inode);<br />
@@ -163,7 +163,7 @@ static int<br />
 blkdev_get_block(struct inode *inode, sector_t iblock,<br />
 		struct buffer_head *bh, int create)<br />
 {<br />
-	if (iblock &gt;= max_block(I_BDEV(inode))) {<br />
+	if (iblock &gt;= blkdev_max_block(I_BDEV(inode))) {<br />
 		if (create)<br />
 			return -EIO;<br />
 <br />
@@ -185,7 +185,7 @@ static int<br />
 blkdev_get_blocks(struct inode *inode, sector_t iblock,<br />
 		struct buffer_head *bh, int create)<br />
 {<br />
-	sector_t end_block = max_block(I_BDEV(inode));<br />
+	sector_t end_block = blkdev_max_block(I_BDEV(inode));<br />
 	unsigned long max_blocks = bh-&gt;b_size &gt;&gt; inode-&gt;i_blkbits;<br />
 <br />
 	if ((iblock + max_blocks) &gt; end_block) {<br />
diff --git a/fs/buffer.c b/fs/buffer.c<br />
index 351e18e..ad5938c 100644<br />
--- a/fs/buffer.c<br />
+++ b/fs/buffer.c<br />
@@ -921,6 +921,7 @@ init_page_buffers(struct page *page, struct block_device *bdev,<br />
 	struct buffer_head *head = page_buffers(page);<br />
 	struct buffer_head *bh = head;<br />
 	int uptodate = PageUptodate(page);<br />
+	sector_t end_block = blkdev_max_block(I_BDEV(bdev-&gt;bd_inode));<br />
 <br />
 	do {<br />
 		if (!buffer_mapped(bh)) {<br />
@@ -929,7 +930,8 @@ init_page_buffers(struct page *page, struct block_device *bdev,<br />
 			bh-&gt;b_blocknr = block;<br />
 			if (uptodate)<br />
 				set_buffer_uptodate(bh);<br />
-			set_buffer_mapped(bh);<br />
+			if (block &lt; end_block)<br />
+				set_buffer_mapped(bh);<br />
 		}<br />
 		block++;<br />
 		bh = bh-&gt;b_this_page;<br />
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h<br />
index 2aa2466..4d4ac24 100644<br />
--- a/include/linux/blkdev.h<br />
+++ b/include/linux/blkdev.h<br />
@@ -1,9 +1,10 @@<br />
 #ifndef _LINUX_BLKDEV_H<br />
 #define _LINUX_BLKDEV_H<br />
 <br />
+#include &lt;linux/sched.h&gt;<br />
+<br />
 #ifdef CONFIG_BLOCK<br />
 <br />
-#include &lt;linux/sched.h&gt;<br />
 #include &lt;linux/major.h&gt;<br />
 #include &lt;linux/genhd.h&gt;<br />
 #include &lt;linux/list.h&gt;<br />
diff --git a/include/linux/fs.h b/include/linux/fs.h<br />
index 8de6755..25c40b9 100644<br />
--- a/include/linux/fs.h<br />
+++ b/include/linux/fs.h<br />
@@ -2051,6 +2051,7 @@ extern void unregister_blkdev(unsigned int, const char *);<br />
 extern struct block_device *bdget(dev_t);<br />
 extern struct block_device *bdgrab(struct block_device *bdev);<br />
 extern void bd_set_size(struct block_device *, loff_t size);<br />
+extern sector_t blkdev_max_block(struct block_device *bdev);<br />
 extern void bd_forget(struct inode *inode);<br />
 extern void bdput(struct block_device *);<br />
 extern void invalidate_bdev(struct block_device *);<br />
diff --git a/include/linux/genhd.h b/include/linux/genhd.h<br />
index e61d319..017a7fb 100644<br />
--- a/include/linux/genhd.h<br />
+++ b/include/linux/genhd.h<br />
@@ -222,12 +222,6 @@ static inline void part_pack_uuid(const u8 *uuid_str, u8 *to)<br />
 	}<br />
 }<br />
 <br />
-static inline char *part_unpack_uuid(const u8 *uuid, char *out)<br />
-{<br />
-	sprintf(out, &quot;%pU&quot;, uuid);<br />
-	return out;<br />
-}<br />
-<br />
 static inline int disk_max_parts(struct gendisk *disk)<br />
 {<br />
 	if (disk-&gt;flags &amp; GENHD_FL_EXT_DEVT)<br />
<br />
-- <br />
Jens Axboe<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Jens Axboe</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 20:33:04 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084836,1084836#msg-1084836</guid>
            <title>[PATCH] regulator: tps65910: fixed build error (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084836,1084836#msg-1084836</link>
            <description><![CDATA[ Some of the api calls are not changed and it leads<br />
to following build error:<br />
/regulator/tps65910-regulator.c: In function 'tps65910_enable':<br />
/regulator/tps65910-regulator.c:491:2: error: implicit declaration of<br />
function 'tps65910_set_bits'<br />
/regulator/tps65910-regulator.c: In function 'tps65910_disable':<br />
/regulator/tps65910-regulator.c:504:2: error: implicit declaration of<br />
function 'tps65910_clear_bits'<br />
/regulator/tps65910-regulator.c: In function 'tps65910_get_voltage':<br />
/regulator/tps65910-regulator.c:628:2: warning: passing argument 1 of<br />
'tps65910_reg_read' from incompatible pointer type]<br />
/linux/mfd/tps65910.h:856:19: note: expected 'struct tps65910 *' but<br />
argument is of type 'struct tps65910_reg *'<br />
/regulator/tps65910-regulator.c:628:2: error: too few arguments to<br />
function 'tps65910_reg_read'<br />
<br />
cc1: some warnings being treated as errors<br />
<br />
Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;<br />
---<br />
This patch fixes the compilation error in Samuel's tree and should go<br />
through Samuel's for-next.<br />
Some of the function is removed from the regulator for-next and so error<br />
in line number 491 and 504 will not be there but still error at 628 will<br />
be there.<br />
<br />
 drivers/regulator/tps65910-regulator.c |    6 +++---<br />
 1 files changed, 3 insertions(+), 3 deletions(-)<br />
<br />
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c<br />
index b38fb64..852b05b 100644<br />
--- a/drivers/regulator/tps65910-regulator.c<br />
+++ b/drivers/regulator/tps65910-regulator.c<br />
@@ -488,7 +488,7 @@ static int tps65910_enable(struct regulator_dev *dev)<br />
 	if (reg &lt; 0)<br />
 		return reg;<br />
 <br />
-	return tps65910_set_bits(mfd, reg, TPS65910_SUPPLY_STATE_ENABLED);<br />
+	return tps65910_reg_set_bits(mfd, reg, TPS65910_SUPPLY_STATE_ENABLED);<br />
 }<br />
 <br />
 static int tps65910_disable(struct regulator_dev *dev)<br />
@@ -501,7 +501,7 @@ static int tps65910_disable(struct regulator_dev *dev)<br />
 	if (reg &lt; 0)<br />
 		return reg;<br />
 <br />
-	return tps65910_clear_bits(mfd, reg, TPS65910_SUPPLY_STATE_ENABLED);<br />
+	return tps65910_reg_clear_bits(mfd, reg, TPS65910_SUPPLY_STATE_ENABLED);<br />
 }<br />
 <br />
 static int tps65910_enable_time(struct regulator_dev *dev)<br />
@@ -625,7 +625,7 @@ static int tps65910_get_voltage(struct regulator_dev *dev)<br />
 	if (reg &lt; 0)<br />
 		return reg;<br />
 <br />
-	value = tps65910_reg_read(pmic, reg);<br />
+	value = tps65910_reg_read_locked(pmic, reg);<br />
 	if (value &lt; 0)<br />
 		return value;<br />
 <br />
-- <br />
1.7.1.1<br />
<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Laxman Dewangan</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 20:03:06 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084831,1084831#msg-1084831</guid>
            <title>[Xen-devel] Import Qemu commit &quot;audio: split IN_T into two separate constants&quot; (1 reply)</title>
            <link>http://choon.net/forum/read.php?22,1084831,1084831#msg-1084831</link>
            <description><![CDATA[ Hello,<br />
<br />
I would like to request the import of the Qemu commit:<br />
<br />
commit a28853871d6ef5ec4afe810a43fdde859dfdaa7e<br />
Author: Roger Pau Monne &lt;roger.pau@citrix.com&gt;<br />
Date:   Fri May 18 12:08:14 2012 +0100<br />
audio: split IN_T into two separate constants<br />
<br />
Into our qemu-upstream tree, since it's needed for NetBSD build.<br />
<br />
Thanks.<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>Roger Pau Monne</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 20:13:09 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084828,1084828#msg-1084828</guid>
            <title>[Xen-devel] [xen-unstable test] 12920: regressions - FAIL (no replies)</title>
            <link>http://choon.net/forum/read.php?22,1084828,1084828#msg-1084828</link>
            <description><![CDATA[ flight 12920 xen-unstable real [real]<br />
[<a href="http://www.chiark.greenend.org.uk/~xensrcts/logs/12920/"  rel="nofollow">www.chiark.greenend.org.uk</a>]<br />
<br />
Regressions :-(<br />
<br />
Tests which did not succeed and are blocking,<br />
including tests which could not be run:<br />
 test-amd64-amd64-xl-pcipt-intel  8 debian-fixup           fail REGR. vs. 12884<br />
 test-amd64-amd64-xl-qemuu-win7-amd64 12 guest-localmigrate/x10 fail REGR. vs. 12876<br />
<br />
Tests which are failing intermittently (not blocking):<br />
 test-amd64-i386-xl            9 guest-start                 fail pass in 12915<br />
<br />
Regressions which are regarded as allowable (not blocking):<br />
 test-amd64-i386-qemuu-rhel6hvm-amd  9 guest-start.2   fail in 12915 like 12884<br />
<br />
Tests which did not succeed, but are not blocking:<br />
 test-amd64-i386-rhel6hvm-intel 11 leak-check/check             fail never pass<br />
 test-amd64-i386-qemuu-rhel6hvm-intel  9 guest-start.2          fail never pass<br />
 test-amd64-i386-qemuu-rhel6hvm-amd 11 leak-check/check         fail never pass<br />
 test-i386-i386-xl-qemuu-winxpsp3 13 guest-stop                 fail never pass<br />
 test-amd64-i386-xend-winxpsp3 16 leak-check/check             fail  never pass<br />
 test-amd64-amd64-win         16 leak-check/check             fail   never pass<br />
 test-amd64-i386-win-vcpus1   16 leak-check/check             fail   never pass<br />
 test-amd64-i386-rhel6hvm-amd 11 leak-check/check             fail   never pass<br />
 test-amd64-i386-xl-win7-amd64 13 guest-stop                   fail  never pass<br />
 test-i386-i386-xl-winxpsp3   13 guest-stop                   fail   never pass<br />
 test-amd64-amd64-xl-win7-amd64 13 guest-stop                   fail never pass<br />
 test-amd64-amd64-xl-winxpsp3 13 guest-stop                   fail   never pass<br />
 test-amd64-amd64-xl-qemuu-winxpsp3 13 guest-stop               fail never pass<br />
 test-amd64-i386-xl-winxpsp3-vcpus1 13 guest-stop               fail never pass<br />
 test-amd64-i386-xl-win-vcpus1 13 guest-stop                   fail  never pass<br />
 test-amd64-i386-win          16 leak-check/check             fail   never pass<br />
 test-i386-i386-win           16 leak-check/check             fail   never pass<br />
 test-i386-i386-xl-win        13 guest-stop                   fail   never pass<br />
 test-amd64-amd64-xl-win      13 guest-stop                   fail   never pass<br />
<br />
version targeted for testing:<br />
 xen                  28831853d1a8<br />
baseline version:<br />
 xen                  f8279258e3c9<br />
<br />
jobs:<br />
 build-amd64                                                  pass    <br />
 build-i386                                                   pass    <br />
 build-amd64-oldkern                                          pass    <br />
 build-i386-oldkern                                           pass    <br />
 build-amd64-pvops                                            pass    <br />
 build-i386-pvops                                             pass    <br />
 test-amd64-amd64-xl                                          pass    <br />
 test-amd64-i386-xl                                           fail    <br />
 test-i386-i386-xl                                            pass    <br />
 test-amd64-i386-rhel6hvm-amd                                 fail    <br />
 test-amd64-i386-qemuu-rhel6hvm-amd                           fail    <br />
 test-amd64-amd64-xl-qemuu-win7-amd64                         fail    <br />
 test-amd64-amd64-xl-win7-amd64                               fail    <br />
 test-amd64-i386-xl-win7-amd64                                fail    <br />
 test-amd64-i386-xl-credit2                                   pass    <br />
 test-amd64-amd64-xl-pcipt-intel                              fail    <br />
 test-amd64-i386-rhel6hvm-intel                               fail    <br />
 test-amd64-i386-qemuu-rhel6hvm-intel                         fail    <br />
 test-amd64-i386-xl-multivcpu                                 pass    <br />
 test-amd64-amd64-pair                                        pass    <br />
 test-amd64-i386-pair                                         pass    <br />
 test-i386-i386-pair                                          pass    <br />
 test-amd64-amd64-xl-sedf-pin                                 pass    <br />
 test-amd64-amd64-pv                                          pass    <br />
 test-amd64-i386-pv                                           pass    <br />
 test-i386-i386-pv                                            pass    <br />
 test-amd64-amd64-xl-sedf                                     pass    <br />
 test-amd64-i386-win-vcpus1                                   fail    <br />
 test-amd64-i386-xl-win-vcpus1                                fail    <br />
 test-amd64-i386-xl-winxpsp3-vcpus1                           fail    <br />
 test-amd64-amd64-win                                         fail    <br />
 test-amd64-i386-win                                          fail    <br />
 test-i386-i386-win                                           fail    <br />
 test-amd64-amd64-xl-win                                      fail    <br />
 test-i386-i386-xl-win                                        fail    <br />
 test-amd64-amd64-xl-qemuu-winxpsp3                           fail    <br />
 test-i386-i386-xl-qemuu-winxpsp3                             fail    <br />
 test-amd64-i386-xend-winxpsp3                                fail    <br />
 test-amd64-amd64-xl-winxpsp3                                 fail    <br />
 test-i386-i386-xl-winxpsp3                                   fail    <br />
<br />
<br />
------------------------------------------------------------<br />
sg-report-flight on woking.cam.xci-test.com<br />
logs: /home/xc_osstest/logs<br />
images: /home/xc_osstest/images<br />
<br />
Logs, config files, etc. are available at<br />
    [<a href="http://www.chiark.greenend.org.uk/~xensrcts/logs"  rel="nofollow">www.chiark.greenend.org.uk</a>]<br />
<br />
Test harness code can be found at<br />
    [<a href="http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary"  rel="nofollow">xenbits.xensource.com</a>]<br />
<br />
<br />
Not pushing.<br />
<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>xen.org</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 19:54:08 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084811,1084811#msg-1084811</guid>
            <title>[Xen-devel] libxl: build failure due to 'libxl_domain_type' (4 replies)</title>
            <link>http://choon.net/forum/read.php?22,1084811,1084811#msg-1084811</link>
            <description><![CDATA[ Hi,<br />
<br />
I get this libxl build error:<br />
<br />
libxl.c: In function 'libxl_primary_console_exec':<br />
libxl.c:1233:9: error: case value '4294967295' not in enumerated type<br />
'libxl_domain_type'<br />
<br />
I see that libxl__domain_type() can returns -1 which is not part<br />
of 'enum libxl_domain_type'.<br />
<br />
Christoph<br />
<br />
<br />
-- <br />
---to satisfy European Law for business letters:<br />
Advanced Micro Devices GmbH<br />
Einsteinring 24, 85689 Dornach b. Muenchen<br />
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd<br />
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen<br />
Registergericht Muenchen, HRB Nr. 43632<br />
<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>Christoph Egger</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 22:53:13 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084792,1084792#msg-1084792</guid>
            <title>Where's the Android kernel sources git repository gone (1 reply)</title>
            <link>http://choon.net/forum/read.php?21,1084792,1084792#msg-1084792</link>
            <description><![CDATA[ &quot;wget [<a href="http://android.git.kernel.org/repo&quot"  rel="nofollow">android.git.kernel.org</a>];<br />
<br />
Gives me a 404 Not Found,<br />
<br />
Any help with this very much appreciated.<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Josh Branning</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 21:03:14 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?23,1084791,1084791#msg-1084791</guid>
            <title>[Full-disclosure] SEC Consult SA-20120518 :: Memory overwrite vulnerability in libwpd (OpenOffice.org) - CVE-2012-2149 (no replies)</title>
            <link>http://choon.net/forum/read.php?23,1084791,1084791#msg-1084791</link>
            <description><![CDATA[ SEC Consult Vulnerability Lab Security Advisory &lt; 20120518-0 &gt;<br />
=======================================================================<br />
              title: libwpd WPXContentListener::_closeTableRow() memory<br />
                     overwrite<br />
 	    product: OpenOffice.org<br />
 vulnerable version: 3.3.0/3.4 Beta 1 and probably earlier versions<br />
      fixed version: 3.4<br />
                CVE: CVE-2012-2149<br />
             impact: high<br />
           homepage: [<a href="http://www.openoffice.org/"  rel="nofollow">www.openoffice.org</a>]<br />
              found: 2011-09-01<br />
                 by: K. Gudinavicius <br />
                     SEC Consult Vulnerability Lab <br />
                     [<a href="https://www.sec-consult.com"  rel="nofollow">www.sec-consult.com</a>]<br />
=======================================================================<br />
<br />
Vendor description:<br />
-------------------<br />
&quot;OpenOffice.org 3 is the leading open-source office software suite for<br />
word processing, spreadsheets, presentations, graphics, databases and<br />
more. It is available in many languages and works on all common<br />
computers.&quot;<br />
<br />
Source: [<a href="http://why.openoffice.org/"  rel="nofollow">why.openoffice.org</a>]<br />
<br />
<br />
<br />
Vulnerability overview/description:<br />
-----------------------------------<br />
OpenOffice.org includes the customized libwpd version 0.8.8 library for<br />
parsing WordPerfect documents. The used version of the libwpd library<br />
suffers from a memory overwrite vulnerability when reading a specially<br />
crafted WPD file. Successful exploitation of this vulnerability could<br />
result in an arbitrary code execution within the OpenOffice.org<br />
software suite.<br />
<br />
<br />
<br />
Proof of concept:<br />
-----------------<br />
The vulnerability resides in the WPXContentListener::_closeTableRow()<br />
function which is declared in the WPXContentListener.cpp file. The<br />
function doesn't check if the variable's m_ps-&gt;m_currentTableCol value<br />
is less than zero before entering the while loop which leads to an<br />
integer overflow and decrementation of the memory location pointed by<br />
m_ps-&gt;m_numRowsToSkip[m_ps-&gt;m_currentTableCol] address if the<br />
conditions are met. Related code excerpt:<br />
<br />
void WPXContentListener::_closeTableRow()<br />
{<br />
	if (m_ps-&gt;m_isTableRowOpened)<br />
	{<br />
		while ((long)m_ps-&gt;m_currentTableCol &lt;<br />
(long)m_ps-&gt;m_numRowsToSkip.size()) {<br />
			if<br />
(!m_ps-&gt;m_numRowsToSkip[m_ps-&gt;m_currentTableCol]) {<br />
				RGBSColor tmpCellBorderColor(0x00,<br />
0x00, 0x00, 0x64); _openTableCell(1, 1, 0xFF, 0, 0,<br />
&amp;tmpCellBorderColor, TOP); _closeTableCell();<br />
			}<br />
			else<br />
				m_ps-&gt;m_numRowsToSkip[m_ps-&gt;m_currentTableCol++]--;<br />
		}<br />
<br />
		if (m_ps-&gt;m_isTableCellOpened)<br />
			_closeTableCell();<br />
		m_listenerImpl-&gt;closeTableRow();<br />
	}<br />
	m_ps-&gt;m_isTableRowOpened = false;<br />
}<br />
<br />
The variable's m_ps-&gt;m_currentTableCol value can be influenced by<br />
calling WPXContentListener::_closeTable() function which sets its value<br />
to -1 after the call to WPXContentListener::_openTableRow() function.<br />
Calling the _openTableRow() function again results in<br />
WPXContentListener::_closeTableRow() being called and the memory<br />
location pointed by the m_ps-&gt;m_numRowsToSkip[-1] address is being<br />
decremented.<br />
<br />
It was possible to build a specially crafted WPD file containing byte<br />
sequences that represent the above mentioned functions to decrement<br />
valid C++ object's pointer as many times as it needed to achieve<br />
arbitrary code execution when virtual functions of that object were<br />
called. The exploit code will not be published.<br />
<br />
Debugger output:<br />
<br />
Breakpoint 0 hit<br />
eax=070fcbd4 ebx=00000000 ecx=ffffffff edx=0ebd25f0 esi=0185c928<br />
edi=0185c920 eip=0eb9167e esp=0185c860 ebp=0185c86c iopl=0         nv<br />
up ei pl zr ac pe nc cs=001b  ss=0023  ds=0023  es=0023  fs=003b<br />
gs=0000             efl=00000256 wpftmi!component_getFactory+0x20355:<br />
0eb9167e ff08            dec     dword ptr [eax]<br />
ds:0023:070fcbd4=0ebdb288 0:000&gt; g<br />
Breakpoint 0 hit<br />
eax=070fcbd4 ebx=00000000 ecx=ffffffff edx=0ebd25f0 esi=0185c928<br />
edi=0185c920 eip=0eb9167e esp=0185c860 ebp=0185c86c iopl=0         nv<br />
up ei pl zr ac pe nc cs=001b  ss=0023  ds=0023  es=0023  fs=003b<br />
gs=0000             efl=00000256 wpftmi!component_getFactory+0x20355:<br />
0eb9167e ff08            dec     dword ptr [eax]<br />
ds:0023:070fcbd4=0ebdb287 0:000&gt; g<br />
Breakpoint 0 hit<br />
eax=070fcbd4 ebx=00000000 ecx=ffffffff edx=0ebd25f0 esi=0185c928<br />
edi=0185c920 eip=0eb9167e esp=0185c860 ebp=0185c86c iopl=0         nv<br />
up ei pl zr ac pe nc cs=001b  ss=0023  ds=0023  es=0023  fs=003b<br />
gs=0000             efl=00000256 wpftmi!component_getFactory+0x20355:<br />
0eb9167e ff08            dec     dword ptr [eax]<br />
ds:0023:070fcbd4=0ebdb286 0:000&gt; g<br />
Breakpoint 0 hit<br />
eax=070fcbd4 ebx=00000000 ecx=ffffffff edx=0ebd25f0 esi=0185c928<br />
edi=0185c920 eip=0eb9167e esp=0185c850 ebp=0185c85c iopl=0         nv<br />
up ei pl zr ac pe nc cs=001b  ss=0023  ds=0023  es=0023  fs=003b<br />
gs=0000             efl=00000256 wpftmi!component_getFactory+0x20355:<br />
0eb9167e ff08            dec     dword ptr [eax]<br />
ds:0023:070fcbd4=0ebdb285 &lt;...&gt;<br />
<br />
<br />
<br />
Vulnerable / tested versions:<br />
-----------------------------<br />
The vulnerability has been verified to exist in versions 3.3.0 and <br />
3.4 Beta 1 of OpenOffice.org, which were the most recent versions at <br />
the time of discovery.<br />
<br />
<br />
<br />
Vendor contact timeline:<br />
------------------------<br />
2011-09-19: Contacting vendor through <a href="mailto:&#115;&#101;&#99;&#117;&#114;&#105;&#116;&#121;&#116;&#101;&#97;&#109;&#64;&#111;&#112;&#101;&#110;&#111;&#102;&#102;&#105;&#99;&#101;&#46;&#111;&#114;&#103;">&#115;&#101;&#99;&#117;&#114;&#105;&#116;&#121;&#116;&#101;&#97;&#109;&#64;&#111;&#112;&#101;&#110;&#111;&#102;&#102;&#105;&#99;&#101;&#46;&#111;&#114;&#103;</a><br />
2011-09-21: Vendor response, clarification request<br />
2011-09-21: Sent answer<br />
2011-10-05: Vendor response, clarification request<br />
2011-10-05: Sent answer<br />
2011-10-13: Contacted vendor asking for status<br />
2011-11-23: Contacted vendor asking for status<br />
2011-11-23: Vendor response, project moved to Apache<br />
2011-11-24: Contacting vendor through <a href="mailto:&#111;&#111;&#111;&#45;&#115;&#101;&#99;&#117;&#114;&#105;&#116;&#121;&#64;&#105;&#110;&#99;&#117;&#98;&#97;&#116;&#111;&#114;&#46;&#97;&#112;&#97;&#99;&#104;&#101;&#46;&#111;&#114;&#103;">&#111;&#111;&#111;&#45;&#115;&#101;&#99;&#117;&#114;&#105;&#116;&#121;&#64;&#105;&#110;&#99;&#117;&#98;&#97;&#116;&#111;&#114;&#46;&#97;&#112;&#97;&#99;&#104;&#101;&#46;&#111;&#114;&#103;</a><br />
2011-12-05: Contacted vendor asking for status<br />
2011-12-05: Vendor response<br />
2012-01-09: Contacted vendor asking for status<br />
2012-01-09: Vendor response, Apache OpenOffice 3.4 release is planned<br />
            in Q1 2012.<br />
2012-03-22: Contacted vendor asking for status<br />
2012-04-19: Contacted vendor asking for status<br />
2012-04-23: Vendor response<br />
2012-04-24: Contacted vendor asking for CVE#<br />
2012-04-30: Vendor response including CVE#<br />
2012-05-07: Contacted vendor asking for status<br />
2012-05-07: Vendor response, date of the release announcement for<br />
            OpenOffice 3.4<br />
2012-05-07: Vendor releases Apache OpenOffice 3.4<br />
2012-05-16: Vendor releases security bulletin which addresses this<br />
            vulnerability <br />
2012-05-18: SEC Consult releases detailed advisory<br />
<br />
<br />
<br />
Solution:<br />
---------<br />
OpenOffice.org 3.3.0 and 3.4 beta users should upgrade to Apache<br />
OpenOffice 3.4. <br />
<br />
<br />
Workaround:<br />
-----------<br />
Untrusted WPD documents should be avoided.<br />
<br />
<br />
<br />
Advisory URL:<br />
-------------<br />
[<a href="https://www.sec-consult.com/en/advisories.html"  rel="nofollow">www.sec-consult.com</a>]<br />
<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
SEC Consult Unternehmensberatung GmbH<br />
<br />
Office Vienna<br />
Mooslackengasse 17<br />
A-1190 Vienna<br />
Austria<br />
<br />
Tel.: +43 / 1 / 890 30 43 - 0<br />
Fax.: +43 / 1 / 890 30 43 - 25<br />
Mail: research at sec-consult dot com<br />
[<a href="https://www.sec-consult.com"  rel="nofollow">www.sec-consult.com</a>]<br />
<br />
EOF K. Gudinavicius / @2012<br />
<br />
_______________________________________________<br />
Full-Disclosure - We believe in it.<br />
Charter: [<a href="http://lists.grok.org.uk/full-disclosure-charter.html"  rel="nofollow">lists.grok.org.uk</a>]<br />
Hosted and sponsored by Secunia - [<a href="http://secunia.com/"  rel="nofollow">secunia.com</a>]]]></description>
            <dc:creator>SEC Consult Vulnerability Lab</dc:creator>
            <category>Full-Disclosure</category>
            <pubDate>Fri, 18 May 2012 19:09:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084787,1084787#msg-1084787</guid>
            <title>Race in vt_event_wait() during suspend/resume (1 reply)</title>
            <link>http://choon.net/forum/read.php?21,1084787,1084787#msg-1084787</link>
            <description><![CDATA[ pm_restore_console() is called from the suspend/resume path,<br />
this calls vt_move_to_console(), which calls vt_event_wait().<br />
<br />
There's a race in this path which causes the process<br />
which requests the suspend to sleep indefinitely waiting<br />
for an event which already happened:<br />
<br />
P1					P2<br />
 vt_move_to_console()<br />
   set_console()<br />
     schedule_console_callback()<br />
   vt_waitactive()<br />
     check n == fg_console +1<br />
					console_callback()<br />
					  switch_screen()<br />
					  vt_event_post() // no waiters<br />
<br />
     vt_event_wait() // forever<br />
<br />
I think the following should fix it.  Comments?<br />
<br />
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c<br />
index ede2ef1..1d02e32 100644<br />
--- a/drivers/tty/vt/vt_ioctl.c<br />
+++ b/drivers/tty/vt/vt_ioctl.c<br />
@@ -110,16 +110,7 @@ void vt_event_post(unsigned int event, unsigned<br />
int old, unsigned int new)<br />
 		wake_up_interruptible(&amp;vt_event_waitqueue);<br />
 }<br />
<br />
-/**<br />
- *	vt_event_wait		-	wait for an event<br />
- *	@vw: our event<br />
- *<br />
- *	Waits for an event to occur which completes our vt_event_wait<br />
- *	structure. On return the structure has wv-&gt;done set to 1 for success<br />
- *	or 0 if some event such as a signal ended the wait.<br />
- */<br />
-<br />
-static void vt_event_wait(struct vt_event_wait *vw)<br />
+static void __vt_event_queue(struct vt_event_wait *vw)<br />
 {<br />
 	unsigned long flags;<br />
 	/* Prepare the event */<br />
@@ -129,8 +120,18 @@ static void vt_event_wait(struct vt_event_wait *vw)<br />
 	spin_lock_irqsave(&amp;vt_event_lock, flags);<br />
 	list_add(&amp;vw-&gt;list, &amp;vt_events);<br />
 	spin_unlock_irqrestore(&amp;vt_event_lock, flags);<br />
+}<br />
+<br />
+static void __vt_event_wait(struct vt_event_wait *vw)<br />
+{<br />
 	/* Wait for it to pass */<br />
 	wait_event_interruptible(vt_event_waitqueue, vw-&gt;done);<br />
+}<br />
+<br />
+static void __vt_event_dequeue(struct vt_event_wait *vw)<br />
+{<br />
+	unsigned long flags;<br />
+<br />
 	/* Dequeue it */<br />
 	spin_lock_irqsave(&amp;vt_event_lock, flags);<br />
 	list_del(&amp;vw-&gt;list);<br />
@@ -138,6 +139,22 @@ static void vt_event_wait(struct vt_event_wait *vw)<br />
 }<br />
<br />
 /**<br />
+ *	vt_event_wait		-	wait for an event<br />
+ *	@vw: our event<br />
+ *<br />
+ *	Waits for an event to occur which completes our vt_event_wait<br />
+ *	structure. On return the structure has wv-&gt;done set to 1 for success<br />
+ *	or 0 if some event such as a signal ended the wait.<br />
+ */<br />
+<br />
+static void vt_event_wait(struct vt_event_wait *vw)<br />
+{<br />
+	__vt_event_queue(vw);<br />
+	__vt_event_wait(vw);<br />
+	__vt_event_dequeue(vw);<br />
+}<br />
+<br />
+/**<br />
  *	vt_event_wait_ioctl	-	event ioctl handler<br />
  *	@arg: argument to ioctl<br />
  *<br />
@@ -177,10 +194,14 @@ int vt_waitactive(int n)<br />
 {<br />
 	struct vt_event_wait vw;<br />
 	do {<br />
-		if (n == fg_console + 1)<br />
-			break;<br />
 		vw.event.event = VT_EVENT_SWITCH;<br />
-		vt_event_wait(&amp;vw);<br />
+		__vt_event_queue(&amp;vw);<br />
+		if (n == fg_console + 1) {<br />
+			__vt_event_dequeue(&amp;vw);<br />
+			break;<br />
+		}<br />
+		__vt_event_wait(&amp;vw);<br />
+		__vt_event_dequeue(&amp;vw);<br />
 		if (vw.done == 0)<br />
 			return -EINTR;<br />
 	} while (vw.event.newev != n);<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>Rabin Vincent</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 19:39:12 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?22,1084779,1084779#msg-1084779</guid>
            <title>[Xen-devel] [PATCH] audio: split IN_T into two separate constants (no replies)</title>
            <link>http://choon.net/forum/read.php?22,1084779,1084779#msg-1084779</link>
            <description><![CDATA[ Split IN_T into BSIZE and ITYPE, to avoid expansion if the OS has<br />
defined macros for the intX_t and uintX_t types. The IN_T constant is<br />
then defined in mixeng_template.h so it can be used by the<br />
functions/macros on this header file.<br />
<br />
This change has been tested successfully under Debian Linux and NetBSD<br />
6.0BETA.<br />
<br />
Cc: Vassili Karpov (malc) &lt;av1474@comtv.ru&gt;<br />
Signed-off-by: Roger Pau Monne &lt;roger.pau@citrix.com&gt;<br />
---<br />
 audio/mixeng.c          |   36 ++++++++++++++++++++++++------------<br />
 audio/mixeng_template.h |    4 +++-<br />
 2 files changed, 27 insertions(+), 13 deletions(-)<br />
<br />
diff --git a/audio/mixeng.c b/audio/mixeng.c<br />
index 5446be6..02a9d9f 100644<br />
--- a/audio/mixeng.c<br />
+++ b/audio/mixeng.c<br />
@@ -33,7 +33,8 @@<br />
 #define ENDIAN_CONVERT(v) (v)<br />
 <br />
 /* Signed 8 bit */<br />
-#define IN_T int8_t<br />
+#define BSIZE 8<br />
+#define ITYPE int<br />
 #define IN_MIN SCHAR_MIN<br />
 #define IN_MAX SCHAR_MAX<br />
 #define SIGNED<br />
@@ -42,25 +43,29 @@<br />
 #undef SIGNED<br />
 #undef IN_MAX<br />
 #undef IN_MIN<br />
-#undef IN_T<br />
+#undef BSIZE<br />
+#undef ITYPE<br />
 #undef SHIFT<br />
 <br />
 /* Unsigned 8 bit */<br />
-#define IN_T uint8_t<br />
+#define BSIZE 8<br />
+#define ITYPE uint<br />
 #define IN_MIN 0<br />
 #define IN_MAX UCHAR_MAX<br />
 #define SHIFT 8<br />
 #include &quot;mixeng_template.h&quot;<br />
 #undef IN_MAX<br />
 #undef IN_MIN<br />
-#undef IN_T<br />
+#undef BSIZE<br />
+#undef ITYPE<br />
 #undef SHIFT<br />
 <br />
 #undef ENDIAN_CONVERT<br />
 #undef ENDIAN_CONVERSION<br />
 <br />
 /* Signed 16 bit */<br />
-#define IN_T int16_t<br />
+#define BSIZE 16<br />
+#define ITYPE int<br />
 #define IN_MIN SHRT_MIN<br />
 #define IN_MAX SHRT_MAX<br />
 #define SIGNED<br />
@@ -78,11 +83,13 @@<br />
 #undef SIGNED<br />
 #undef IN_MAX<br />
 #undef IN_MIN<br />
-#undef IN_T<br />
+#undef BSIZE<br />
+#undef ITYPE<br />
 #undef SHIFT<br />
 <br />
 /* Unsigned 16 bit */<br />
-#define IN_T uint16_t<br />
+#define BSIZE 16<br />
+#define ITYPE uint<br />
 #define IN_MIN 0<br />
 #define IN_MAX USHRT_MAX<br />
 #define SHIFT 16<br />
@@ -98,11 +105,13 @@<br />
 #undef ENDIAN_CONVERSION<br />
 #undef IN_MAX<br />
 #undef IN_MIN<br />
-#undef IN_T<br />
+#undef BSIZE<br />
+#undef ITYPE<br />
 #undef SHIFT<br />
 <br />
 /* Signed 32 bit */<br />
-#define IN_T int32_t<br />
+#define BSIZE 32<br />
+#define ITYPE int<br />
 #define IN_MIN INT32_MIN<br />
 #define IN_MAX INT32_MAX<br />
 #define SIGNED<br />
@@ -120,11 +129,13 @@<br />
 #undef SIGNED<br />
 #undef IN_MAX<br />
 #undef IN_MIN<br />
-#undef IN_T<br />
+#undef BSIZE<br />
+#undef ITYPE<br />
 #undef SHIFT<br />
 <br />
 /* Unsigned 32 bit */<br />
-#define IN_T uint32_t<br />
+#define BSIZE 32<br />
+#define ITYPE uint<br />
 #define IN_MIN 0<br />
 #define IN_MAX UINT32_MAX<br />
 #define SHIFT 32<br />
@@ -140,7 +151,8 @@<br />
 #undef ENDIAN_CONVERSION<br />
 #undef IN_MAX<br />
 #undef IN_MIN<br />
-#undef IN_T<br />
+#undef BSIZE<br />
+#undef ITYPE<br />
 #undef SHIFT<br />
 <br />
 t_sample *mixeng_conv[2][2][2][3] = {<br />
diff --git a/audio/mixeng_template.h b/audio/mixeng_template.h<br />
index e644c23..30849a6 100644<br />
--- a/audio/mixeng_template.h<br />
+++ b/audio/mixeng_template.h<br />
@@ -31,7 +31,8 @@<br />
 #define HALF (IN_MAX &gt;&gt; 1)<br />
 #endif<br />
 <br />
-#define ET glue (ENDIAN_CONVERSION, glue (_, IN_T))<br />
+#define ET glue (ENDIAN_CONVERSION, glue (glue (glue (_, ITYPE), BSIZE), _t))<br />
+#define IN_T glue (glue (ITYPE, BSIZE), _t)<br />
 <br />
 #ifdef FLOAT_MIXENG<br />
 static mixeng_real inline glue (conv_, ET) (IN_T v)<br />
@@ -150,3 +151,4 @@ static void glue (glue (clip_, ET), _from_mono)<br />
 <br />
 #undef ET<br />
 #undef HALF<br />
+#undef IN_T<br />
-- <br />
1.7.7.5 (Apple Git-26)<br />
<br />
<br />
_______________________________________________<br />
Xen-devel mailing list<br />
<a href="mailto:&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;">&#88;&#101;&#110;&#45;&#100;&#101;&#118;&#101;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#120;&#101;&#110;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://lists.xen.org/xen-devel"  rel="nofollow">lists.xen.org</a>]]]></description>
            <dc:creator>Roger Pau Monne</dc:creator>
            <category>Xen-devel</category>
            <pubDate>Fri, 18 May 2012 18:59:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084773,1084773#msg-1084773</guid>
            <title>[tip:x86/mm] x86/tlb: Clean up and unify TLB_FLUSH_ALL definition (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084773,1084773#msg-1084773</link>
            <description><![CDATA[ Commit-ID:  3e7f3db001de6133db1c385c92eec944409a8b4f<br />
Gitweb:     [<a href="http://git.kernel.org/tip/3e7f3db001de6133db1c385c92eec944409a8b4f"  rel="nofollow">git.kernel.org</a>]<br />
Author:     Alex Shi &lt;alex.shi@intel.com&gt;<br />
AuthorDate: Thu, 10 May 2012 18:01:59 +0800<br />
Committer:  Ingo Molnar &lt;mingo@kernel.org&gt;<br />
CommitDate: Fri, 18 May 2012 10:13:37 +0200<br />
<br />
x86/tlb: Clean up and unify TLB_FLUSH_ALL definition<br />
<br />
Since sizeof(long) is 4 in x86_32 mode, and it's 8 in x86_64<br />
mode, sizeof(long long) is also 8 byte in x86_64 mode.<br />
use long mode can fit TLB_FLUSH_ALL defination here both in 32<br />
or 64 bits mode.<br />
<br />
Signed-off-by: Alex Shi &lt;alex.shi@intel.com&gt;<br />
Link: [<a href="http://lkml.kernel.org/n/tip-evv5bekiipi2pmyzdsy8lkkw@git.kernel.org"  rel="nofollow">lkml.kernel.org</a>]<br />
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;<br />
---<br />
 arch/x86/include/asm/tlbflush.h |    6 +-----<br />
 1 files changed, 1 insertions(+), 5 deletions(-)<br />
<br />
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h<br />
index 169be89..63af909 100644<br />
--- a/arch/x86/include/asm/tlbflush.h<br />
+++ b/arch/x86/include/asm/tlbflush.h<br />
@@ -62,11 +62,7 @@ static inline void __flush_tlb_one(unsigned long addr)<br />
 		__flush_tlb();<br />
 }<br />
 <br />
-#ifdef CONFIG_X86_32<br />
-# define TLB_FLUSH_ALL	0xffffffff<br />
-#else<br />
-# define TLB_FLUSH_ALL	-1ULL<br />
-#endif<br />
+#define TLB_FLUSH_ALL	-1UL<br />
 <br />
 /*<br />
  * TLB flushing:<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>tip-bot for Alex Shi</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 18:51:13 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084770,1084770#msg-1084770</guid>
            <title>[tip:sched/core] sched:  Set TAINT_UNSAFE_SMP after sleep-in-atomic bug (2 replies)</title>
            <link>http://choon.net/forum/read.php?21,1084770,1084770#msg-1084770</link>
            <description><![CDATA[ Commit-ID:  1d76f4381601a259323ad4faadce18db08ddebcd<br />
Gitweb:     [<a href="http://git.kernel.org/tip/1d76f4381601a259323ad4faadce18db08ddebcd"  rel="nofollow">git.kernel.org</a>]<br />
Author:     Konstantin Khlebnikov &lt;khlebnikov@openvz.org&gt;<br />
AuthorDate: Thu, 17 May 2012 16:22:10 -0700<br />
Committer:  Ingo Molnar &lt;mingo@kernel.org&gt;<br />
CommitDate: Fri, 18 May 2012 09:51:08 +0200<br />
<br />
sched: Set TAINT_UNSAFE_SMP after sleep-in-atomic bug<br />
<br />
Usually sleep-in-atomic bugs are followed by dozens other<br />
warnings.  This patch should help to figure out original source<br />
of problem.  This taint flag also turns off lockdep, because it<br />
can go mad after that.<br />
<br />
Original TAINT_UNSAFE_SMP is used only on various ancient buggy<br />
K7 Athlons.  TAINT_UNSAFE_SMP is shown as 'S' in &quot;Tainted&quot; line,<br />
so let it be acronym for SMP, Scheduler and Sleep-in-atomic.<br />
<br />
Probably we should rename it into TAINT_SHIT, but TAINT_CRAP is<br />
already there. =)<br />
<br />
Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@openvz.org&gt;<br />
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;<br />
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;<br />
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;<br />
Link: [<a href="http://lkml.kernel.org/r/20120517232210.A292EA02FF@akpm.mtv.corp.google.com"  rel="nofollow">lkml.kernel.org</a>]<br />
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;<br />
---<br />
 Documentation/oops-tracing.txt  |    2 +-<br />
 Documentation/sysctl/kernel.txt |    1 +<br />
 kernel/sched/core.c             |    1 +<br />
 3 files changed, 3 insertions(+), 1 deletions(-)<br />
<br />
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt<br />
index 13032c0..ad9b9d8 100644<br />
--- a/Documentation/oops-tracing.txt<br />
+++ b/Documentation/oops-tracing.txt<br />
@@ -237,7 +237,7 @@ characters, each representing a particular tainted value.<br />
   3: 'S' if the oops occurred on an SMP kernel running on hardware that<br />
      hasn't been certified as safe to run multiprocessor.<br />
      Currently this occurs only on various Athlons that are not<br />
-     SMP capable.<br />
+     SMP capable. Also cpu scheduler sets this after sleep-in-atomic bug.<br />
 <br />
   4: 'R' if a module was force unloaded by &quot;rmmod -f&quot;, ' ' if all<br />
      modules were unloaded normally.<br />
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt<br />
index 6d78841..b573910 100644<br />
--- a/Documentation/sysctl/kernel.txt<br />
+++ b/Documentation/sysctl/kernel.txt<br />
@@ -590,6 +590,7 @@ can be ORed together:<br />
    2 - A module was force loaded by insmod -f.<br />
        Set by modutils &gt;= 2.4.9 and module-init-tools.<br />
    4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.<br />
+       Also cpu scheduler sets this after sleep-in-atomic bug.<br />
    8 - A module was forcibly unloaded from the system by rmmod -f.<br />
   16 - A hardware machine check error occurred on the system.<br />
   32 - A bad page was discovered on the system.<br />
diff --git a/kernel/sched/core.c b/kernel/sched/core.c<br />
index 24ca677..b86eb50 100644<br />
--- a/kernel/sched/core.c<br />
+++ b/kernel/sched/core.c<br />
@@ -3138,6 +3138,7 @@ static noinline void __schedule_bug(struct task_struct *prev)<br />
 	if (irqs_disabled())<br />
 		print_irqtrace_events(prev);<br />
 	dump_stack();<br />
+	add_taint(TAINT_UNSAFE_SMP);<br />
 }<br />
 <br />
 /*<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>tip-bot for Konstantin Khlebnikov</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 20:12:09 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084769,1084769#msg-1084769</guid>
            <title>[tip:sched/numa] sched/numa:  Provide sysctl knob to disable numa scheduling and turn it off by default (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084769,1084769#msg-1084769</link>
            <description><![CDATA[ Commit-ID:  bcdf5162b92dfc0999b0e0ecf25d778733cc4c4d<br />
Gitweb:     [<a href="http://git.kernel.org/tip/bcdf5162b92dfc0999b0e0ecf25d778733cc4c4d"  rel="nofollow">git.kernel.org</a>]<br />
Author:     Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;<br />
AuthorDate: Thu, 17 May 2012 15:07:31 +0200<br />
Committer:  Ingo Molnar &lt;mingo@kernel.org&gt;<br />
CommitDate: Fri, 18 May 2012 09:48:59 +0200<br />
<br />
sched/numa: Provide sysctl knob to disable numa scheduling and turn it off by default<br />
<br />
Provide a knob to make all this numa scheduling go-away.<br />
<br />
Also provide a Kconfig entry to set the default for this new knob.<br />
<br />
Requested-by: Ingo Molnar &lt;mingo@kernel.org&gt;<br />
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;<br />
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;<br />
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;<br />
Link: [<a href="http://lkml.kernel.org/n/tip-lz8zudea6tqgbxduk9mcs7x3@git.kernel.org"  rel="nofollow">lkml.kernel.org</a>]<br />
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;<br />
---<br />
 include/linux/sched.h |   13 +++++++<br />
 init/Kconfig          |   18 ++++++++++<br />
 kernel/sched/numa.c   |   89 +++++++++++++++++++++++++++++++++++++++---------<br />
 kernel/sysctl.c       |   11 ++++++<br />
 4 files changed, 114 insertions(+), 17 deletions(-)<br />
<br />
diff --git a/include/linux/sched.h b/include/linux/sched.h<br />
index 024a5f9..4879103 100644<br />
--- a/include/linux/sched.h<br />
+++ b/include/linux/sched.h<br />
@@ -90,6 +90,7 @@ struct sched_param {<br />
 #include &lt;linux/latencytop.h&gt;<br />
 #include &lt;linux/cred.h&gt;<br />
 #include &lt;linux/llist.h&gt;<br />
+#include &lt;linux/jump_label.h&gt;<br />
 <br />
 #include &lt;asm/processor.h&gt;<br />
 <br />
@@ -1584,9 +1585,14 @@ struct task_struct {<br />
 /* Future-safe accessor for struct task_struct's cpus_allowed. */<br />
 #define tsk_cpus_allowed(tsk) (&amp;(tsk)-&gt;cpus_allowed)<br />
 <br />
+extern struct static_key sched_numa_disabled;<br />
+<br />
 static inline int tsk_home_node(struct task_struct *p)<br />
 {<br />
 #ifdef CONFIG_NUMA<br />
+	if (static_key_false(&amp;sched_numa_disabled))<br />
+		return -1;<br />
+<br />
 	return p-&gt;node;<br />
 #else<br />
 	return -1;<br />
@@ -2058,6 +2064,13 @@ static inline void sched_autogroup_exit(struct signal_struct *sig) { }<br />
 extern unsigned int sysctl_sched_cfs_bandwidth_slice;<br />
 #endif<br />
 <br />
+#ifdef CONFIG_NUMA<br />
+extern int sysctl_sched_numa;<br />
+int sched_numa_handler(struct ctl_table *table, int write,<br />
+		void __user *buffer, size_t *lenp,<br />
+		loff_t *ppos);<br />
+#endif<br />
+<br />
 #ifdef CONFIG_RT_MUTEXES<br />
 extern int rt_mutex_getprio(struct task_struct *p);<br />
 extern void rt_mutex_setprio(struct task_struct *p, int prio);<br />
diff --git a/init/Kconfig b/init/Kconfig<br />
index e4e84f2..2f6bfc1 100644<br />
--- a/init/Kconfig<br />
+++ b/init/Kconfig<br />
@@ -865,6 +865,24 @@ config SCHED_AUTOGROUP<br />
 	  desktop applications.  Task group autogeneration is currently based<br />
 	  upon task session.<br />
 <br />
+config SCHED_NUMA_DEFAULT<br />
+	bool &quot;Enable NUMA scheduling by default&quot;<br />
+	depends on NUMA<br />
+	default n<br />
+	help<br />
+	  This option selects the default enablement of a scheduler feature<br />
+	  that gives each process a home-node and allocates all its memory<br />
+	  from there and tries to schedule all the process tasks on that node<br />
+	  (or as near to it) while trying to maintain fairness.<br />
+<br />
+	  Without this feature memory is allocated on whatever node a task<br />
+	  happens to run on and the scheduler is free to migrate tasks around<br />
+	  at will -- which can result in significant cross-node memory<br />
+	  traffic.<br />
+<br />
+	  Regardless of this setting it can always be changed at runtime<br />
+	  by changing /proc/sys/kernel/sched_numa.<br />
+<br />
 config MM_OWNER<br />
 	def_bool NUMA<br />
 <br />
diff --git a/kernel/sched/numa.c b/kernel/sched/numa.c<br />
index 7b74a15..b98338b 100644<br />
--- a/kernel/sched/numa.c<br />
+++ b/kernel/sched/numa.c<br />
@@ -18,6 +18,9 @@<br />
 <br />
 #include &quot;sched.h&quot;<br />
 <br />
+struct static_key sched_numa_disabled = STATIC_KEY_INIT_FALSE;<br />
+static DEFINE_MUTEX(sched_numa_mutex);<br />
+int sysctl_sched_numa = IS_ENABLED(CONFIG_SCHED_NUMA_DEFAULT);<br />
 <br />
 static const int numa_balance_interval = 2 * HZ; /* 2 seconds */<br />
 <br />
@@ -137,7 +140,7 @@ bool account_numa_enqueue(struct task_struct *p)<br />
 <br />
 void account_numa_dequeue(struct task_struct *p)<br />
 {<br />
-	int home_node = tsk_home_node(p);<br />
+	int home_node = p-&gt;node; /* ignore sched_numa_disabled */<br />
 	struct numa_cpu_load *nl;<br />
 	struct rq *rq;<br />
 <br />
@@ -444,7 +447,7 @@ void select_task_node(struct task_struct *p, struct mm_struct *mm, int sd_flags)<br />
 {<br />
 	int node;<br />
 <br />
-	if (!sched_feat(NUMA_SELECT)) {<br />
+	if (!sched_feat(NUMA_SELECT) || !sysctl_sched_numa) {<br />
 		p-&gt;node = -1;<br />
 		return;<br />
 	}<br />
@@ -766,13 +769,74 @@ static int numad_thread(void *data)<br />
 	return 0;<br />
 }<br />
 <br />
+static int numad_create(struct node_queue *nq)<br />
+{<br />
+	struct task_struct *numad;<br />
+<br />
+	if (!sysctl_sched_numa)<br />
+		return 0;<br />
+<br />
+	numad = kthread_create_on_node(numad_thread,<br />
+			nq, nq-&gt;node, &quot;numad/%d&quot;, nq-&gt;node);<br />
+	if (IS_ERR(numad))<br />
+		return PTR_ERR(numad);<br />
+<br />
+	nq-&gt;numad = numad;<br />
+	nq-&gt;next_schedule = jiffies + HZ;<br />
+<br />
+	return 0;<br />
+}<br />
+<br />
+static void numad_destroy(struct node_queue *nq)<br />
+{<br />
+	kthread_stop(nq-&gt;numad);<br />
+	nq-&gt;numad = NULL;<br />
+}<br />
+<br />
+int sched_numa_handler(struct ctl_table *table, int write,<br />
+		void __user *buffer, size_t *lenp,<br />
+		loff_t *ppos)<br />
+{<br />
+	int old, new, ret, node;<br />
+<br />
+	mutex_lock(&amp;sched_numa_mutex);<br />
+	get_online_cpus();<br />
+<br />
+	old = sysctl_sched_numa;<br />
+	ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);<br />
+	new = sysctl_sched_numa;<br />
+<br />
+	if (old == new)<br />
+		goto unlock;<br />
+<br />
+	if (new)<br />
+		static_key_slow_dec(&amp;sched_numa_disabled);<br />
+	else<br />
+		static_key_slow_inc(&amp;sched_numa_disabled);<br />
+<br />
+	for_each_online_node(node) {<br />
+		struct node_queue *nq = nq_of(node);<br />
+<br />
+		if (new &amp;&amp; !nq-&gt;numad) {<br />
+			if (!numad_create(nq))<br />
+				wake_up_process(nq-&gt;numad);<br />
+		} else if (!new &amp;&amp; nq-&gt;numad)<br />
+			numad_destroy(nq);<br />
+	}<br />
+<br />
+unlock:<br />
+	put_online_cpus();<br />
+	mutex_unlock(&amp;sched_numa_mutex);<br />
+<br />
+	return ret;<br />
+}<br />
+<br />
 static int __cpuinit<br />
 numa_hotplug(struct notifier_block *nb, unsigned long action, void *hcpu)<br />
 {<br />
 	int cpu = (long)hcpu;<br />
 	int node = cpu_to_node(cpu);<br />
 	struct node_queue *nq = nq_of(node);<br />
-	struct task_struct *numad;<br />
 	int err = 0;<br />
 <br />
 	switch (action &amp; ~CPU_TASKS_FROZEN) {<br />
@@ -780,19 +844,12 @@ numa_hotplug(struct notifier_block *nb, unsigned long action, void *hcpu)<br />
 		if (nq-&gt;numad)<br />
 			break;<br />
 <br />
-		numad = kthread_create_on_node(numad_thread,<br />
-				nq, node, &quot;numad/%d&quot;, node);<br />
-		if (IS_ERR(numad)) {<br />
-			err = PTR_ERR(numad);<br />
-			break;<br />
-		}<br />
-<br />
-		nq-&gt;numad = numad;<br />
-		nq-&gt;next_schedule = jiffies + HZ; // XXX sync-up?<br />
+		err = numad_create(nq);<br />
 		break;<br />
 <br />
 	case CPU_ONLINE:<br />
-		wake_up_process(nq-&gt;numad);<br />
+		if (nq-&gt;numad)<br />
+			wake_up_process(nq-&gt;numad);<br />
 		break;<br />
 <br />
 	case CPU_DEAD:<br />
@@ -801,10 +858,8 @@ numa_hotplug(struct notifier_block *nb, unsigned long action, void *hcpu)<br />
 			break;<br />
 <br />
 		if (cpumask_any_and(cpu_online_mask,<br />
-				    cpumask_of_node(node)) &gt;= nr_cpu_ids) {<br />
-			kthread_stop(nq-&gt;numad);<br />
-			nq-&gt;numad = NULL;<br />
-		}<br />
+				    cpumask_of_node(node)) &gt;= nr_cpu_ids)<br />
+			numad_destroy(nq);<br />
 		break;<br />
 	}<br />
 <br />
diff --git a/kernel/sysctl.c b/kernel/sysctl.c<br />
index 4ab1187..40ecba2 100644<br />
--- a/kernel/sysctl.c<br />
+++ b/kernel/sysctl.c<br />
@@ -373,6 +373,17 @@ static struct ctl_table kern_table[] = {<br />
 		.extra1		= &amp;one,<br />
 	},<br />
 #endif<br />
+#ifdef CONFIG_NUMA<br />
+	{<br />
+		.procname	= &quot;sched_numa&quot;,<br />
+		.data		= &amp;sysctl_sched_numa,<br />
+		.maxlen		= sizeof(int),<br />
+		.mode		= 0644,<br />
+		.proc_handler	= sched_numa_handler,<br />
+		.extra1		= &amp;zero,<br />
+		.extra2		= &amp;one,<br />
+	},<br />
+#endif<br />
 #ifdef CONFIG_PROVE_LOCKING<br />
 	{<br />
 		.procname	= &quot;prove_locking&quot;,<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>tip-bot for Peter Zijlstra</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 18:49:02 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084763,1084763#msg-1084763</guid>
            <title>[tip:x86/apic] x86/xen/apic: Add missing #include &lt;xen/xen.h&gt; (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084763,1084763#msg-1084763</link>
            <description><![CDATA[ Commit-ID:  87e4baacaeba098e217b14e9d2f6af428fe3f657<br />
Gitweb:     [<a href="http://git.kernel.org/tip/87e4baacaeba098e217b14e9d2f6af428fe3f657"  rel="nofollow">git.kernel.org</a>]<br />
Author:     Ingo Molnar &lt;mingo@kernel.org&gt;<br />
AuthorDate: Fri, 18 May 2012 09:34:45 +0200<br />
Committer:  Ingo Molnar &lt;mingo@kernel.org&gt;<br />
CommitDate: Fri, 18 May 2012 09:34:45 +0200<br />
<br />
x86/xen/apic: Add missing #include &lt;xen/xen.h&gt;<br />
<br />
This file depends on &lt;xen/xen.h&gt;, but the dependency was hidden due<br />
to: &lt;asm/acpi.h&gt; -&gt; &lt;asm/trampoline.h&gt; -&gt; &lt;asm/io.h&gt; -&gt; &lt;xen/xen.h&gt;<br />
<br />
With the removal of &lt;asm/trampoline.h&gt;, this exposed the missing<br />
<br />
Cc: Len Brown &lt;lenb@kernel.org&gt;<br />
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;<br />
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;<br />
Cc: Jarkko Sakkinen &lt;jarkko.sakkinen@intel.com&gt;<br />
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;<br />
Link: [<a href="http://lkml.kernel.org/n/tip-7ccybvue6mw6wje3uxzzcglj@git.kernel.org"  rel="nofollow">lkml.kernel.org</a>]<br />
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;<br />
---<br />
 arch/x86/xen/apic.c |    5 ++++-<br />
 1 files changed, 4 insertions(+), 1 deletions(-)<br />
<br />
diff --git a/arch/x86/xen/apic.c b/arch/x86/xen/apic.c<br />
index 1913bf2..ec57bd3 100644<br />
--- a/arch/x86/xen/apic.c<br />
+++ b/arch/x86/xen/apic.c<br />
@@ -1,9 +1,12 @@<br />
 #include &lt;linux/init.h&gt;<br />
+<br />
 #include &lt;asm/x86_init.h&gt;<br />
 #include &lt;asm/apic.h&gt;<br />
-#include &lt;xen/interface/physdev.h&gt;<br />
 #include &lt;asm/xen/hypercall.h&gt;<br />
 <br />
+#include &lt;xen/xen.h&gt;<br />
+#include &lt;xen/interface/physdev.h&gt;<br />
+<br />
 unsigned int xen_io_apic_read(unsigned apic, unsigned reg)<br />
 {<br />
 	struct physdev_apic apic_op;<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>tip-bot for Ingo Molnar</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 18:46:11 +0800</pubDate>
        </item>
        <item>
            <guid>http://choon.net/forum/read.php?21,1084758,1084758#msg-1084758</guid>
            <title>[tip:sched/numa] mm: Optimize numa_group RSS accounting (no replies)</title>
            <link>http://choon.net/forum/read.php?21,1084758,1084758#msg-1084758</link>
            <description><![CDATA[ Commit-ID:  c9d90e77f23a1778812e470d48a0be802a8cd4d9<br />
Gitweb:     [<a href="http://git.kernel.org/tip/c9d90e77f23a1778812e470d48a0be802a8cd4d9"  rel="nofollow">git.kernel.org</a>]<br />
Author:     Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;<br />
AuthorDate: Wed, 16 May 2012 15:11:26 +0200<br />
Committer:  Ingo Molnar &lt;mingo@kernel.org&gt;<br />
CommitDate: Fri, 18 May 2012 08:16:27 +0200<br />
<br />
mm: Optimize numa_group RSS accounting<br />
<br />
Move all relevant data structures into mm_types.h so that mm.h can<br />
access the numa_group::rss fields avoiding the out of line call.<br />
<br />
Also wrap the whole thing in a jump-label so as to avoid the<br />
conditionals when there aren't any numa groups around (the normal<br />
case).<br />
<br />
This should remove most of the cost added to RSS accounting by the<br />
numa group stuff when that's unused.<br />
<br />
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;<br />
Cc: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;<br />
Cc: Paul Turner &lt;pjt@google.com&gt;<br />
Cc: Dan Smith &lt;danms@us.ibm.com&gt;<br />
Cc: Bharata B Rao &lt;bharata.rao@gmail.com&gt;<br />
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;<br />
Cc: Christoph Lameter &lt;cl@linux.com&gt;<br />
Cc: Rik van Riel &lt;riel@redhat.com&gt;<br />
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;<br />
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;<br />
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;<br />
Link: [<a href="http://lkml.kernel.org/n/tip-kgvq9yp3jhtnkwgqm4xrhvov@git.kernel.org"  rel="nofollow">lkml.kernel.org</a>]<br />
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;<br />
---<br />
 include/linux/mempolicy.h |   45 +--------------------<br />
 include/linux/mm.h        |   16 ++++++-<br />
 include/linux/mm_types.h  |  100 ++++++++++++++++++++++++++++++++++++---------<br />
 kernel/sched/numa.c       |   35 +++-------------<br />
 4 files changed, 101 insertions(+), 95 deletions(-)<br />
<br />
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h<br />
index 6e1029f..f5db168 100644<br />
--- a/include/linux/mempolicy.h<br />
+++ b/include/linux/mempolicy.h<br />
@@ -81,52 +81,9 @@ enum mpol_rebind_step {<br />
 #include &lt;linux/migrate.h&gt;<br />
 #include &lt;linux/list.h&gt;<br />
 #include &lt;linux/sched.h&gt;<br />
-<br />
-struct mm_struct;<br />
+#include &lt;linux/mm_types.h&gt;<br />
 <br />
 #ifdef CONFIG_NUMA<br />
-<br />
-/*<br />
- * Describe a memory policy.<br />
- *<br />
- * A mempolicy can be either associated with a process or with a VMA.<br />
- * For VMA related allocations the VMA policy is preferred, otherwise<br />
- * the process policy is used. Interrupts ignore the memory policy<br />
- * of the current process.<br />
- *<br />
- * Locking policy for interlave:<br />
- * In process context there is no locking because only the process accesses<br />
- * its own state. All vma manipulation is somewhat protected by a down_read on<br />
- * mmap_sem.<br />
- *<br />
- * Freeing policy:<br />
- * Mempolicy objects are reference counted.  A mempolicy will be freed when<br />
- * mpol_put() decrements the reference count to zero.<br />
- *<br />
- * Duplicating policy objects:<br />
- * mpol_dup() allocates a new mempolicy and copies the specified mempolicy<br />
- * to the new storage.  The reference count of the new object is initialized<br />
- * to 1, representing the caller of mpol_dup().<br />
- */<br />
-struct mempolicy {<br />
-	atomic_t refcnt;<br />
-	unsigned short mode; 	/* See MPOL_* above */<br />
-	unsigned short flags;	/* See set_mempolicy() MPOL_F_* above */<br />
-	struct numa_group *numa_group;<br />
-	struct list_head ng_entry;<br />
-	struct vm_area_struct *vma;<br />
-	struct rcu_head rcu;<br />
-	union {<br />
-		short 		 preferred_node; /* preferred */<br />
-		nodemask_t	 nodes;		/* interleave/bind */<br />
-		/* undefined for default */<br />
-	} v;<br />
-	union {<br />
-		nodemask_t cpuset_mems_allowed;	/* relative to these nodes */<br />
-		nodemask_t user_nodemask;	/* nodemask passed by user */<br />
-	} w;<br />
-};<br />
-<br />
 /*<br />
  * Support for managing mempolicy data objects (clone, copy, destroy)<br />
  * The default fast path of a NULL MPOL_DEFAULT policy is always inlined.<br />
diff --git a/include/linux/mm.h b/include/linux/mm.h<br />
index eda8271..96ef84c 100644<br />
--- a/include/linux/mm.h<br />
+++ b/include/linux/mm.h<br />
@@ -1077,13 +1077,23 @@ static inline unsigned long get_mm_counter(struct mm_struct *mm, int member)<br />
 }<br />
 <br />
 #ifdef CONFIG_NUMA<br />
-extern void __numa_add_rss_counter(struct vm_area_struct *, int, long);<br />
+#include &lt;linux/jump_label.h&gt;<br />
+<br />
+extern struct static_key sched_numa_groups;<br />
 <br />
 static inline<br />
 void numa_add_rss_counter(struct vm_area_struct *vma, int member, long value)<br />
 {<br />
-	if (vma-&gt;vm_policy) /* XXX sodding include dependecies */<br />
-		__numa_add_rss_counter(vma, member, value);<br />
+	if (static_key_false(&amp;sched_numa_groups) &amp;&amp;<br />
+	    vma-&gt;vm_policy &amp;&amp; vma-&gt;vm_policy-&gt;numa_group) {<br />
+		/*<br />
+		 * Since the caller passes the vma argument, the caller is<br />
+		 * responsible for making sure the vma is stable, hence the<br />
+		 * -&gt;vm_policy-&gt;numa_group dereference is safe. (caller usually<br />
+		 * has vma-&gt;vm_mm-&gt;mmap_sem for reading).<br />
+		 */<br />
+		atomic_long_add(value, &amp;vma-&gt;vm_policy-&gt;numa_group-&gt;rss.count[member]);<br />
+	}<br />
 }<br />
 #else /* !CONFIG_NUMA */<br />
 static inline void numa_add_rss_counter(struct vm_area_struct *vma, int member, long value) { }<br />
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h<br />
index 9b98193..ee48fe3 100644<br />
--- a/include/linux/mm_types.h<br />
+++ b/include/linux/mm_types.h<br />
@@ -191,6 +191,87 @@ struct vm_region {<br />
 						* this region */<br />
 };<br />
 <br />
+enum {<br />
+	MM_FILEPAGES,<br />
+	MM_ANONPAGES,<br />
+	MM_SWAPENTS,<br />
+	NR_MM_COUNTERS<br />
+};<br />
+<br />
+struct mm_rss_stat {<br />
+	atomic_long_t count[NR_MM_COUNTERS];<br />
+};<br />
+<br />
+struct numa_entity {<br />
+#ifdef CONFIG_NUMA<br />
+	int			node;		/* home node */<br />
+	struct list_head	numa_entry;	/* balance list */<br />
+	const struct numa_ops	*nops;<br />
+#endif<br />
+};<br />
+<br />
+#ifdef CONFIG_NUMA<br />
+#include &lt;linux/nodemask.h&gt;<br />
+<br />
+struct numa_group {<br />
+	spinlock_t		lock;<br />
+	int			id;<br />
+<br />
+	struct mm_rss_stat	rss;<br />
+<br />
+	struct list_head	tasks;<br />
+	struct list_head	vmas;<br />
+<br />
+	const struct cred	*cred;<br />
+	atomic_t		ref;<br />
+<br />
+	struct numa_entity	numa_entity;<br />
+<br />
+	struct rcu_head		rcu;<br />
+};<br />
+<br />
+/*<br />
+ * Describe a memory policy.<br />
+ *<br />
+ * A mempolicy can be either associated with a process or with a VMA.<br />
+ * For VMA related allocations the VMA policy is preferred, otherwise<br />
+ * the process policy is used. Interrupts ignore the memory policy<br />
+ * of the current process.<br />
+ *<br />
+ * Locking policy for interlave:<br />
+ * In process context there is no locking because only the process accesses<br />
+ * its own state. All vma manipulation is somewhat protected by a down_read on<br />
+ * mmap_sem.<br />
+ *<br />
+ * Freeing policy:<br />
+ * Mempolicy objects are reference counted.  A mempolicy will be freed when<br />
+ * mpol_put() decrements the reference count to zero.<br />
+ *<br />
+ * Duplicating policy objects:<br />
+ * mpol_dup() allocates a new mempolicy and copies the specified mempolicy<br />
+ * to the new storage.  The reference count of the new object is initialized<br />
+ * to 1, representing the caller of mpol_dup().<br />
+ */<br />
+struct mempolicy {<br />
+	atomic_t refcnt;<br />
+	unsigned short mode; 	/* See MPOL_* above */<br />
+	unsigned short flags;	/* See set_mempolicy() MPOL_F_* above */<br />
+	struct numa_group *numa_group;<br />
+	struct list_head ng_entry;<br />
+	struct vm_area_struct *vma;<br />
+	struct rcu_head rcu;<br />
+	union {<br />
+		short 		 preferred_node; /* preferred */<br />
+		nodemask_t	 nodes;		/* interleave/bind */<br />
+		/* undefined for default */<br />
+	} v;<br />
+	union {<br />
+		nodemask_t cpuset_mems_allowed;	/* relative to these nodes */<br />
+		nodemask_t user_nodemask;	/* nodemask passed by user */<br />
+	} w;<br />
+};<br />
+#endif /* CONFIG_NUMA */<br />
+<br />
 /*<br />
  * This struct defines a memory VMM memory area. There is one of these<br />
  * per VM-area/task.  A VM area is any part of the process virtual memory<br />
@@ -265,13 +346,6 @@ struct core_state {<br />
 	struct completion startup;<br />
 };<br />
 <br />
-enum {<br />
-	MM_FILEPAGES,<br />
-	MM_ANONPAGES,<br />
-	MM_SWAPENTS,<br />
-	NR_MM_COUNTERS<br />
-};<br />
-<br />
 #if USE_SPLIT_PTLOCKS &amp;&amp; defined(CONFIG_MMU)<br />
 #define SPLIT_RSS_COUNTING<br />
 /* per-thread cached information, */<br />
@@ -281,18 +355,6 @@ struct task_rss_stat {<br />
 };<br />
 #endif /* USE_SPLIT_PTLOCKS */<br />
 <br />
-struct mm_rss_stat {<br />
-	atomic_long_t count[NR_MM_COUNTERS];<br />
-};<br />
-<br />
-struct numa_entity {<br />
-#ifdef CONFIG_NUMA<br />
-	int			node;		/* home node */<br />
-	struct list_head	numa_entry;	/* balance list */<br />
-	const struct numa_ops	*nops;<br />
-#endif<br />
-};<br />
-<br />
 struct mm_struct {<br />
 	struct vm_area_struct * mmap;		/* list of VMAs */<br />
 	struct rb_root mm_rb;<br />
diff --git a/kernel/sched/numa.c b/kernel/sched/numa.c<br />
index af123aa..7b74a15 100644<br />
--- a/kernel/sched/numa.c<br />
+++ b/kernel/sched/numa.c<br />
@@ -853,23 +853,6 @@ early_initcall(numa_init);<br />
 #include &lt;linux/srcu.h&gt;<br />
 #include &lt;linux/syscalls.h&gt;<br />
 <br />
-struct numa_group {<br />
-	spinlock_t		lock;<br />
-	int			id;<br />
-<br />
-	struct mm_rss_stat	rss;<br />
-<br />
-	struct list_head	tasks;<br />
-	struct list_head	vmas;<br />
-<br />
-	const struct cred	*cred;<br />
-	atomic_t		ref;<br />
-<br />
-	struct numa_entity	numa_entity;<br />
-<br />
-	struct rcu_head		rcu;<br />
-};<br />
-<br />
 static struct srcu_struct ng_srcu;<br />
 <br />
 static DEFINE_MUTEX(numa_group_idr_lock);<br />
@@ -898,6 +881,8 @@ static void __ng_put_rcu(struct rcu_head *rcu)<br />
 	kfree(ng);<br />
 }<br />
 <br />
+struct static_key sched_numa_groups = STATIC_KEY_INIT_FALSE;<br />
+<br />
 static void __ng_put(struct numa_group *ng)<br />
 {<br />
 	mutex_lock(&amp;numa_group_idr_lock);<br />
@@ -909,6 +894,8 @@ static void __ng_put(struct numa_group *ng)<br />
 <br />
 	dequeue_ne(&amp;ng-&gt;numa_entity);<br />
 <br />
+	static_key_slow_dec(&amp;sched_numa_groups);<br />
+<br />
 	call_rcu(&amp;ng-&gt;rcu, __ng_put_rcu);<br />
 }<br />
 <br />
@@ -1123,18 +1110,6 @@ void numa_vma_link(struct vm_area_struct *new, struct vm_area_struct *old)<br />
 	spin_unlock(&amp;ng-&gt;lock);<br />
 }<br />
 <br />
-void __numa_add_rss_counter(struct vm_area_struct *vma, int member, long value)<br />
-{<br />
-	/*<br />
-	 * Since the caller passes the vma argument, the caller is responsible<br />
-	 * for making sure the vma is stable, hence the -&gt;vm_policy-&gt;numa_group<br />
-	 * dereference is safe. (caller usually has vma-&gt;vm_mm-&gt;mmap_sem for<br />
-	 * reading).<br />
-	 */<br />
-	if (vma-&gt;vm_policy-&gt;numa_group)<br />
-		atomic_long_add(value, &amp;vma-&gt;vm_policy-&gt;numa_group-&gt;rss.count[member]);<br />
-}<br />
-<br />
 static void __mpol_put_rcu(struct rcu_head *rcu)<br />
 {<br />
 	struct mempolicy *mpol = container_of(rcu, struct mempolicy, rcu);<br />
@@ -1197,6 +1172,8 @@ static struct numa_group *ng_create(struct task_struct *p)<br />
 	if (err)<br />
 		goto fail_alloc;<br />
 <br />
+	static_key_slow_inc(&amp;sched_numa_groups);<br />
+<br />
 	spin_lock_init(&amp;ng-&gt;lock);<br />
 	atomic_set(&amp;ng-&gt;ref, 1);<br />
 	ng-&gt;cred = get_task_cred(p);<br />
--<br />
To unsubscribe from this list: send the line &quot;unsubscribe linux-kernel&quot; in<br />
the body of a message to <a href="mailto:&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;">&#109;&#97;&#106;&#111;&#114;&#100;&#111;&#109;&#111;&#64;&#118;&#103;&#101;&#114;&#46;&#107;&#101;&#114;&#110;&#101;&#108;&#46;&#111;&#114;&#103;</a><br />
More majordomo info at  [<a href="http://vger.kernel.org/majordomo-info.html"  rel="nofollow">vger.kernel.org</a>]<br />
Please read the FAQ at  [<a href="http://www.tux.org/lkml/"  rel="nofollow">www.tux.org</a>]]]></description>
            <dc:creator>tip-bot for Peter Zijlstra</dc:creator>
            <category>Linux Kernel</category>
            <pubDate>Fri, 18 May 2012 18:44:03 +0800</pubDate>
        </item>
    </channel>
</rss>

