Revision 84811412464d66fcf73661a279aa1d7985166495 authored by Prashant Malani on 20 November 2019, 19:40:21 UTC, committed by David S. Miller on 20 November 2019, 20:48:13 UTC
Both rtl_work_func_t() and rtl8152_close() call napi_disable().
Since the two calls aren't protected by a lock, if the close
function starts executing before the work function, we can get into a
situation where the napi_disable() function is called twice in
succession (first by rtl8152_close(), then by set_carrier()).

In such a situation, the second call would loop indefinitely, since
rtl8152_close() doesn't call napi_enable() to clear the NAPI_STATE_SCHED
bit.

The rtl8152_close() function in turn issues a
cancel_delayed_work_sync(), and so it would wait indefinitely for the
rtl_work_func_t() to complete. Since rtl8152_close() is called by a
process holding rtnl_lock() which is requested by other processes, this
eventually leads to a system deadlock and crash.

Re-order the napi_disable() call to occur after the work function
disabling and urb cancellation calls are issued.

Change-Id: I6ef0b703fc214998a037a68f722f784e1d07815e
Reported-by: http://crbug.com/1017928
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b172845
Raw File
Kconfig
# SPDX-License-Identifier: GPL-2.0-only
config CEPH_FS
	tristate "Ceph distributed file system"
	depends on INET
	select CEPH_LIB
	select LIBCRC32C
	select CRYPTO_AES
	select CRYPTO
	default n
	help
	  Choose Y or M here to include support for mounting the
	  experimental Ceph distributed file system.  Ceph is an extremely
	  scalable file system designed to provide high performance,
	  reliable access to petabytes of storage.

	  More information at http://ceph.newdream.net/.

	  If unsure, say N.

if CEPH_FS
config CEPH_FSCACHE
	bool "Enable Ceph client caching support"
	depends on CEPH_FS=m && FSCACHE || CEPH_FS=y && FSCACHE=y
	help
	  Choose Y here to enable persistent, read-only local
	  caching support for Ceph clients using FS-Cache

endif

config CEPH_FS_POSIX_ACL
	bool "Ceph POSIX Access Control Lists"
	depends on CEPH_FS
	select FS_POSIX_ACL
	help
	  POSIX Access Control Lists (ACLs) support permissions for users and
	  groups beyond the owner/group/world scheme.

	  If you don't know what Access Control Lists are, say N

config CEPH_FS_SECURITY_LABEL
	bool "CephFS Security Labels"
	depends on CEPH_FS && SECURITY
	help
	  Security labels support alternative access control models
	  implemented by security modules like SELinux. This option
	  enables an extended attribute handler for file security
	  labels in the Ceph filesystem.

	  If you are not using a security module that requires using
	  extended attributes for file security labels, say N.
back to top