Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3999924rwl; Mon, 10 Apr 2023 04:48:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZtrsnIfUHEYXaoqpx51G5RVLMxCE5bA+oTayhX7AlxYSHteIAtIglMy9jcypOWeMayT+QG X-Received: by 2002:a17:906:27d3:b0:94a:9c4e:d2e9 with SMTP id k19-20020a17090627d300b0094a9c4ed2e9mr1778937ejc.0.1681127314347; Mon, 10 Apr 2023 04:48:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681127314; cv=pass; d=google.com; s=arc-20160816; b=KuFapn8WctY5TGsDeLjDg7RMfe1ZuF+SccWdtKaq9cs6/vWodkMHDhY7wAkv8gele9 s7mqM/ylpJqyHuoz4koKhRKgDk7Obl+4LJyO3OPz7nBak9a9kRMpYZ2EdUse5ihQoh28 3RydfGtOtZ0yTVX7uC74nCjf4WnvrmZ/Nobq2MVVccxdvnQLS6woHxw7rCZuDJhdHW0E Q4MYUvpCROu8zF3ICL7lBpfPwBqpk9o2gvIkYR0w2gpoXWMtD+QhsyrymjqS34iq8eyu pzlex32fOJdTC+1DcpSH5ckwxsQvCI/IXhSAHwmYWIlZU6I9lfDCikEl5Cn8zlISBnDp k65Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=YU3n9yMc70UhhQijN64NLuYqMtTTnwXZ3CjNr4QXmjM=; b=Un19Znoea9YfMuhSh9PWAPTIWdrsTu/nkt3wnao/eCeg+ODrz/uITENCr640M77cwu 3YAefsj9SNai6Fv3e7oRybJtxhyTqBvjENzeGAM16aii1RTAl04nz8Q/JDjXcY1v07h7 fJ83kmXhoWKtmH/uIf9jXjBmohIe+7ZzGGcOcAx/NK5L+EHArJJnCTjiMu2GEmQtoVUr CILLq/c5js+AnO1XVJcAWDP4gDNveERfa8XkNkvPFL3ZVgGUNv4reFfoQ2eSGncTBJcR V6rFJat5v1ODGzwHp+4BwBOAhDWuEgQ1Z/r6wmYrZewbuqtLLOTU8cQS0+zdAei0Bh30 VINQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chelsio.com header.s=selector1 header.b=bDB2HPaN; arc=pass (i=1 spf=pass spfdomain=chelsio.com dkim=pass dkdomain=chelsio.com dmarc=pass fromdomain=chelsio.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chelsio.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi12-20020a170906da0c00b0094a735f0026si2989551ejb.974.2023.04.10.04.48.09; Mon, 10 Apr 2023 04:48:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chelsio.com header.s=selector1 header.b=bDB2HPaN; arc=pass (i=1 spf=pass spfdomain=chelsio.com dkim=pass dkdomain=chelsio.com dmarc=pass fromdomain=chelsio.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chelsio.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbjDJLpQ (ORCPT + 99 others); Mon, 10 Apr 2023 07:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjDJLpO (ORCPT ); Mon, 10 Apr 2023 07:45:14 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2127.outbound.protection.outlook.com [40.107.102.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C8149ED; Mon, 10 Apr 2023 04:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aANyxU5irA2hiB2kckB4z9eMdln65HFohvlIvNEXIk2tZL2cLJ6FdGhLkbv4L4dMB7DBwffb91O8zAI46ewBdlckf/r9xVfHmBvKyt0cAP7EA6HIpIttf/3nTYlNYvncYFOr2/kMrIzf+1xQt49NYCTEnDb3/rOP5giuhrDjm97TRfHP0CnGD/k6nQ/mWNDRzaVYcnG97vYsZs6CV+Lx/Bppve/23WojgQbUb6PHhYqTrZ+X6LoWDZKqFcnwDgZmVyTB/cZ8xO6RciETH09d/jl6xcf/tQ8hk+3H4IFDsCoYtqRQhJbYni6fR/pO883wrj++AMO8mqvt6O1oyIwBWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YU3n9yMc70UhhQijN64NLuYqMtTTnwXZ3CjNr4QXmjM=; b=a/1EW6uB6a5set1PrmtxgIoiDq3HOW5ZbxPIEWsU8+8Ml8l4u+zD/AZY1BxqX2nJZGmh1Qaza2I5tUyJLWIl62WFAFACzqDJUBF0DvhgT+FZwFLUp1oqLEV0XZN8mC2WQ+tO0uQaWOA6RdzAwPvBsM/tiDBW2IVwz1X6M8H/GDCC4PJGsg5Jjn+MErBqtz8IWuRWXFO/sCCEMOiz1R5uJ35BXV5UJCaTYrJVy8AMuvke2ITpWIczGB/n7OQFMPQkmF9G7nYgbUlqsY4USM0glkRl0iUI1JFTEqtC3ApxCDPpTWLyQnVVEkhiEba2vM3WXDjXZ/yYZSSokHPld3NwZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=chelsio.com; dmarc=pass action=none header.from=chelsio.com; dkim=pass header.d=chelsio.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chelsio.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YU3n9yMc70UhhQijN64NLuYqMtTTnwXZ3CjNr4QXmjM=; b=bDB2HPaNxbLI+oTDMmIS5vjwZZgCaSnGu6X/AE4qQE/RUwxKn6Lm15hB73U0mrGxNrNdIZmGqDOt84vY/kCmSXU4OmOtkFdS+56ghxpz0LrlSDf6Rj331fv574/5elHAXmkiZzVzM8xoKI4emNgKPia/jaAoN7n7I0sm7bxSyBQ= Received: from BN9PR12MB5324.namprd12.prod.outlook.com (2603:10b6:408:105::15) by DM4PR12MB5796.namprd12.prod.outlook.com (2603:10b6:8:63::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.35; Mon, 10 Apr 2023 11:45:10 +0000 Received: from BN9PR12MB5324.namprd12.prod.outlook.com ([fe80::6d75:bbae:8cf6:2c08]) by BN9PR12MB5324.namprd12.prod.outlook.com ([fe80::6d75:bbae:8cf6:2c08%6]) with mapi id 15.20.6277.031; Mon, 10 Apr 2023 11:45:10 +0000 From: Varun Prakash To: Denis Plotnikov , "linux-scsi@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , "target-devel@vger.kernel.org" , "nab@linux-iscsi.org" , "martin.petersen@oracle.com" Subject: RE: [PATCH] scsi: target: cxgbit: check skb dequeue result Thread-Topic: [PATCH] scsi: target: cxgbit: check skb dequeue result Thread-Index: AQHZaJkXUpuhrJHEekWu8DA0apgLca8kcWfw Date: Mon, 10 Apr 2023 11:45:10 +0000 Message-ID: References: <20230406150405.300909-1-den-plotnikov@yandex-team.ru> In-Reply-To: <20230406150405.300909-1-den-plotnikov@yandex-team.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=chelsio.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR12MB5324:EE_|DM4PR12MB5796:EE_ x-ms-office365-filtering-correlation-id: ef2ca03b-3f31-4e25-5890-08db39b90a17 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CtAqOlQp0It5PmD9I98caCN6DHg4ThZUtX9GAO1eEvbNURixon/t16uHJql+stX6Mp0yM5K0iICuZZ/zZlKbuQIwKNLoAft8CzILyp53UTTqUsQt8t9mZnXqhANLEdCn3eWC6IaoKwujPgEePDpsztbZsjmnJauoU4KLVCPic3tO8MXq00KxAYkPp/rR0PPcjdy/TFPBLQaxbLZTEF92tRxp6X1HtKIml4CrZp2V00GurfRx7+mos0Ytha4SamgU4GHaHOT+ZpSZVWHL90V+VCjGlG4a3k0tuXcbSgpokB/4X9GnbVjKihh+pzLGIrxHTWaMPNSi05ZZi5nYw3R3cGVbnlLauBlyWdfR3bRvVzBy9wlhP9WfFxjbp00rlTDLmraPiGxdEgiAWULwg1uBJTQ43pAx+ktKhICbfhe09bnSIgG732MegL6vbiXDZpEVjKnllRlK0CfnVrSh5eaQehXYEeLCTXPpoe6vEAgZja66W97UT0XbV3dGRIxUcQrTJZ5TzgFnW7sESJnINP54DAgKXRezOfQ41G36HEi1wphdGmURz/01aUdGU3Rso3MOLlj2b/kJElERemynyDfOR9/g/4GCQYvZODriqjSGJtnyGypRrIqThJGIOj002j2J x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR12MB5324.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(136003)(376002)(366004)(39830400003)(346002)(451199021)(71200400001)(7696005)(478600001)(86362001)(55016003)(33656002)(38070700005)(38100700002)(122000001)(4744005)(2906002)(54906003)(110136005)(316002)(6506007)(186003)(26005)(9686003)(64756008)(66446008)(8936002)(4326008)(5660300002)(52536014)(8676002)(41300700001)(66476007)(66556008)(76116006)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DO0ToD/Giux2aTzcPdhZFyEphAdawa4szKwj6ohtQKebDdKPQwQswnfBM0yH?= =?us-ascii?Q?Tri9oIvY2qFt8h1ZRQRsczDSyYsmEh9i1x0fN6ggcWt8eEcdhO0vFCx2kb0J?= =?us-ascii?Q?bx9G4y7PzM6um7+/7B8LKjIg0oJ7D+jJdN4oVE1pZQ/2s6A0g8f+8lBszNDF?= =?us-ascii?Q?MpS6N0Qw7KKE8rIA3xpe9DyImnVbuEXazR7eD2uRWfmDLq85Y+/b+gA5622H?= =?us-ascii?Q?SDsEs5WHvaSZk7DGauF55pakb+1umgvbsCm+nsj9hflLG1CLipCVkZqbtjuG?= =?us-ascii?Q?cjklK+C5N4NG6F9AggjKZ2JcTGDRmTjauEu4bZp6uTeauWXcUKMNIQ0+uWOo?= =?us-ascii?Q?/yRe3Fy8RLRr7rj96zACLwSQ94gPgFlApoRjn6l+a/nDCgroK8pWqCvUSiLD?= =?us-ascii?Q?ZNQaNweVccKK822NrC68OscZmuod5CXJYx9BpOoqor2PEt3oCreYJW2Taaz0?= =?us-ascii?Q?Os07792RWrUZMpRJXfgqU+c0k/49ygJCZGPEXZ4/0xMiHcI9VKxguVyX+DOp?= =?us-ascii?Q?1NR+4Yw3AuGC4USBYBr1G4pPyRWYBjByjq8f2J+slFLzOkcdAvT3Lj9tWdPW?= =?us-ascii?Q?QI0u+6JoosUohDNiIiddt0psXXGbZvVyFpmdBBBBT/3ixzf1iRNtDmkPkHSc?= =?us-ascii?Q?hddWIJ8YXO2FOwlQeYXL+5KksHa/ULpWG1vWj7DH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CobssoMvHgWu0CFRJHL//mr3ArOfLBFyo?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: chelsio.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5324.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef2ca03b-3f31-4e25-5890-08db39b90a17 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2023 11:45:10.3801 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 065db76d-a7ae-4c60-b78a-501e8fc17095 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6BvadhFmsc02NuuTm/6RQFxpTFfWGN5/OyGDrFT/1gGAUCW+4MbHVg2K9qziG32c/nJ7AVrcNbNizZMXBLskgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5796 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >On a couple of abort packet paths skb dequeuing may end up with >returning NULL, which, in turn, may end up with further null >pointer dereference. > >Fix it by checking the return value of skb dequeuing. skbs in csk->skbq are preallocated for critical events in cxgbit_alloc_csk_= skb(), so there is no need to check for NULL.