From: Ed Cashin <ecashin@coraid.com>
To: linux-kernel@vger.kernel.org
Cc: Ed Cashin <ecashin@coraid.com>
Subject: [PATCH] aoe: ensure that AoE minor address is supported
Date: Fri, 7 Aug 2009 09:05:19 -0400 [thread overview]
Message-ID: <1249650319-1646-1-git-send-email-ecashin@coraid.com> (raw)
This aoe driver only supports a fixed number of AoE minor ("slot")
addresses per major ("shelf") address. This check ensures that the
minor address is supported and clarifies the diagnostic message.
Signed-off-by: Ed Cashin <ecashin@coraid.com>
---
I plan to put this patch in the aoe quilt tree for linux-next.
drivers/block/aoe/aoecmd.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 965ece2..437b95b 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -982,8 +982,12 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
}
sysminor = SYSMINOR(aoemajor, h->minor);
- if (sysminor * AOE_PARTITIONS + AOE_PARTITIONS > MINORMASK) {
- printk(KERN_INFO "aoe: e%ld.%d: minor number too large\n",
+ if (h->minor >= NPERSHELF) {
+ printk(KERN_INFO "aoe: e%ld.%d: AoE minor address too large\n",
+ aoemajor, (int) h->minor);
+ return;
+ } else if (sysminor * AOE_PARTITIONS + AOE_PARTITIONS > MINORMASK) {
+ printk(KERN_INFO "aoe: e%ld.%d: AoE major address too large\n",
aoemajor, (int) h->minor);
return;
}
--
1.5.6.5
reply other threads:[~2009-08-07 13:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1249650319-1646-1-git-send-email-ecashin@coraid.com \
--to=ecashin@coraid.com \
--cc=linux-kernel@vger.kernel.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®