Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3210407pxb; Mon, 1 Nov 2021 09:47:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrxDMqbnmsp5rXa1kGGmc/qYFeUw7TwTGKq7YVT90MvZKn/IZjR7fsKHc6onAHQwHdlPat X-Received: by 2002:a17:907:9609:: with SMTP id gb9mr38577540ejc.504.1635785278557; Mon, 01 Nov 2021 09:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635785278; cv=none; d=google.com; s=arc-20160816; b=sAc848CHpiYHJIRrLIJNgyJzrY/Q7D3iWlB++kqcplVoRxdoa1Dh1zce2uyGe+GfJQ f5Bs2EqG5feYoJAL40GIrnLQuUo3E/X/LZGz3ulJS6/A33fe8iAb3Ns8z9K+KpnPAp5l 0DWQpkkZPt/O+tfgcjX38hEYGm6EQdB5xu+c/aG6nk82fYmylbI91ulX7LN57sR7l0eB 6okRVRzedMIqikOdoEX42FlYQhWtGlg1/3y0rmpxk3IrofT/dVuCTH71X5C4BIuqdcBV 7hefOyA+vKFXOGx022EfoGzYctTACi2i0GbF7thTLVMZ/GWkd/ZYSau3LCRoDLQGfOLp rEqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7KsuKAfI1J927R7wBfsDr9jYL8c9OdMkp9LmHo7bAPg=; b=Skfr2eOGA6XVljznXFnwkSC7bUBEUytxxj4bBj6yKUCURKOJSQA1IWBFlgy+C/n8Pl lAloycMHdcJN0oP8kQNZlqVjWe4B6/0bEBHaIeyDx01nlV8ZzRT66dKQ5uBVFcNocTii v0XdmT8Hw/OSoyY9gq622ixBObD6uvs5tkAP32yIojXKg34DxqCW75uGRotDjD7lftFw sZQyzjXGhXsTKZDZCFKMeyLjg8R8/UpXzWaxSxoGbaFYNxPNfxniwTz8pIlOdryIhgmZ CXmAvc1CzkIPwmJ+zkFmaFW05CFMeZ3V9EDtP9RhenAOu9xGZQgmJCgYvwyVTGGLUp93 klRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Y/U/INPe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qb1si27426399ejc.558.2021.11.01.09.47.33; Mon, 01 Nov 2021 09:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Y/U/INPe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231861AbhKAQpp (ORCPT + 99 others); Mon, 1 Nov 2021 12:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbhKAQpo (ORCPT ); Mon, 1 Nov 2021 12:45:44 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A75C061714 for ; Mon, 1 Nov 2021 09:43:11 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id w1so12438640edd.10 for ; Mon, 01 Nov 2021 09:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7KsuKAfI1J927R7wBfsDr9jYL8c9OdMkp9LmHo7bAPg=; b=Y/U/INPe/rmTm+KGdx/CwfL+Rs29y8YJ8P627tEGE3k/2oDTpUxpFOk7z1GP6wa3nG +epYv7DsMPfGT6H5LsRvdQbcZMdxrLhRN9+ggtkReKKpuTlE5BzUCETKJHPNJ3kDFydQ L3+Rnf89fpEouSnDbp2OHzHx2D7uOw3n+YKqZNL3MiYCqekt+rZ3+IIHJduxq5QVlra8 k+M0dHFwEgtB1p355In4RcEoupLxyn29y5ckVhBi2WJF9LmsYS83fETS7aHDAeznNs8P pdIYG/GQxf8tGENG0UB2AYzWsouL+Pz6zGU7s8AspBWd4Mcdzw0dA/nPoSq/2uB6kMDw QmLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7KsuKAfI1J927R7wBfsDr9jYL8c9OdMkp9LmHo7bAPg=; b=ni1FjoRaafbA5JryCnWNIm0bch9jyAFnZjCycnpROySDOAgIIqrSVrdlcbG3PaZVDr nRAU0Rq2AhQN95og08zSv40V0y7baX3DykrAcNHUy93tOtSF1B3kjUCvTVyqXaylvBqx by2z/1mgVC0JN4eoLR/rvMeKFbMqfdFkxMCN4VeB7HaIKBEGehyrxgVumQ9AMmFXz5ye WXyntFOv9G09bE0kUU4xJ410z1WSwSumg3QKFX4VBLk38J0Xsov0v4IW3HuelS+bVRhg mGasORoLE+l6L+gP4WabxeoHzgR+6ufQ8kUnAoi0DWTQZB5SGTi69blRTQs5DQTUSBLB iXmw== X-Gm-Message-State: AOAM530flmaH6tCbvfQ3gFcmtrjBCSKAxThZ+60zPiFTTE1pp4NPqeEf /qlehKy3tVXISXVwRO4vUUc= X-Received: by 2002:a17:907:608c:: with SMTP id ht12mr38210596ejc.78.1635784989689; Mon, 01 Nov 2021 09:43:09 -0700 (PDT) Received: from localhost.localdomain (host-79-56-54-101.retail.telecomitalia.it. [79.56.54.101]) by smtp.gmail.com with ESMTPSA id k23sm9151404edv.22.2021.11.01.09.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:43:09 -0700 (PDT) From: "Fabio M. De Francesco" To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: r8188eu: Use kzalloc() with GFP_ATOMIC in atomic context Date: Mon, 01 Nov 2021 17:43:08 +0100 Message-ID: <2458707.yljdXZV4jf@localhost.localdomain> In-Reply-To: References: <20211101142732.5638-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, November 1, 2021 4:18:03 PM CET Greg Kroah-Hartman wrote: > On Mon, Nov 01, 2021 at 03:27:32PM +0100, Fabio M. De Francesco wrote: > > Use the GFP_ATOMIC flag of kzalloc() with two memory allocation in > > report_del_sta_event(). This function is called while holding spinlocks, > > therefore it is not allowed to sleep. With the GFP_ATOMIC type flag, the > > allocation is high priority and must not sleep. > > > > This issue is detected by Smatch which emits the following warning: > > "drivers/staging/r8188eu/core/rtw_mlme_ext.c:6848 report_del_sta_event() > > warn: sleeping in atomic context". > > > > After the change, the post-commit hook output the following message: > > "CHECK: Prefer kzalloc(sizeof(*pcmd_obj)...) over > > kzalloc(sizeof(struct cmd_obj)...)". > > > > According to the above "CHECK", use the preferred style in the first > > kzalloc(). > > > > Signed-off-by: Fabio M. De Francesco > > --- > > > > v1->v2: Fix an overlooked error due to an incorrect copy-paste > > of the sizeof() operator. > > What commit does this fix? > > thanks, > > greg k-h > Sorry, Greg. Please let me know if I understand correctly what you are asking for... In v1 I introduced a silly error while copy-pasting "sizeof()" and then I fixed it in v2. I think that you mean that I should reword the list of changes from v1 because I'm not explaining properly why I submitted v2. Is my understanding correct? If so, I have no problem in submitting v3. Thank you in advance, Fabio P.S.: I had to resend this email and I want apologize for the noise. It seems that it contained HTML parts and for this reasons it was rejected by the relevant lists.