Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8aeca8fea5f2de2563e097829d62af30ca2de650 Commit: 8aeca8fea5f2de2563e097829d62af30ca2de650 Parent: 86c1dcfc96a778433ebc6e9b1d3e80a126cb80f2 Author: Florian Zumbiehl <[EMAIL PROTECTED]> AuthorDate: Mon Jul 30 17:49:13 2007 -0700 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Tue Jul 31 02:28:23 2007 -0700
[PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location and the last one for now: Acquire the sock lock in pppoe_sendmsg() before accessing the sock - and in particular avoid releasing the lock even though it hasn't been acquired. Signed-off-by: Florian Zumbiehl <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- drivers/net/pppoe.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index f75aeaa..35a7385 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -774,6 +774,7 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock, struct net_device *dev; char *start; + lock_sock(sk); if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) { error = -ENOTCONN; goto end; @@ -784,8 +785,6 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock, hdr.code = 0; hdr.sid = po->num; - lock_sock(sk); - dev = po->pppoe_dev; error = -EMSGSIZE; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html