Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1656819

Re: [PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit
Date 2017-06-03 16:10 +0200
Message-ID <tOhUC-81i-25@gated-at.bofh.it> (permalink)
References <tN6HU-1Tw-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, May 31, 2017 at 04:00:41PM +0800, Jia-Ju Bai wrote:
> The driver may sleep under a spin lock, and the function call path is:
> cfs_wi_exit (acquire the lock by spin_lock)
>   LASSERT
>     lbug_with_loc
>       libcfs_debug_dumplog
>         schedule and kthread_run --> may sleep
> 
> To fix it, all "LASSERT" is placed out of the spin_lock and spin_unlock.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
> ---
>  drivers/staging/lustre/lnet/libcfs/workitem.c |   13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

What changed from v1?  You have to always tell us that.

Please redo all of these, if they are still valid patches, and send them
as a patch series, so I know what order they should be applied in.

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit Jia-Ju Bai <baijiaju1990@163.com> - 2017-05-31 10:00 +0200
  Re: [PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit Oleg Drokin <oleg.drokin@intel.com> - 2017-05-31 15:50 +0200
  Re: [PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit Greg KH <gregkh@linuxfoundation.org> - 2017-06-03 16:10 +0200

csiph-web