From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753052AbdF0RdA (ORCPT ); Tue, 27 Jun 2017 13:33:00 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:57763 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751576AbdF0Rcy (ORCPT ); Tue, 27 Jun 2017 13:32:54 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [RESEND PATCH v4 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session From: Marcel Holtmann In-Reply-To: <1498556084-25346-1-git-send-email-jeffy.chen@rock-chips.com> Date: Tue, 27 Jun 2017 19:32:52 +0200 Cc: LKML , "open list:BLUETOOTH DRIVERS" , rvaswani@nvidia.com, Brian Norris , dmitry.torokhov@gmail.com, Douglas Anderson , acho@suse.com, Johan Hedberg , Network Development , "David S. Miller" , "Gustavo F. Padovan" Content-Transfer-Encoding: 7bit Message-Id: <0815411E-62D7-42DC-A0BF-78FD150C0949@holtmann.org> References: <1498556084-25346-1-git-send-email-jeffy.chen@rock-chips.com> To: Jeffy Chen X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jeffy, > It looks like bnep_session has same pattern as the issue reported in > old rfcomm: > > while (1) { > set_current_state(TASK_INTERRUPTIBLE); > if (condition) > break; > // may call might_sleep here > schedule(); > } > __set_current_state(TASK_RUNNING); > > Which fixed at: > dfb2fae Bluetooth: Fix nested sleeps > > So let's fix it at the same way, also follow the suggestion of: > https://lwn.net/Articles/628628/ > > Signed-off-by: Jeffy Chen > Reviewed-by: Brian Norris > Reviewed-by: AL Yu-Chen Cho > --- > > Changes in v4: None > Changes in v2: None > > net/bluetooth/bnep/core.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) all 3 patches have been applied to bluetooth-next tree. Regards Marcel