From: Christoph Hellwig <hch@infradead.org>
To: "Yin, Fengwei" <fengwei.yin@linaro.org>
Cc: jonathanh@nvidia.com, ulf.hansson@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: block: remove the check for whole block device for ioctl.
Date: Tue, 15 Mar 2016 07:31:01 -0700 [thread overview]
Message-ID: <20160315143101.GA19497@infradead.org> (raw)
In-Reply-To: <1458055567-27878-1-git-send-email-fengwei.yin@linaro.org>
On Tue, Mar 15, 2016 at 11:26:07AM -0400, Yin, Fengwei wrote:
> From: Fengwei Yin <fengwei.yin@linaro.org>
>
> a5f5774c55a2e3ed75f4d6c5556b7bfcb726e6f0 introduced the whole block
> device checking for MMC_IOC_CMD while the old code has no such check.
>
> It breaks some ioctl call like BLKROSET from user space. An example
> is "adb remount" cmd. It prints out following error message:
> "remount of /system failed; couldn't make block device XXXX writable: \
> Operation not permitted."
> while the command worked fine.
>
> This change move the whole block device checking only for MMC_IOC_MULTI_CMD.
I think mmc_blk_ioctl_cmd will need this as well, as will probably
do any new ioctl.
So I think the right fix is to simply return -EINVAL instead of
EPERM if on a partition, which will make all the block layer ioctls
works fine.
next prev parent reply other threads:[~2016-03-15 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 15:26 Yin, Fengwei
2016-03-15 14:31 ` Christoph Hellwig [this message]
2016-03-15 23:44 ` fengwei.yin
[not found] ` <56E947F8.2040105@nvidia.com>
2016-03-16 13:49 ` fengwei.yin
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=20160315143101.GA19497@infradead.org \
--to=hch@infradead.org \
--cc=fengwei.yin@linaro.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®