#ifndef _TIMEKEEPING_INTERNAL_H #define _TIMEKEEPING_INTERNAL_H /* * timekeeping debug functions */ #include <linux/clocksource.h> #include <linux/time.h> #ifdef CONFIG_DEBUG_FS extern void tk_debug_account_sleep_time(struct timespec64 *t); #else #define tk_debug_account_sleep_time(x) #endif #ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE static inline u64 clocksource_delta(u64 now, u64 last, u64 mask) { u64 ret = (now - last) & mask; /* * Prevent time going backwards by checking the MSB of mask in * the result. If set, return 0. */ return ret & ~(mask >> 1) ? 0 : ret; } #else static inline u64 clocksource_delta(u64 now, u64 last, u64 mask) { return (now - last) & mask; } #endif extern time64_t __ktime_get_real_seconds(void); #endif /* _TIMEKEEPING_INTERNAL_H */ '/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='ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'/><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=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>refs</a><a href='/cgit.cgi/linux/net-next.git/log/net/strparser/strparser.c'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/strparser/strparser.c'> <input type='hidden' name='id' value='ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'/><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=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>net</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/strparser?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>strparser</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>strparser.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'/><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>Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com></td><td class='right'>2017-01-09 16:00:44 +0530</td></tr> <tr><th>committer</th><td>J. Bruce Fields <bfields@redhat.com></td><td class='right'>2017-01-12 16:14:47 -0500</td></tr> <tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>ce1ca7d2d140a1f4aaffd297ac487f246963dd2f</a> (<a href='/cgit.cgi/linux/net-next.git/patch/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>5aeab5e0cb6ef404c894a18251588278b9432a2c</a> /<a href='/cgit.cgi/linux/net-next.git/tree/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>net/strparser/strparser.c</a></td></tr> <tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/strparser/strparser.c?id=546125d1614264d26080817d0c8cddb9b25081fa'>546125d1614264d26080817d0c8cddb9b25081fa</a> (<a href='/cgit.cgi/linux/net-next.git/diff/net/strparser/strparser.c?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f&id2=546125d1614264d26080817d0c8cddb9b25081fa'>diff</a>)</td></tr></table> <div class='commit-subject'>svcrdma: avoid duplicate dma unmapping during error recovery</div><div class='commit-msg'>In rdma_read_chunk_frmr() when ib_post_send() fails, the error code path invokes ib_dma_unmap_sg() to unmap the sg list. It then invokes svc_rdma_put_frmr() which in turn tries to unmap the same sg list through ib_dma_unmap_sg() again. This second unmap is invalid and could lead to problems when the iova being unmapped is subsequently reused. Remove the call to unmap in rdma_read_chunk_frmr() and let svc_rdma_put_frmr() handle it. Fixes: 412a15c0fe53 ("svcrdma: Port to new memory registration API") Cc: stable@vger.kernel.org Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> </div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=ce1ca7d2d140a1f4aaffd297ac487f246963dd2f'>Diffstat</a> (limited to 'net/strparser/strparser.c')</div><table summary='diffstat' class='diffstat'>