mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: npiggin@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] brd: Add miscdevice to control creation and deletion of ramdisks
Date: Sun, 14 Oct 2012 05:38:35 +0200	[thread overview]
Message-ID: <20121014033835.GA30463@order.stressinduktion.org> (raw)
In-Reply-To: <20121014024836.GB27966@order.stressinduktion.org>

On Sun, Oct 14, 2012 at 04:48:36AM +0200, Hannes Frederic Sowa wrote:
> +	case BRD_CTL_DEL:
> +		error = get_user(val, (int __user *)param);
> +		if (error < 0)
> +			break;
> +		if ((val & max_part) != 0) {
> +			error = -EINVAL;
> +			break;
> +		}
> +		val >>= part_shift;
> +		brd2 = NULL;
> +		list_for_each_entry(brd, &brd_devices, brd_list) {
> +			if (brd->brd_number == val) {
> +				brd2 = brd;
> +				break;
> +			}
> +		}
> +		if (brd2 == NULL) {
> +			error = -ENODEV;
> +			break;
> +		}
> +		brd_del_one(brd2);
> +		break;

Sorry, first bug spotted. I should check the bd_openers before destroying the
device. Will be fixed in a follow-up patch, if needed.


      reply	other threads:[~2012-10-14  3:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14  2:48 Hannes Frederic Sowa
2012-10-14  3:38 ` Hannes Frederic Sowa [this message]

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=20121014033835.GA30463@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    /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®