lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 May 2007 12:29:57 +0200
From:	Pierre Ossman <drzeus-list@...eus.cx>
To:	Philip Langdale <philipl@...rt.org>
CC:	Tobias Bengtsson <tobbe@...be.nu>, sdhci-devel@...t.drzeus.cx,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sdhci: Add quirk to support polling for card presence

Philip Langdale wrote:
> @@ -806,11 +819,18 @@ static void sdhci_tasklet_card(unsigned long param)
>  			host->mrq->cmd->error = MMC_ERR_FAILED;
>  			tasklet_schedule(&host->finish_tasklet);
>  		}
> -	}
>
> -	spin_unlock_irqrestore(&host->lock, flags);
> +		spin_unlock_irqrestore(&host->lock, flags);
> +
>   

Where's the unlock for the other branch?

> +		host->present = present;
>
>   

And this should be protected by the lock :)

> +		mmc_detect_change(host->mmc, msecs_to_jiffies(500));
> +	}
>   

Perhaps we should have a different delay here. After all, we're no
longer delaying against an interrupt.

> -	mmc_detect_change(host->mmc, msecs_to_jiffies(500));
> +	if (host->chip->quirks & SDHCI_QUIRK_NO_CARD_DETECT_INT) {
> +		host->detect_timer.expires = jiffies + 3 * HZ;
> +		add_timer(&host->detect_timer);
> +	}
>  }
>
>  static void sdhci_tasklet_finish(unsigned long param)
>   

I wonder if three seconds is a bit much. You might give up and yank the
card in that time.

Keep up the good work. :)

Rgds

-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