<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/char/ipmi, branch v3.10.78</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ipmi: Reset the KCS timeout when starting error recovery</title>
<updated>2014-06-07T20:25:30+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2014-04-14T14:46:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7cbb2301ae96a8c8874653904cb0de9860322f89'/>
<id>7cbb2301ae96a8c8874653904cb0de9860322f89</id>
<content type='text'>
commit eb6d78ec213e6938559b801421d64714dafcf4b2 upstream.

The OBF timer in KCS was not reset in one situation when error recovery
was started, resulting in an immediate timeout.

Reported-by: Bodo Stroesser &lt;bstroesser@ts.fujitsu.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit eb6d78ec213e6938559b801421d64714dafcf4b2 upstream.

The OBF timer in KCS was not reset in one situation when error recovery
was started, resulting in an immediate timeout.

Reported-by: Bodo Stroesser &lt;bstroesser@ts.fujitsu.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Fix a race restarting the timer</title>
<updated>2014-06-07T20:25:30+00:00</updated>
<author>
<name>Bodo Stroesser</name>
<email>bstroesser@ts.fujitsu.com</email>
</author>
<published>2014-04-14T14:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=935c69acf0724b0c70df6a40d2d61e5cf350ee00'/>
<id>935c69acf0724b0c70df6a40d2d61e5cf350ee00</id>
<content type='text'>
commit 48e8ac2979920ffa39117e2d725afa3a749bfe8d upstream.

With recent changes it is possible for the timer handler to detect an
idle interface and not start the timer, but the thread to start an
operation at the same time.  The thread will not start the timer in that
instance, resulting in the timer not running.

Instead, move all timer operations under the lock and start the timer in
the thread if it detect non-idle and the timer is not already running.
Moving under locks allows the last timeout to be set in both the thread
and the timer.  'Timer is not running' means that the timer is not
pending and smi_timeout() is not running.  So we need a flag to detect
this correctly.

Also fix a few other timeout bugs: setting the last timeout when the
interrupt has to be disabled and the timer started, and setting the last
timeout in check_start_timer_thread possibly racing with the timer

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Bodo Stroesser &lt;bstroesser@ts.fujitsu.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 48e8ac2979920ffa39117e2d725afa3a749bfe8d upstream.

With recent changes it is possible for the timer handler to detect an
idle interface and not start the timer, but the thread to start an
operation at the same time.  The thread will not start the timer in that
instance, resulting in the timer not running.

Instead, move all timer operations under the lock and start the timer in
the thread if it detect non-idle and the timer is not already running.
Moving under locks allows the last timeout to be set in both the thread
and the timer.  'Timer is not running' means that the timer is not
pending and smi_timeout() is not running.  So we need a flag to detect
this correctly.

Also fix a few other timeout bugs: setting the last timeout when the
interrupt has to be disabled and the timer started, and setting the last
timeout in check_start_timer_thread possibly racing with the timer

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Bodo Stroesser &lt;bstroesser@ts.fujitsu.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Char: ipmi_bt_sm, fix infinite loop</title>
<updated>2014-04-27T00:15:34+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2014-04-14T14:46:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=96a405de04abddf003b59467d277595e3ba02449'/>
<id>96a405de04abddf003b59467d277595e3ba02449</id>
<content type='text'>
commit a94cdd1f4d30f12904ab528152731fb13a812a16 upstream.

In read_all_bytes, we do

  unsigned char i;
  ...
  bt-&gt;read_data[0] = BMC2HOST;
  bt-&gt;read_count = bt-&gt;read_data[0];
  ...
  for (i = 1; i &lt;= bt-&gt;read_count; i++)
    bt-&gt;read_data[i] = BMC2HOST;

If bt-&gt;read_data[0] == bt-&gt;read_count == 255, we loop infinitely in the
'for' loop.  Make 'i' an 'int' instead of 'char' to get rid of the
overflow and finish the loop after 255 iterations every time.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Reported-and-debugged-by: Rui Hui Dian &lt;rhdian@novell.com&gt;
Cc: Tomas Cech &lt;tcech@suse.cz&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: &lt;openipmi-developer@lists.sourceforge.net&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a94cdd1f4d30f12904ab528152731fb13a812a16 upstream.

In read_all_bytes, we do

  unsigned char i;
  ...
  bt-&gt;read_data[0] = BMC2HOST;
  bt-&gt;read_count = bt-&gt;read_data[0];
  ...
  for (i = 1; i &lt;= bt-&gt;read_count; i++)
    bt-&gt;read_data[i] = BMC2HOST;

If bt-&gt;read_data[0] == bt-&gt;read_count == 255, we loop infinitely in the
'for' loop.  Make 'i' an 'int' instead of 'char' to get rid of the
overflow and finish the loop after 255 iterations every time.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Reported-and-debugged-by: Rui Hui Dian &lt;rhdian@novell.com&gt;
Cc: Tomas Cech &lt;tcech@suse.cz&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: &lt;openipmi-developer@lists.sourceforge.net&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ipmi_devintf: compat_ioctl method fails to take ipmi_mutex</title>
<updated>2013-05-16T20:49:25+00:00</updated>
<author>
<name>Benjamin LaHaise</name>
<email>bcrl@kvack.org</email>
</author>
<published>2013-05-16T19:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6368087e851e697679af059b4247aca33a69cef3'/>
<id>6368087e851e697679af059b4247aca33a69cef3</id>
<content type='text'>
When a 32 bit version of ipmitool is used on a 64 bit kernel, the
ipmi_devintf code fails to correctly acquire ipmi_mutex.  This results in
incomplete data being retrieved in some cases, or other possible failures.
Add a wrapper around compat_ipmi_ioctl() to take ipmi_mutex to fix this.

