Re: [PATCH] enclosure: add support for enclosure services

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, February 5, 2008 - 5:12 pm

On Sun, 03 Feb 2008 18:16:51 -0600
James Bottomley <James.Bottomley@HansenPartnership.com> wrote:


Thanks for sending it out for review.


This looks a little odd.  We don't take a ref on the object after looking
it up, so what prevents some other thread of control from freeing or
otherwise altering the returned object while the caller is playing with it?


Probably "non atomic context" would be more accurate.

fn() actually _can_ sleep.


It would be less fuss if this were to test cb before doing the kzalloc().

Can cb==NULL actually and legitimately happen?


Is this legal?


See, right now, someone who found this enclosure_device via
enclosure_find() could still be playing with it?


Is !edev possible and legitimate?


%u :)


"40"?


One could play with const here, if sufficiently keen.


hrm, we do this conversion about 1e99 times in the kernel and we have to go
and pass three args where only one was needed. katoi()?


So if an application does

	write(fd, "foo", 3)

it won't work?  Thye have to do

	write(fd, "foo\n", 4)

?



These could be C functions...


Nice looking driver.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] enclosure: add support for enclosure services, James Bottomley, (Sun Feb 3, 2:40 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Sun Feb 3, 5:16 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Mon Feb 4, 5:41 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Mon Feb 4, 7:14 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Mon Feb 4, 9:37 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Tue Feb 5, 8:01 am)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Tue Feb 5, 1:29 pm)
Re: [PATCH] enclosure: add support for enclosure services, Andrew Morton, (Tue Feb 5, 5:12 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Tue Feb 5, 7:57 pm)
Re: [PATCH] enclosure: add support for enclosure services, Kristen Carlson Accardi, (Tue Feb 12, 11:22 am)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Tue Feb 12, 11:45 am)
Re: [PATCH] enclosure: add support for enclosure services, Kristen Carlson Accardi, (Tue Feb 12, 12:07 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Tue Feb 12, 12:28 pm)
Re: [PATCH] enclosure: add support for enclosure services, Luben Tuikov, (Tue Feb 12, 12:45 pm)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Wed Feb 13, 9:04 am)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Wed Feb 13, 9:43 am)
Re: [PATCH] enclosure: add support for enclosure services, Kristen Carlson Accardi, (Wed Feb 13, 10:45 am)
Re: [PATCH] enclosure: add support for enclosure services, James Bottomley, (Wed Feb 13, 11:17 am)