next plumbings</title> <meta name='generator' content='cgit v1.2.3-54-g00ecf'/> <meta name='robots' content='noindex, nofollow'/> <link rel='stylesheet' type='text/css' href='/cgit.css'/> <script type='text/javascript' src='/cgit.js'></script> <link rel='shortcut icon' href='http://distanz.ch/favicon.ico'/> <link rel='alternate' title='Atom feed' href='https://git.distanz.ch/cgit.cgi/linux/net-next.git/atom/sound/pci/ctxfi/ctimap.c?h=master' type='application/atom+xml'/> <link rel='vcs-git' href='git://git.distanz.ch/linux/net-next.git' title='net-next.git Git repository'/> <link rel='vcs-git' href='http:///git.distanz.ch/cgit.cgi/linux/net-next.git' title='net-next.git Git repository'/> </head> <body> <div id='cgit'><table id='header'> <tr> <td class='logo' rowspan='2'><a href='/cgit.cgi/'><img src='/cgit.png' alt='cgit logo'/></a></td> <td class='main'><a href='/cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'> <input type='hidden' name='id' value='030305d69fc6963c16003f50d7e8d74b02d0a143'/><select name='h' onchange='this.form.submit();'> <option value='emaclite-cleanup'>emaclite-cleanup</option> <option value='master' selected='selected'>master</option> <option value='nds-private-remove'>nds-private-remove</option> <option value='packet-loop-back'>packet-loop-back</option> <option value='packet-rx-pump-back'>packet-rx-pump-back</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>refs</a><a href='/cgit.cgi/linux/net-next.git/log/sound/pci/ctxfi/ctimap.c'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/sound/pci/ctxfi/ctimap.c'> <input type='hidden' name='id' value='030305d69fc6963c16003f50d7e8d74b02d0a143'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/sound?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>sound</a>/<a href='/cgit.cgi/linux/net-next.git/commit/sound/pci?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>pci</a>/<a href='/cgit.cgi/linux/net-next.git/commit/sound/pci/ctxfi?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>ctxfi</a>/<a href='/cgit.cgi/linux/net-next.git/commit/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>ctimap.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='030305d69fc6963c16003f50d7e8d74b02d0a143'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'> <tr><th>author</th><td>Bjorn Helgaas <bhelgaas@google.com></td><td class='right'>2017-01-27 15:00:45 -0600</td></tr> <tr><th>committer</th><td>Bjorn Helgaas <bhelgaas@google.com></td><td class='right'>2017-01-27 15:00:45 -0600</td></tr> <tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>030305d69fc6963c16003f50d7e8d74b02d0a143</a> (<a href='/cgit.cgi/linux/net-next.git/patch/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>363a4e34d199178769b7e7eeb26ea2620a55847b</a> /<a href='/cgit.cgi/linux/net-next.git/tree/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>sound/pci/ctxfi/ctimap.c</a></td></tr> <tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/sound/pci/ctxfi/ctimap.c?id=4d191b1b63c209e37bf27938ef365244d3c41084'>4d191b1b63c209e37bf27938ef365244d3c41084</a> (<a href='/cgit.cgi/linux/net-next.git/diff/sound/pci/ctxfi/ctimap.c?id=030305d69fc6963c16003f50d7e8d74b02d0a143&id2=4d191b1b63c209e37bf27938ef365244d3c41084'>diff</a>)</td></tr></table> <div class='commit-subject'>PCI/ASPM: Handle PCI-to-PCIe bridges as roots of PCIe hierarchies</div><div class='commit-msg'>In a struct pcie_link_state, link->root points to the pcie_link_state of the root of the PCIe hierarchy. For the topmost link, this points to itself (link->root = link). For others, we copy the pointer from the parent (link->root = link->parent->root). Previously we recognized that Root Ports originated PCIe hierarchies, but we treated PCI/PCI-X to PCIe Bridges as being in the middle of the hierarchy, and when we tried to copy the pointer from link->parent->root, there was no parent, and we dereferenced a NULL pointer: BUG: unable to handle kernel NULL pointer dereference at 0000000000000090 IP: [<ffffffff9e424350>] pcie_aspm_init_link_state+0x170/0x820 Recognize that PCI/PCI-X to PCIe Bridges originate PCIe hierarchies just like Root Ports do, so link->root for these devices should also point to itself. Fixes: 51ebfc92b72b ("PCI: Enumerate switches below PCI-to-PCIe bridges") Link: https://bugzilla.kernel.org/show_bug.cgi?id=193411 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1022181 Tested-by: lists@ssl-mail.com Tested-by: Jayachandran C. <jnair@caviumnetworks.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v4.2+</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=030305d69fc6963c16003f50d7e8d74b02d0a143'>Diffstat</a> (limited to 'sound/pci/ctxfi/ctimap.c')</div><table summary='diffstat' class='diffstat'>