Signed-off-by: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a 32 bit version of ipmitool is used on a 64 bit kernel, the
ipmi_devintf code fails to correctly acquire ipmi_mutex.  This results in
incomplete data being retrieved in some cases, or other possible failures.
Add a wrapper around compat_ipmi_ioctl() to take ipmi_mutex to fix this.

Signed-off-by: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Improve error messages on failed irq enable</title>
<updated>2013-05-16T20:49:25+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2013-05-16T19:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0849bfece0199a345b0c5143d10cbc1dc228a60f'/>
<id>0849bfece0199a345b0c5143d10cbc1dc228a60f</id>
<content type='text'>
When the interrupt enable message returns an error, the messages are
not entirely accurate nor helpful.  So improve them.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the interrupt enable message returns an error, the messages are
not entirely accurate nor helpful.  So improve them.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/char/ipmi: memcpy, need additional 2 bytes to avoid memory overflow</title>
<updated>2013-05-16T20:49:25+00:00</updated>
<author>
<name>Chen Gang</name>
<email>gang.chen@asianux.com</email>
</author>
<published>2013-05-16T19:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a5f2b3d6a738e7d4180012fe7b541172f8c8dcea'/>
<id>a5f2b3d6a738e7d4180012fe7b541172f8c8dcea</id>
<content type='text'>
When calling memcpy, read_data and write_data need additional 2 bytes.

  write_data:
    for checking:  "if (size &gt; IPMI_MAX_MSG_LENGTH)"
    for operating: "memcpy(bt-&gt;write_data + 3, data + 1, size - 1)"

  read_data:
    for checking:  "if (msg_len &lt; 3 || msg_len &gt; IPMI_MAX_MSG_LENGTH)"
    for operating: "memcpy(data + 2, bt-&gt;read_data + 4, msg_len - 2)"

Signed-off-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When calling memcpy, read_data and write_data need additional 2 bytes.

  write_data:
    for checking:  "if (size &gt; IPMI_MAX_MSG_LENGTH)"
    for operating: "memcpy(bt-&gt;write_data + 3, data + 1, size - 1)"

  read_data:
    for checking:  "if (msg_len &lt; 3 || msg_len &gt; IPMI_MAX_MSG_LENGTH)"
    for operating: "memcpy(data + 2, bt-&gt;read_data + 4, msg_len - 2)"

Signed-off-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: char: ipmi: Replaced kmalloc and strcpy with kstrdup</title>
<updated>2013-05-16T20:49:25+00:00</updated>
<author>
<name>Alexandru Gheorghiu</name>
<email>gheorghiuandru@gmail.com</email>
</author>
<published>2013-05-16T19:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b6b698f53b3a5382a907308048d77c8bacca4ab'/>
<id>1b6b698f53b3a5382a907308048d77c8bacca4ab</id>
<content type='text'>
Replaced calls to kmalloc followed by strcpy with a sincle call to
kstrdup.  Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu &lt;gheorghiuandru@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced calls to kmalloc followed by strcpy with a sincle call to
kstrdup.  Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu &lt;gheorghiuandru@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>proc: Supply a function to remove a proc entry by PDE</title>
<updated>2013-05-01T21:29:46+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-04-12T16:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8ca16ea7b0abb0a7e49492d1123b715f0ec62e8'/>
<id>a8ca16ea7b0abb0a7e49492d1123b715f0ec62e8</id>
<content type='text'>
Supply a function (proc_remove()) to remove a proc entry (and any subtree
rooted there) by proc_dir_entry pointer rather than by name and (optionally)
root dir entry pointer.  This allows us to eliminate all remaining pde-&gt;name
accesses outside of procfs.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.or&gt;
cc: linux-acpi@vger.kernel.org
cc: openipmi-developer@lists.sourceforge.net
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-pci@vger.kernel.org
cc: netdev@vger.kernel.org
cc: netfilter-devel@vger.kernel.org
cc: alsa-devel@alsa-project.org
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Supply a function (proc_remove()) to remove a proc entry (and any subtree
rooted there) by proc_dir_entry pointer rather than by name and (optionally)
root dir entry pointer.  This allows us to eliminate all remaining pde-&gt;name
accesses outside of procfs.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.or&gt;
cc: linux-acpi@vger.kernel.org
cc: openipmi-developer@lists.sourceforge.net
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-pci@vger.kernel.org
cc: netdev@vger.kernel.org
cc: netfilter-devel@vger.kernel.org
cc: alsa-devel@alsa-project.org
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>procfs: new helper - PDE_DATA(inode)</title>
<updated>2013-04-09T18:13:32+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-03-31T22:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d9dda78bad879595d8c4220a067fc029d6484a16'/>
<id>d9dda78bad879595d8c4220a067fc029d6484a16</id>
<content type='text'>
The only part of proc_dir_entry the code outside of fs/proc
really cares about is PDE(inode)-&gt;data.  Provide a helper
for that; static inline for now, eventually will be moved
to fs/proc, along with the knowledge of struct proc_dir_entry
layout.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only part of proc_dir_entry the code outside of fs/proc
really cares about is PDE(inode)-&gt;data.  Provide a helper
for that; static inline for now, eventually will be moved
to fs/proc, along with the knowledge of struct proc_dir_entry
layout.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: add options to disable openfirmware and PCI scanning</title>
<updated>2013-02-28T03:10:21+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2013-02-28T01:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f2afae4629d74287aaac39d0532aac5819e77e70'/>
<id>f2afae4629d74287aaac39d0532aac5819e77e70</id>
<content type='text'>
Add try...  parameters to disable pci and platform (openfirmware) device
scanning for IPMI.  Also add docs for all the try...  parameters.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add try...  parameters to disable pci and platform (openfirmware) device
scanning for IPMI.  Also add docs for all the try...  parameters.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
