diff options
| -rw-r--r-- | include/net/sock.h | 5 | ||||
| -rw-r--r-- | net/strparser/strparser.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 9155da422692..7a7b14e9628a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1514,6 +1514,11 @@ static inline bool sock_owned_by_user(const struct sock *sk) | |||
| 1514 | return sk->sk_lock.owned; | 1514 | return sk->sk_lock.owned; |
| 1515 | } | 1515 | } |
| 1516 | 1516 | ||
| 1517 | static inline bool sock_owned_by_user_nocheck(const struct sock *sk) | ||
| 1518 | { | ||
| 1519 | return sk->sk_lock.owned; | ||
| 1520 | } | ||
| 1521 | |||
| 1517 | /* no reclassification while locks are held */ | 1522 | /* no reclassification while locks are held */ |
| 1518 | static inline bool sock_allow_reclassification(const struct sock *csk) | 1523 | static inline bool sock_allow_reclassification(const struct sock *csk) |
| 1519 | { | 1524 | { |
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c index c5fda15ba319..1fdab5c4eda8 100644 --- a/net/strparser/strparser.c +++ b/net/strparser/strparser.c | |||
| @@ -401,7 +401,7 @@ void strp_data_ready(struct strparser *strp) | |||
| 401 | * allows a thread in BH context to safely check if the process | 401 | * allows a thread in BH context to safely check if the process |
| 402 | * lock is held. In this case, if the lock is held, queue work. | 402 | * lock is held. In this case, if the lock is held, queue work. |
| 403 | */ | 403 | */ |
| 404 | if (sock_owned_by_user(strp->sk)) { | 404 | if (sock_owned_by_user_nocheck(strp->sk)) { |
| 405 | queue_work(strp_wq, &strp->work); | 405 | queue_work(strp_wq, &strp->work); |
| 406 | return; | 406 | return; |
| 407 | } | 407 | } |
