All of lore.kernel.org
 help / color / mirror / Atom feed
From: michael.christie@oracle.com
To: Christoph Hellwig <hch@infradead.org>
Cc: martin.petersen@oracle.com,
	james.bottomley@hansenpartnership.com,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH 2/4] scsi: target: Fix WRITE_SAME NDOB handling in file
Date: Sun, 19 Jun 2022 11:38:12 -0500	[thread overview]
Message-ID: <f0b4571e-559a-18c9-d1cc-35f66a588779@oracle.com> (raw)
In-Reply-To: <5f6d0dac-5eb2-ee02-3786-bfb83be5a3f7@oracle.com>

On 6/19/22 11:26 AM, michael.christie@oracle.com wrote:
> On 6/19/22 1:25 AM, Christoph Hellwig wrote:
>> On Thu, Jun 16, 2022 at 10:04:37PM -0500, Mike Christie wrote:
>>> If NDOB is set we don't have a buffer. We will then crash when trying to
>>> access the t_data_sg. This has us allocate a page to use for the data
>>> buffer that gets passed to vfs_iter_write.
>>
>> But only due to the last patch, so this should be reordered before
>> that.
> 
> I didn't get that part. You can hit this bug with what is upstream right
> now. You don't need patch 4.
> 

I see you meant the patch before this one :)

Without patch 1, you still hit the crash. In the current code, we print error,
call the execute_cmd callout, then for file and iblock crash because there is
no sg and we assume there always will be one.

  reply	other threads:[~2022-06-19 16:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  3:04 [PATCH 0/4] target unmap/writespace fixes and enhancements Mike Christie
2022-06-17  3:04 ` [PATCH 1/4] scsi: target: Fix WRITE_SAME NDOB size check Mike Christie
2022-06-19  6:22   ` Christoph Hellwig
2022-06-19 16:25     ` michael.christie
2022-06-20  6:45       ` Christoph Hellwig
2022-06-20 16:03         ` Mike Christie
2022-06-17  3:04 ` [PATCH 2/4] scsi: target: Fix WRITE_SAME NDOB handling in file Mike Christie
2022-06-19  6:25   ` Christoph Hellwig
2022-06-19 16:26     ` michael.christie
2022-06-19 16:38       ` michael.christie [this message]
2022-06-17  3:04 ` [PATCH 3/4] scsi: target: Fix WRITE_SAME NDOB handling in iblock Mike Christie
2022-06-19  6:28   ` Christoph Hellwig
2022-06-17  3:04 ` [PATCH 4/4] scsi: target: Detect unmap support post configuration Mike Christie
2022-06-19  6:29   ` Christoph Hellwig

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=f0b4571e-559a-18c9-d1cc-35f66a588779@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=hch@infradead.org \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /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.