From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58A93C43387 for ; Thu, 3 Jan 2019 17:30:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30B71208E3 for ; Thu, 3 Jan 2019 17:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731714AbfACRaE (ORCPT ); Thu, 3 Jan 2019 12:30:04 -0500 Received: from stargate.chelsio.com ([12.32.117.8]:41061 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731413AbfACRaE (ORCPT ); Thu, 3 Jan 2019 12:30:04 -0500 Received: from localhost (kumbhalgarh.blr.asicdesigners.com [10.193.185.255]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id x03HTafb017275; Thu, 3 Jan 2019 09:29:37 -0800 Date: Thu, 3 Jan 2019 22:59:36 +0530 From: Raju Rangoju To: Max Gurtovoy Cc: sagi@grimberg.me, linux-nvme@lists.infradead.org, swise@opengridcomputing.com, stable@vger.kernel.org Subject: Re: [PATCH v2] nvmet-rdma: fix null dereference under heavy load Message-ID: <20190103172935.GA23880@chelsio.com> References: <20190103103336.6343-1-rajur@chelsio.com> <2874ee1e-a205-44c5-ae91-7ddf039d76f4@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2874ee1e-a205-44c5-ae91-7ddf039d76f4@mellanox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thursday, January 01/03/19, 2019 at 18:15:55 +0200, Max Gurtovoy wrote: > > > spin_unlock_irqrestore(&queue->rsps_lock, flags); > > if (unlikely(!rsp)) { > >- rsp = kmalloc(sizeof(*rsp), GFP_KERNEL); > >+ int ret = -EINVAL; > >+ > > no real need to initialize ret variable (sorry I didn't see it in > first review). > > No problem. I'll post v3. > >+ rsp = kzalloc(sizeof(*rsp), GFP_KERNEL);