From: Andrew Morton <akpm@osdl.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com,
horst.hummel@de.ibm.com
Subject: Re: [PATCH 6/7] s390: dasd open counter.
Date: Wed, 18 Jan 2006 20:15:00 -0800 [thread overview]
Message-ID: <20060118201500.1e1deafa.akpm@osdl.org> (raw)
In-Reply-To: <20060118165745.GF29266@osiris.boeblingen.de.ibm.com>
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
>
> From: Horst Hummel <horst.hummel@de.ibm.com>
>
> The open_count is increased for every opener, that includes the
> blkdev_get in dasd_scan_partitions. This tampers the open_count
> in BIODASDINFO. Hide the internal open from user-space.
>
> Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>
> drivers/s390/block/dasd_ioctl.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletion(-)
>
> diff -urpN linux-2.6/drivers/s390/block/dasd_ioctl.c linux-2.6-patched/drivers/s390/block/dasd_ioctl.c
> --- linux-2.6/drivers/s390/block/dasd_ioctl.c 2006-01-18 17:25:49.000000000 +0100
> +++ linux-2.6-patched/drivers/s390/block/dasd_ioctl.c 2006-01-18 17:25:53.000000000 +0100
> @@ -421,8 +421,15 @@ dasd_ioctl_information(struct block_devi
> dasd_info->cu_model = cdev->id.cu_model;
> dasd_info->dev_type = cdev->id.dev_type;
> dasd_info->dev_model = cdev->id.dev_model;
> - dasd_info->open_count = atomic_read(&device->open_count);
> dasd_info->status = device->state;
> + /*
> + * The open_count is increased for every opener, that includes
> + * the blkdev_get in dasd_scan_partitions.
> + * This must be hidden from user-space.
> + */
> + dasd_info->open_count = atomic_read(&device->open_count);
> + if (!device->bdev)
> + dasd_info->open_count++;
I'll change the above to atomic_inc().
next prev parent reply other threads:[~2006-01-19 4:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 16:57 Heiko Carstens
2006-01-19 4:15 ` Andrew Morton [this message]
2006-01-19 4:16 ` Andrew Morton
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=20060118201500.1e1deafa.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=heiko.carstens@de.ibm.com \
--cc=horst.hummel@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome