Return-path: Received: from mailout4.w2.samsung.com ([211.189.100.14]:58243 "EHLO usmailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752784AbcJLCMW (ORCPT ); Tue, 11 Oct 2016 22:12:22 -0400 Received: from uscas1p2.samsung.com (unknown [182.198.245.207]) by usmailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OEW00MO5WSKXP50@usmailout4.samsung.com> for linux-media@vger.kernel.org; Tue, 11 Oct 2016 22:12:20 -0400 (EDT) Date: Tue, 11 Oct 2016 23:12:16 -0300 From: Mauro Carvalho Chehab To: Julia Lawall Cc: linux-media@vger.kernel.org, kbuild-all@01.org Subject: Re: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169 Message-id: <20161011231216.21b1c8fb.m.chehab@samsung.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <20161011182844.12e00307.m.chehab@samsung.com> Sender: linux-media-owner@vger.kernel.org List-ID: Em Tue, 11 Oct 2016 23:41:53 +0200 (CEST) Julia Lawall escreveu: > On Tue, 11 Oct 2016, Mauro Carvalho Chehab wrote: > > > Em Tue, 11 Oct 2016 15:16:24 +0200 (CEST) > > Julia Lawall escreveu: > > > > > On Tue, 11 Oct 2016, Julia Lawall wrote: > > > > > > > It looks like a lock may be needed before line 174. > > > > > > Sorry, an unlock. > > > > I suspect that this is a false positive warning, as there is a > > mutex unlock on the same routine, at line 203. All exit > > conditions go to the unlock condition. > > There is a direct exit in line 174. Ah! I was looking at the wrong patch (cinergyT2-core: don't do DMA on stack). Thanks for pointing it. I'll the affected code to: - dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0); + ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0); + if (ret < 0) + goto ret; Regards, Mauro -- Thanks, Mauro