All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Bart Van Assche <bvanassche@acm.org>,
	Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Sumit Saxena <sumit.saxena@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v3] scsi: mpi3mr: fix possible crash when setup bsg fail
Date: Tue, 7 Jan 2025 10:04:45 +0800	[thread overview]
Message-ID: <2ed732a2-e317-4b75-b3fb-f1e4657b0368@linux.alibaba.com> (raw)
In-Reply-To: <3e87b69b-38aa-413f-a2bf-388da21afaa0@acm.org>


在 2025/1/7 02:30, Bart Van Assche 写道:
> On 12/26/24 4:18 AM, Guixin Liu wrote:
>> diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c 
>> b/drivers/scsi/mpi3mr/mpi3mr_app.c
>> index 10b8e4dc64f8..7589f48aebc8 100644
>> --- a/drivers/scsi/mpi3mr/mpi3mr_app.c
>> +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
>> @@ -2951,6 +2951,7 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc)
>>           .max_hw_sectors        = MPI3MR_MAX_APP_XFER_SECTORS,
>>           .max_segments        = MPI3MR_MAX_APP_XFER_SEGMENTS,
>>       };
>> +    struct request_queue *q;
>>         device_initialize(bsg_dev);
>>   @@ -2966,14 +2967,17 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc)
>>           return;
>>       }
>>   -    mrioc->bsg_queue = bsg_setup_queue(bsg_dev, dev_name(bsg_dev), 
>> &lim,
>> +    q = bsg_setup_queue(bsg_dev, dev_name(bsg_dev), &lim,
>>               mpi3mr_bsg_request, NULL, 0);
>> -    if (IS_ERR(mrioc->bsg_queue)) {
>> +    if (IS_ERR(q)) {
>>           ioc_err(mrioc, "%s: bsg registration failed\n",
>>               dev_name(bsg_dev));
>>           device_del(bsg_dev);
>>           put_device(bsg_dev);
>> +        return;
>>       }
>> +
>> +    mrioc->bsg_queue = q;
>>   }
>
> Next time, when including a call stack in the patch description, please
> clean it up. This means removing the timestamps, the register dumps and
> also the stack frames that start with " ? ". Anyway:
>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>

Thanks, I will send a v4 to clean up the stack, sorry for the trouble.

Best Regards,

Guixin Liu


      reply	other threads:[~2025-01-07  2:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 12:18 [PATCH v3] scsi: mpi3mr: fix possible crash when setup bsg fail Guixin Liu
2024-12-30  1:33 ` Guixin Liu
2025-01-06 18:30 ` Bart Van Assche
2025-01-07  2:04   ` Guixin Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ed732a2-e317-4b75-b3fb-f1e4657b0368@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bvanassche@acm.org \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=sumit.saxena@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.