projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e1011a
)
rapidio/tsi721: fix incorrect detection of address translation condition
author
Alexandre Bounine
<
[email protected]
>
Thu, 1 Sep 2016 23:15:18 +0000
(16:15 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 2 Sep 2016 00:52:02 +0000
(17:52 -0700)
Fix incorrect condition to identify involvment of a address translation
mechanism.
This bug results in NULL pointer kernel crash dump in cases when mapping
of inbound RapidIO address range is requested within existing aprture.
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Alexandre Bounine <
[email protected]
>
Cc: Matt Porter <
[email protected]
>
Cc: Andre van Herk <
[email protected]
>
Cc: Barry Wood <
[email protected]
>
Cc: <
[email protected]
> [4.6+]
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rapidio/devices/tsi721.c
patch
|
blob
|
history
diff --git
a/drivers/rapidio/devices/tsi721.c
b/drivers/rapidio/devices/tsi721.c
index 32f0f014a06735c5ea51cf4f5185c5fbc7bdae60..9d19b9a62011b376be541b247336d455952bb42b 100644
(file)
--- a/
drivers/rapidio/devices/tsi721.c
+++ b/
drivers/rapidio/devices/tsi721.c
@@
-1161,7
+1161,7
@@
static int tsi721_rio_map_inb_mem(struct rio_mport *mport, dma_addr_t lstart,
} else if (ibw_start < (ib_win->rstart + ib_win->size) &&
(ibw_start + ibw_size) > ib_win->rstart) {
/* Return error if address translation involved */
- if (
direct &&
ib_win->xlat) {
+ if (
!direct ||
ib_win->xlat) {
ret = -EFAULT;
break;
}