Re: request_module rehash

From: Keith Owens (kaos@ocs.com.au)
Date: Fri Jan 14 2000 - 07:27:52 EST


On Thu, 13 Jan 2000 14:49:52 -0500,
James Manning <jmm@raleigh.ibm.com> wrote:
>I was thinking about the cases where request_module's return
>isn't checked... isn't this broken code and the calling code
>should be checking < 0 and return'ing -ENODEV (or similar)?

In most (all?) cases, the code checks a field that the module fills in.
This field indicates not only that the module was loaded but that it
did its work. Like this code from drivers/block/md.c.

  if (!pers[pnum]) {
    request_module("md-personality-%d", pnum);
    if (!pers[pnum])
       return -EINVAL;
  }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:23 EST