From: Greg KH <greg@kroah.com>
To: Kai Makisara <Kai.Makisara@kolumbus.fi>, akpm@osdl.org, corbet@lwn.net
Cc: Mike Anderson <andmike@us.ibm.com>,
Matthias Andree <ma+lscsi@dt.e-technik.uni-dortmund.de>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: 2.6.5-rc1 SCSI + st regressions (was: Linux 2.6.5-rc1)
Date: Wed, 17 Mar 2004 14:55:20 -0800 [thread overview]
Message-ID: <20040317225520.GA4660@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0403180022420.1090@kai.makisara.local>
On Thu, Mar 18, 2004 at 12:25:08AM +0200, Kai Makisara wrote:
> On Wed, 17 Mar 2004, Mike Anderson wrote:
>
> > Kai Makisara [Kai.Makisara@kolumbus.fi] wrote:
> > > if (!st_class_member) {
> > > printk(KERN_WARNING "st%d: class_simple_device_add failed\n",
> > > dev_num);
> >
> > Could you change the if check to use IS_ERR(st_class_member) so in the
> > future if do_create_class_files return -E* we will not get a oops.
> >
> A revised patch is at the end of this message. Thanks for pointing out
> this bug.
Yeah, this is a much better fix. Sorry to cause all of this trouble, I
should have checked to see if anyone used the kobject's name of the cdev
structure anywhere before taking that assignement out.
Andrew, this is a better fix than the one that you and Jon came up with
earlier today.
thanks,
greg k-h
> --------------------------------8<----------------------------------------------
> --- linux-2.6.5-rc1-bk2/drivers/scsi/st.c 2004-03-17 22:37:11.000000000 +0200
> +++ linux-2.6.5-rc1-bk2-k1/drivers/scsi/st.c 2004-03-18 00:09:07.000000000 +0200
> @@ -17,7 +17,7 @@
> Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
> */
>
> -static char *verstr = "20040226";
> +static char *verstr = "20040318";
>
> #include <linux/module.h>
>
> @@ -4193,20 +4193,25 @@
>
> static void do_create_class_files(Scsi_Tape *STp, int dev_num, int mode)
> {
> - int rew, error;
> + int i, rew, error;
> + char name[10];
> struct class_device *st_class_member;
>
> if (!st_sysfs_class)
> return;
>
> for (rew=0; rew < 2; rew++) {
> + /* Make sure that the minor numbers corresponding to the four
> + first modes always get the same names */
> + i = mode << (4 - ST_NBR_MODE_BITS);
> + snprintf(name, 10, "%s%s%s", rew ? "n" : "",
> + STp->disk->disk_name, st_formats[i]);
> st_class_member =
> class_simple_device_add(st_sysfs_class,
> MKDEV(SCSI_TAPE_MAJOR,
> TAPE_MINOR(dev_num, mode, rew)),
> - &STp->device->sdev_gendev, "%s",
> - STp->modes[mode].cdevs[rew]->kobj.name);
> - if (!st_class_member) {
> + &STp->device->sdev_gendev, "%s", name);
> + if (IS_ERR(st_class_member)) {
> printk(KERN_WARNING "st%d: class_simple_device_add failed\n",
> dev_num);
> goto out;
next prev parent reply other threads:[~2004-03-17 22:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-16 5:58 Linux 2.6.5-rc1 Linus Torvalds
2004-03-16 16:19 ` Linux 2.6.5-rc1 (compile stats) John Cherry
2004-03-16 21:12 ` 2.6.5-rc1 SCSI + st regressions (was: Linux 2.6.5-rc1) Matthias Andree
2004-03-16 21:17 ` Matthew Wilcox
2004-03-16 21:56 ` Matthias Andree
2004-03-16 22:29 ` Matthew Wilcox
2004-03-17 20:35 ` Kai Makisara
2004-03-17 21:18 ` Kai Makisara
2004-03-17 21:43 ` Matthias Andree
2004-03-17 21:44 ` Mike Anderson
2004-03-17 22:25 ` Kai Makisara
2004-03-17 22:55 ` Greg KH [this message]
2004-03-17 23:04 ` Mike Anderson
2004-03-17 21:32 ` Matthias Andree
2004-03-18 1:45 ` Andy Isaacson
2004-03-21 22:50 ` Linux 2.6.5-rc1 Peter Osterlund
2004-03-21 23:21 ` Linus Torvalds
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=20040317225520.GA4660@kroah.com \
--to=greg@kroah.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=akpm@osdl.org \
--cc=andmike@us.ibm.com \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ma+lscsi@dt.e-technik.uni-dortmund.de \
/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