<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/char/ipmi, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2016-01-31T19:25:44Z</updated>
<entry>
<title>ipmi: move timer init to before irq is setup</title>
<updated>2016-01-31T19:25:44Z</updated>
<author>
<name>Jan Stancek</name>
<email>jstancek@redhat.com</email>
</author>
<published>2015-12-08T18:57:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0c6ecf2fc1b8460161eb5781681606701e2c9b6c'/>
<id>urn:sha1:0c6ecf2fc1b8460161eb5781681606701e2c9b6c</id>
<content type='text'>
commit 27f972d3e00b50639deb4cc1392afaeb08d3cecc upstream.

We encountered a panic on boot in ipmi_si on a dell per320 due to an
uninitialized timer as follows.

static int smi_start_processing(void       *send_info,
                                ipmi_smi_t intf)
{
        /* Try to claim any interrupts. */
        if (new_smi-&gt;irq_setup)
                new_smi-&gt;irq_setup(new_smi);

 --&gt; IRQ arrives here and irq handler tries to modify uninitialized timer

    which triggers BUG_ON(!timer-&gt;function) in __mod_timer().

 Call Trace:
   &lt;IRQ&gt;
   [&lt;ffffffffa0532617&gt;] start_new_msg+0x47/0x80 [ipmi_si]
   [&lt;ffffffffa053269e&gt;] start_check_enables+0x4e/0x60 [ipmi_si]
   [&lt;ffffffffa0532bd8&gt;] smi_event_handler+0x1e8/0x640 [ipmi_si]
   [&lt;ffffffff810f5584&gt;] ? __rcu_process_callbacks+0x54/0x350
   [&lt;ffffffffa053327c&gt;] si_irq_handler+0x3c/0x60 [ipmi_si]
   [&lt;ffffffff810efaf0&gt;] handle_IRQ_event+0x60/0x170
   [&lt;ffffffff810f245e&gt;] handle_edge_irq+0xde/0x180
   [&lt;ffffffff8100fc59&gt;] handle_irq+0x49/0xa0
   [&lt;ffffffff8154643c&gt;] do_IRQ+0x6c/0xf0
   [&lt;ffffffff8100ba53&gt;] ret_from_intr+0x0/0x11

        /* Set up the timer that drives the interface. */
        setup_timer(&amp;new_smi-&gt;si_timer, smi_timeout, (long)new_smi);

The following patch fixes the problem.

To: Openipmi-developer@lists.sourceforge.net
To: Corey Minyard &lt;minyard@acm.org&gt;
CC: linux-kernel@vger.kernel.org

Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Tony Camuso &lt;tcamuso@redhat.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipmi: Start the timer and thread on internal msgs</title>
<updated>2016-01-31T19:25:44Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2015-09-05T22:44:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f66fdd160a1f5250d5ac882d5ef6bf654a03a957'/>
<id>urn:sha1:f66fdd160a1f5250d5ac882d5ef6bf654a03a957</id>
<content type='text'>
commit 0cfec916e86d881e209de4b4ae9959a6271e6660 upstream.

The timer and thread were not being started for internal messages,
so in interrupt mode if something hung the timer would never go
off and clean things up.  Factor out the internal message sending
and start the timer for those messages, too.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Tested-by: Gouji, Masayuki &lt;gouji.masayuki@jp.fujitsu.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipmi:ssif: Add a module parm to specify that SMBus alerts don't work</title>
<updated>2015-09-03T20:02:31Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2015-08-27T20:49:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf2d087749d91e1fa2826edde1e2fd650d3053ca'/>
<id>urn:sha1:bf2d087749d91e1fa2826edde1e2fd650d3053ca</id>
<content type='text'>
They are broken on some platforms, this gives people a chance to work
around it until the firmware is fixed.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: add of_device_id in MODULE_DEVICE_TABLE</title>
<updated>2015-09-03T20:02:31Z</updated>
<author>
<name>Brijesh Singh</name>
<email>brijeshkumar.singh@amd.com</email>
</author>
<published>2015-08-24T14:15:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=acbd9ae70a94bdc626508f444879e19ebe1c421f'/>
<id>urn:sha1:acbd9ae70a94bdc626508f444879e19ebe1c421f</id>
<content type='text'>
Fix autoloading ipmi modules when using device tree.

Signed-off-by: Brijesh Singh &lt;brijeshkumar.singh@amd.com&gt;

Moved this change up into the CONFIG_OF section to account
for changes to the probing code.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Compensate for BMCs that wont set the irq enable bit</title>
<updated>2015-09-03T20:02:30Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2015-08-18T19:29:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d08828973d96eb26e48fb7ca8fb8a8d49adbe53a'/>
<id>urn:sha1:d08828973d96eb26e48fb7ca8fb8a8d49adbe53a</id>
<content type='text'>
It appears that some BMCs support interrupts but don't support setting
the irq enable bits.  The interrupts are just always on.  Sigh.
Add code to compensate.

The new code was very similar to another functions, so this also
factors out the common code into other functions.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Tested-by: Henrik Korkuc &lt;henrik@kirneh.eu&gt;
</content>
</entry>
<entry>
<title>ipmi: Don't call receive handler in the panic context</title>
<updated>2015-09-03T20:02:29Z</updated>
<author>
<name>Hidehiro Kawai</name>
<email>hidehiro.kawai.ez@hitachi.com</email>
</author>
<published>2015-07-27T05:55:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c49c097610fe1aabf86111297280a718abb5dcc2'/>
<id>urn:sha1:c49c097610fe1aabf86111297280a718abb5dcc2</id>
<content type='text'>
Received handlers defined as ipmi_recv_hndl member of struct
ipmi_user_hndl can take a spinlock.  This means that if the kernel
panics while holding the lock, a deadlock may happen on the lock
while flushing queued messages in the panic context.

Calling the receive handler doesn't make much meanings in the panic
context, simply skip it to avoid possible deadlocks.

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Avoid touching possible corrupted lists in the panic context</title>
<updated>2015-09-03T20:02:29Z</updated>
<author>
<name>Hidehiro Kawai</name>
<email>hidehiro.kawai.ez@hitachi.com</email>
</author>
<published>2015-07-27T05:55:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=06e5e345fea8df24b1d935f98741343df4cab664'/>
<id>urn:sha1:06e5e345fea8df24b1d935f98741343df4cab664</id>
<content type='text'>
When processing queued messages in the panic context, IPMI driver
tries to do it without any locking to avoid deadlocks.  However,
this means we can touch a corrupted list if the kernel panicked
while manipulating the list.  Fortunately, current `add-tail and
del-from-head' style implementation won't touch the corrupted part,
but it is inherently risky.

To get rid of the risk, this patch re-initializes the message lists
on panic if the related spinlock has already been acquired.  As the
result, we may lose queued messages, but it's not so painful.
Dropping messages on the received message list is also less
problematic because no one can respond the received messages.

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;

Fixed a comment typo.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Don't flush messages in sender() in run-to-completion mode</title>
<updated>2015-09-03T20:02:28Z</updated>
<author>
<name>Hidehiro Kawai</name>
<email>hidehiro.kawai.ez@hitachi.com</email>
</author>
<published>2015-07-27T05:55:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=82802f968bd3118af04eaeb3814c21d9813be527'/>
<id>urn:sha1:82802f968bd3118af04eaeb3814c21d9813be527</id>
<content type='text'>
When flushing queued messages in run-to-completion mode,
smi_event_handler() is recursively called.

flush_messages()
 smi_event_handler()
  handle_transaction_done()
   deliver_recv_msg()
    ipmi_smi_msg_received()
     smi_recv_tasklet()
      sender()
       flush_messages()
        smi_event_handler()
         ...

The depth of the recursive call depends on the number of queued
messages, so it can cause a stack overflow if many messages have
been queued.

To solve this problem, this patch removes flush_messages()
from sender()@ipmi_si_intf.c.  Instead, add flush_messages() to
caller side of sender() if needed.  Additionally, to implement this,
add new handler flush_messages to struct ipmi_smi_handlers.

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;

Fixed up a comment and some spacing issues.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Factor out message flushing procedure</title>
<updated>2015-09-03T20:02:28Z</updated>
<author>
<name>Hidehiro Kawai</name>
<email>hidehiro.kawai.ez@hitachi.com</email>
</author>
<published>2015-07-27T05:55:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e45361d733d0a1432b0f6307375045e66ac02489'/>
<id>urn:sha1:e45361d733d0a1432b0f6307375045e66ac02489</id>
<content type='text'>
Factor out message flushing procedure which is used in run-to-completion
mode.  This patch doesn't change the logic.

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Remove unneeded set_run_to_completion call</title>
<updated>2015-09-03T20:02:27Z</updated>
<author>
<name>Hidehiro Kawai</name>
<email>hidehiro.kawai.ez@hitachi.com</email>
</author>
<published>2015-07-27T05:55:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b0868dd5c17c0d9cc8919e786db2e428aa225621'/>
<id>urn:sha1:b0868dd5c17c0d9cc8919e786db2e428aa225621</id>
<content type='text'>
send_panic_events() calls intf-&gt;handlers-&gt;set_run_to_completion(),
but it has already been done in the caller function panic_event().
Remove it from send_panic_events().

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
</feed>
