From: Stephen Rothwell <sfr@canb•auug.org.au>
To: James Bottomley <James.Bottomley@HansenPartnership•com>,
Jens Axboe <axboe@kernel•dk>
Cc: Christoph Hellwig <hch@lst•de>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle•com>
Subject: linux-next: manual merge of the scsi tree with the block tree
Date: Tue, 24 Aug 2021 16:32:15 +1000 [thread overview]
Message-ID: <20210824163215.3f08d55c@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]
Hi all,
Today's linux-next merge of the scsi tree got a conflict in:
drivers/scsi/st.c
between commit:
45938335d0a9 ("st: do not allocate a gendisk")
from the block tree and commits:
dba7688fc903 ("scsi: st: Simplify ioctl handling")
2e27f576abc6 ("scsi: scsi_ioctl: Call scsi_cmd_ioctl() from scsi_ioctl()")
from the scsi tree.
I fixed it up (I think, see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging. You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/scsi/st.c
index d1abc020f3c0,2d1b0594af69..000000000000
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@@ -3815,35 -3821,24 +3816,24 @@@ static long st_ioctl(struct file *file
goto out;
}
mutex_unlock(&STp->lock);
- switch (cmd_in) {
- case SCSI_IOCTL_STOP_UNIT:
- /* unload */
- retval = scsi_ioctl(STp->device, cmd_in, p);
- if (!retval) {
- STp->rew_at_close = 0;
- STp->ready = ST_NO_TAPE;
- }
- return retval;
- case SCSI_IOCTL_GET_IDLUN:
- case SCSI_IOCTL_GET_BUS_NUMBER:
- break;
+ switch (cmd_in) {
+ case SG_IO:
+ case SCSI_IOCTL_SEND_COMMAND:
+ case CDROM_SEND_PACKET:
+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
+ default:
+ break;
+ }
- default:
- if ((cmd_in == SG_IO ||
- cmd_in == SCSI_IOCTL_SEND_COMMAND ||
- cmd_in == CDROM_SEND_PACKET) &&
- !capable(CAP_SYS_RAWIO))
- i = -EPERM;
- else
- i = scsi_cmd_ioctl(STp->device->request_queue,
- NULL, file->f_mode, cmd_in,
- p);
- if (i != -ENOTTY)
- return i;
- break;
- retval = scsi_ioctl(STp->device, STp->disk, file->f_mode, cmd_in, p);
++ retval = scsi_ioctl(STp->device, NULL, file->f_mode, cmd_in, p);
+ if (!retval && cmd_in == SCSI_IOCTL_STOP_UNIT) {
+ /* unload */
+ STp->rew_at_close = 0;
+ STp->ready = ST_NO_TAPE;
}
- return -ENOTTY;
+ return retval;
out:
mutex_unlock(&STp->lock);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2021-08-24 6:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 6:32 Stephen Rothwell [this message]
2021-08-24 6:39 ` linux-next: manual merge of the scsi tree with the block tree Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2025-01-07 4:09 Stephen Rothwell
2025-01-07 6:03 ` Christoph Hellwig
2023-06-19 3:14 Stephen Rothwell
2022-03-07 4:18 Stephen Rothwell
2022-03-07 4:14 Stephen Rothwell
2021-11-01 5:08 Stephen Rothwell
2020-03-25 5:04 Stephen Rothwell
2019-04-15 5:59 Stephen Rothwell
2019-04-15 13:48 ` Bart Van Assche
2019-04-17 19:11 ` Martin Wilck
2019-02-18 5:10 Stephen Rothwell
2017-06-21 5:55 Stephen Rothwell
2017-06-19 5:35 Stephen Rothwell
2016-11-08 5:48 Stephen Rothwell
2016-11-08 16:17 ` James Bottomley
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=20210824163215.3f08d55c@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=James.Bottomley@HansenPartnership$(echo .)com \
--cc=axboe@kernel$(echo .)dk \
--cc=hch@lst$(echo .)de \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=martin.petersen@oracle$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox