Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227752
| From | Jon Hunter <jonathanh@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands |
| Date | 2015-09-18 12:30 +0200 |
| Message-ID | <qa15x-8i7-29@gated-at.bofh.it> (permalink) |
| References | <q8Dyi-1lu-15@gated-at.bofh.it> <q9iL8-2Ej-17@gated-at.bofh.it> <q9nrt-W0-33@gated-at.bofh.it> <q9BkJ-46q-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 17/09/15 07:59, Ulf Hansson wrote: > [...] > >>>> + /* >>>> + * The caller must have CAP_SYS_RAWIO, and must be calling this on the >>>> + * whole block device, not on a partition. This prevents overspray >>>> + * between sibling partitions. >>>> + */ >>>> + if ((!capable(CAP_SYS_RAWIO)) || (bdev != bdev->bd_contains)) >>>> + return -EPERM; >>> >>> This check is common for multi and non-multi. Please move it to the >>> mmc_blk_ioctl() to avoid some code duplication. >> >> Yes that's true. I can move but it means also passing bdev to >> __mmc_blk_ioctl_cmd() as another argument. It is not a big deal, but it >> was more convenient to test here. If your preference is to consolidate >> the tests to one place then I will move this test. > > I was suggesting to move it to mmc_blk_ioctl() and not to > __mmc_blk_ioctl_cmd(). That shouldn't cause any changes to any > function-definitions, right!? Sorry, completely mis-read. Yes that makes sense, will update. Cheers Jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3] mmc: block: Add new ioctl to send multi commands Jon Hunter <jonathanh@nvidia.com> - 2015-09-14 17:10 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Grant Grundler <grundler@chromium.org> - 2015-09-14 18:40 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Ulf Hansson <ulf.hansson@linaro.org> - 2015-09-16 13:10 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Jon Hunter <jonathanh@nvidia.com> - 2015-09-16 18:10 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Ulf Hansson <ulf.hansson@linaro.org> - 2015-09-17 09:00 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Jon Hunter <jonathanh@nvidia.com> - 2015-09-18 12:30 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Gwendal Grignou <gwendal@chromium.org> - 2015-09-16 20:00 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Jon Hunter <jonathanh@nvidia.com> - 2015-09-21 12:00 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Jon Hunter <jonathanh@nvidia.com> - 2015-09-21 13:30 +0200
Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands Grant Grundler <grundler@google.com> - 2015-09-21 20:50 +0200
csiph-web