aboutsummaryrefslogtreecommitdiff
path: root/net/llc/af_llc.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2014-01-16 09:14:57 +0800
committerAlex Shi <alex.shi@linaro.org>2014-01-16 09:14:57 +0800
commitc8e95ac690b37fd1a469c685d716e24abae26992 (patch)
tree62593c6b574ff9cf08cabbcb7d4fc943b5377718 /net/llc/af_llc.c
parent3dad43721441f1cf8ed1a3a975bc939007686589 (diff)
parent1071ea6e68ead40df739b223e9013d99c23c19ab (diff)
Merge remote-tracking branch 'stable/linux-3.10.y' 3.10.27 into linux-linaro-lsk
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r--net/llc/af_llc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 88709882c46..c3ee8054706 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -715,7 +715,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
unsigned long cpu_flags;
size_t copied = 0;
u32 peek_seq = 0;
- u32 *seq;
+ u32 *seq, skb_len;
unsigned long used;
int target; /* Read at least this many bytes */
long timeo;
@@ -812,6 +812,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
}
continue;
found_ok_skb:
+ skb_len = skb->len;
/* Ok so how much can we use? */
used = skb->len - offset;
if (len < used)
@@ -844,7 +845,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
}
/* Partial read */
- if (used + offset < skb->len)
+ if (used + offset < skb_len)
continue;
} while (len > 0);