diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-03-14 20:37:31 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-03-14 20:37:31 +0100 |
commit | b0d8bef8ed805ca92eb91e86acf3ce89cbebc8ce (patch) | |
tree | 8838391a76f0cf75ffcd31166996d03d19c580a6 /drivers/net/ppp/ppp_generic.c | |
parent | 82b691bedf05f258f1c86c96ee574b0d7795c0a1 (diff) | |
parent | fc6eabbbf8ef99efed778dd5afabc83c21dba585 (diff) | |
download | blackbird-op-linux-b0d8bef8ed805ca92eb91e86acf3ce89cbebc8ce.tar.gz blackbird-op-linux-b0d8bef8ed805ca92eb91e86acf3ce89cbebc8ce.zip |
Merge branch 'linus' into irq/core to pick up dependencies.
Diffstat (limited to 'drivers/net/ppp/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 255a5def56e9..fa2a9bdd1866 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -3161,6 +3161,15 @@ ppp_connect_channel(struct channel *pch, int unit) goto outl; ppp_lock(ppp); + spin_lock_bh(&pch->downl); + if (!pch->chan) { + /* Don't connect unregistered channels */ + spin_unlock_bh(&pch->downl); + ppp_unlock(ppp); + ret = -ENOTCONN; + goto outl; + } + spin_unlock_bh(&pch->downl); if (pch->file.hdrlen > ppp->file.hdrlen) ppp->file.hdrlen = pch->file.hdrlen; hdrlen = pch->file.hdrlen + 2; /* for protocol bytes */ |