Re: [RFC PATCH] watchdog: HACK: disable bind attributes with NOWAYOUT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guenter,

> > -	if (nowayout)
> > +	if (nowayout) {
> >   		set_bit(WDOG_NO_WAY_OUT, &wdd->status);
> > +		wdd->parent->driver->suppress_bind_attrs = true;
> 
> That makes sense to me. We can not assume that wdd->parent is set, so it won't work as-is.

Good point!

> Not sure what a "correct" solution might be. Passing "parent" as argument doesn't really
> solve any layering argument

I totally agree. I opted for passing a pointer to the driver to modify:

void watchdog_set_nowayout(struct watchdog_device *wdd, struct driver
			   *drv, bool nowayout)

I'd think this would work from a layering perspective.

> Did you ensure that the attributes are not already created by the time
> suppress_bind_attrs is set ?

Not yet. I first wanted to make sure if it makes sense, at all. But will
do for later versions.

Thanks for the review,

   Wolfram

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux