Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp187622lqp; Tue, 11 Jun 2024 00:59:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRS5REAEQRwBWvpaknebgGWLYOowxd8rXQ+B4rQKHCDyuUHW7AS7zr3X0S6l9YdbtQeOLOcp0wkiPgEDtK9qcuDBuAA+BrHEVlpUxcag== X-Google-Smtp-Source: AGHT+IFc+6w+Fmn0DI7WBIHbCQAKovk0lqwLJlQ3Nq/EGdpu138Rq2RGTZKNK/RYwLST0bmJylm5 X-Received: by 2002:a05:6870:ae81:b0:24f:d9b2:b4a with SMTP id 586e51a60fabf-25464443e36mr12037053fac.10.1718092775834; Tue, 11 Jun 2024 00:59:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718092775; cv=pass; d=google.com; s=arc-20160816; b=gUop27kt6sHmPEvukynWapx86aoNRQZv1E4kMM3aM2G2lljrGlctbyuohOgtjjeL6T hvKI+3m2usvGMhx2C+/uCAWjFfJGHeiuxRP/q5m7gzeqwOlaAegEPsorbsb2pK3+qItp cgJLkAMDAZknPXP6LNkGrkEq7C6v36hfhgV7N+AkTUS7OoIPdJv8MPojbTzJaViilvh5 OntH2yeoyh59OyGsODaBJlD1uFjCIjg/9LvltKCSlABH/Ad9stiS/HmeWV5mApUzH2yl 7iYy555Vv/kV/rbtokZoDYYE8+1YwOhJaFvcWQlkoxDVOe4rMt2x31lmjZeCYc31h6uu 9bGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=IYe0QuucfsKEN4V8P0EKM9YqkQpxlrZscd9hQ6V7hDA=; fh=B1lVuYB/RVLT3vXQqjvZpjCFOwpO8jT0ue+vhO0r/ww=; b=RglhJLOro0zwlbNGJgWJ1PtujUvUbp/ro+UMiO5nbuKU7Dw4dnkukdAP3MsynzoQkI 3+kc+Yn8XmQPwUbtZLKivyhEiDCAyQ/aNBL2Bf3ABmNBrrq33YWWuyS0sAnn8pYpVzBH XWSZP+NvHdPmBO1vUkMWZOWUsXlZLlKm6xPP2JDcgVayM97tb0+ZDNobw8rUrYHhQvQo akprnf1Zp7q9fSBdMi1q1UiFvWhhqHX6H859eeSHWmf+A1tahVcLxs0Nu3BPwAikrcnD NuODgHiXs+HQvbk/3gZhPfOouQbJGrWbG5aXOgvKA5wgo98ZTAsmw5IAnS+gr20LWICl jATg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=UjndKFr7; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-209388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-7059787ea08si3049809b3a.3.2024.06.11.00.59.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 00:59:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=UjndKFr7; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-209388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BD55BB28F94 for ; Tue, 11 Jun 2024 07:40:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDD1F172BB6; Tue, 11 Jun 2024 07:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="UjndKFr7" Received: from mout.web.de (mout.web.de [212.227.15.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D5AD42ABA; Tue, 11 Jun 2024 07:40:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718091612; cv=none; b=DTITMEZL2kBUGY+A7MAu+r74oH0F6aUTVSeBmI7+k8NX9ia9o1bOPZmTi0VtwpSrW2S/zkqAgai3Zc1A697KbFqBQmQAMA0hnS/FWiQWPUhs9XXnkqWtgsaUHhSwyXzmpmmHbsv/cHqkldWfQlMatIqrQ+Ve4DWVBcLpdAqAWWE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718091612; c=relaxed/simple; bh=0swJ7oefZ0XYQf1W0sRTgx9AL9YWktm9DAr1gHajTPM=; h=Message-ID:Date:MIME-Version:To:Cc:References:Subject:From: In-Reply-To:Content-Type; b=tMyHXixAogIHRKINCgd9/wLv8oQOUMrhFanimaRz+Dy2ulpTwzq7ARchjBrNetl+6+JahDfHJ7M3W4KZwWRsD6F6Uooa4u8te7e9gf8OgrvszF0bSMuqTG6YVmcx/KOMyxoA8tQ2FuVzf131dhxtpTiONSVhwTtG6evF2F49WGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=UjndKFr7; arc=none smtp.client-ip=212.227.15.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1718091589; x=1718696389; i=markus.elfring@web.de; bh=IYe0QuucfsKEN4V8P0EKM9YqkQpxlrZscd9hQ6V7hDA=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:Cc:References: Subject:From:In-Reply-To:Content-Type:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=UjndKFr7MtX2Tk4ugkcY4fHSiqYCp1aPy+pVQXDT0PhuCdNVqONEzMGqZB2oFedM 7h3GVsuOmnW/aYLfDB6XMRv3T1qnlO3dMuIPqdDhs2nrmMJMO6e85lJG5QisVfUxM 3935rklHO19sf3H6KWgWo78cXLI6xz6ctHulhrIq/Fw4KVWTc/iVuotO+GRuoG2my lOyXv1ENMbSUw5pnYLFqV0IiHbgx192oWBNc5fPUU1ZSR4rAoGzl8L+EFsZgpoz2e Bk/1o2BvNCBVcJtAYKBkkLQEGSmFA3ukYQw08Q5cXpg6Nd8ZtEEPNeRQOvu41fXBV YZu0YbRA5GY3RkL1rQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.83.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M2xw0-1sI1VJ0rPg-00AojT; Tue, 11 Jun 2024 09:39:49 +0200 Message-ID: <2ed41eff-284c-4c44-8090-d2c1765ab6b5@web.de> Date: Tue, 11 Jun 2024 09:39:24 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Gui-Dong Han , linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, Chas Williams <3chas3@gmail.com> Cc: LKML , Jia-Ju Bai References: Subject: Re: [PATCH] atm/fore200e: Consolidate available cell rate update to prevent race condition Content-Language: en-GB From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:PqiipKOL74c+X+TwSvXlaX8DmpLwvd+tBTxwPu/+b42CG5TF1pO 1w+vyWhpMZ2jnlmvVSu4ZjeRAcBg7iZkBDyjr/shzRlev4H+hhso+VhjRW3tvKhyqIoX3OA E1TGt4AN6Pp13xtO6lfXBgK/EtzQMqj0Asf7Xmcjw2uWtUb2WTnwnSSdLr5rIqMkzUfvlam 2hnsoaOn+2gGyWQY+ukfQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:KKCreMyY098=;JxyQK6L5bAZizRDrwVNSFFjK2Du KYJ9acYM7pZh8kgSwJHGjwNTdQ2RsiF1WQoaXn7d9kpW4vVKGemjIrsgXtg6jVzmADW2j0BNw XRiijZFS/KoiIR+f5Dq9xjOeyX0vlcPx/lTXilme0xNy4nqLeFTYEPoSPLLzFcyX+1MAnRm05 moZLU4FFkOPK7gIGDky9mKHD66ejlin0FQ8FJethiYuKQ1ehKYbawBTQP7zrGiVvmMqtSmia0 LinDFoCGuZrhw4hxJY32nIkU6vjBh5rBVdFkV1ZVhkdi/IYhWhgfO1U9RqnTqolBUe/f5aMx1 3otFxXdo/4AXokK0TLdsCkhBTe4XYwwq0672TKiIrpn6jyzpj27p7K/Pu6adjXFlfYWP6jXZL Uu/c6RmDyYkQOB3W393qnebNJEs6WTzQib7vF/hS2a5m9KYb66XlL405XfNOdXRmbNkqFpmUO Bm5bqFmzh8TqprQWOK90MbFjI6pkWNI5npOFMAIimA0ktS8m4Wc6ERi1zN4m3J9+TN6FDy1dR N8ViB2GdzlsJUGlC78CchVP8mVwyYI16o4JqAUIeuBUzSiexHMFrNdDmz/n9mu9AWu8qJ+5KO isXAkdcrhVk+vVXneRyttwuxNT+i/9yKAv+s+Pv2j8v7zTAx/P/+pGFchQ3YR1rkWkVhxiofK SO4X8WEG67EmJmHkztdh+gWxh446E5VbhePe7e70y/cK1l1mltl/ngBi281BX47HFWZ8JT5kx koqUbxOoXwhLjbliAzsHWTO1rxJ1gfrLb1X/rb0AF/v8yTdSwF///TpgFFSq2M9q1bNG1WBjR wJ/uMKAo3/W6mfQ4yUbCg2PqdewKqSVoxtq/IOsMRPdoA= > In fore200e_change_qos, there is a race condition due to two consecutive > updates to the 'available_cell_rate' variable. If a read operation > occurs between these updates, an intermediate value might be read, > leading to potential bugs. * Would you like to explain a bit more why you find the applied mutex insufficient for data synchronisation aspects? * Is any special analysis tool (like =E2=80=9CBassCheck=E2=80=9D) involved= in such a contribution? > To fix this issue, 'available_cell_rate' should be adjusted in a single > operation, ensuring consistency and preventing any intermediate states > from being read. * Please improve the change description with an imperative wording. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/= Documentation/process/submitting-patches.rst?h=3Dv6.10-rc2#n94 * How do you think about to specify the name of the affected function in the summary phrase? * I would like to point out that similar source code adjustments can be ac= hieved also by the means of the semantic patch language (Coccinelle software). Regards, Markus